feat(settings): add toast feedback when saving settings or panel layout#1269
feat(settings): add toast feedback when saving settings or panel layout#1269Niboshi-Wasabi wants to merge 5 commits intokoala73:mainfrom
Conversation
|
@Niboshi-Wasabi is attempting to deploy a commit to the Elie Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for the contribution! The toast feedback on save is a solid UX improvement 👍 Feedback1. Toast duplication — 3 identical implementations The new
All three do the same thing: remove existing If you're up for it, it would be great to consolidate these into a single shared utility — something like export function showToast(msg: string): void {
document.querySelector('.toast-notification')?.remove();
const el = document.createElement('div');
el.className = 'toast-notification';
el.setAttribute('role', 'status');
el.textContent = msg;
document.body.appendChild(el);
requestAnimationFrame(() => el.classList.add('visible'));
setTimeout(() => {
el.classList.remove('visible');
setTimeout(() => el.remove(), 300);
}, 3000);
}Then all three call sites just
2. Self-review doc
3. Minor: The 11 separate Let us know if you'd like help with any of these changes! |
…ved, remove self-review doc - Add src/utils/toast.ts with showToast(msg), role=status; use from UnifiedSettings, country-intel; remove duplicate from event-handlers - preferences-content: single host.onSettingSaved?.() at end of change handler (early return for import) - Remove docs/SELF_REVIEW_SETTINGS_SAVE_FEEDBACK.md per maintainer feedback Made-with: Cursor
|
Thanks for the review. Addressed all three points:
Pushed as a follow-up commit on this branch. |
|
Thanks for the follow-up commit addressing all the earlier feedback, the toast consolidation into One thing we noticed: since the original review, we added inline "Saved" feedback to the Panels tab (the
That's double feedback for the same action on the Panels tab. The toast is still valuable for the Preferences tab (theme, map provider, language, etc.) where there's currently no save confirmation at all. Could you remove the Everything else in the PR looks good to merge once that's addressed. |
Made-with: Cursor
|
Sorry for the delayed response (took about a week to catch up). Thanks for the suggestion! I removed the global showToast call from savePanelChanges() in UnifiedSettings.ts, so the Panels tab save now shows only the existing inline Saved feedback. The toast feedback remains wired for the Preferences tab via onSettingSaved (theme/map/language/etc.), as intended. I pushed a follow-up commit to this PR. |
Made-with: Cursor
Made-with: Cursor
|
I reopened this work as #2261 on top of current Reason: the original branch has drifted too far from
Local validation for
|
|
Superseded by #2261 which implements the same save feedback with a cleaner approach. |
Adds visual confirmation (toast) when saving settings so users get clear feedback.
Changes:
showSaveToast()that shows a short-lived toast using the existing.toast-notificationpattern. Called when the user saves panel layout (Panels tab Save button).role="status"for accessibility.onSettingSaved: () => this.showSaveToast()torenderPreferences()so the same toast is shown when any preference is changed in the Settings tab.PreferencesHostnow has optionalonSettingSaved. All preference change handlers (theme, map provider, map theme, stream quality, globe preset, language, AI toggles, etc.) call it after saving. Import/Export keep their existing in-panel toast only.Uses existing
modals.settingsWindow.savedfor the message (no new locale keys).Ref: #1247 (second of the three approved items: Settings save feedback).