Skip to content

fix: replace alert/confirm with inline toast and modal for profile ops#307

Merged
SamXop123 merged 1 commit into
SamXop123:mainfrom
Kirtan-pc:fix/replace-alert-confirm-with-inline-toast
Jul 5, 2026
Merged

fix: replace alert/confirm with inline toast and modal for profile ops#307
SamXop123 merged 1 commit into
SamXop123:mainfrom
Kirtan-pc:fix/replace-alert-confirm-with-inline-toast

Conversation

@Kirtan-pc

Copy link
Copy Markdown
Contributor

Profile and backup operations in settings.js previously used native window.alert() and window.confirm() which surface as OS-level blocking modals. These are inconsistent with the dark-themed settings UI and block the Electron renderer thread.

Changes:

  • Add showProfileStatus(elementId, message, isError, persistent) helper that renders a styled, auto-dismissing inline banner beneath each operation group (theme profiles, settings backup, aurora engine profiles), mirroring the existing showHotkeyStatus() pattern.
  • Add showInlineConfirm(message) Promise-based helper that shows a dark-themed, non-blocking modal overlay instead of window.confirm(). Clicking outside or Cancel resolves false; clicking Confirm resolves true. Falls back to window.confirm() if DOM elements are absent.
  • Add three .profile-status-msg elements in settings.html: #profile-status-msg (Theme Profiles section)
    #backup-status-msg (Settings Backup section)
    #aurora-status-msg (Aurora Engine Profiles section)
  • Add #inline-confirm-modal overlay in settings.html.
  • Add .profile-status-msg and .inline-confirm-overlay CSS in
    settings.css with slide-in animation and error/success colour coding.
  • Replace every alert() / confirm() call in profile save, delete,
    duplicate, import, export, backup export/import, restore defaults,
    aurora engine profile save/load/delete, and gradient-stop limit
    with the new helpers.

Fixes Issue #279

Profile and backup operations in settings.js previously used native
window.alert() and window.confirm() which surface as OS-level blocking
modals. These are inconsistent with the dark-themed settings UI and
block the Electron renderer thread.

Changes:
- Add showProfileStatus(elementId, message, isError, persistent) helper
  that renders a styled, auto-dismissing inline banner beneath each
  operation group (theme profiles, settings backup, aurora engine
  profiles), mirroring the existing showHotkeyStatus() pattern.
- Add showInlineConfirm(message) Promise-based helper that shows a
  dark-themed, non-blocking modal overlay instead of window.confirm().
  Clicking outside or Cancel resolves false; clicking Confirm resolves
  true. Falls back to window.confirm() if DOM elements are absent.
- Add three .profile-status-msg elements in settings.html:
    #profile-status-msg  (Theme Profiles section)
    #backup-status-msg   (Settings Backup section)
    #aurora-status-msg   (Aurora Engine Profiles section)
- Add #inline-confirm-modal overlay in settings.html.
- Add .profile-status-msg and .inline-confirm-overlay CSS in
  settings.css with slide-in animation and error/success colour coding.
- Replace every alert() / confirm() call in profile save, delete,
  duplicate, import, export, backup export/import, restore defaults,
  aurora engine profile save/load/delete, and gradient-stop limit
  with the new helpers.

Fixes: alert/confirm blocking OS modals in Electron renderer
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

@Kirtan-pc is attempting to deploy a commit to the Dot_NotSam's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 83d26359-7d0f-48de-95e9-e0b294680afb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SamXop123 SamXop123 merged commit 2b96100 into SamXop123:main Jul 5, 2026
5 of 7 checks passed
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

🎉 Congratulations @Kirtan-pc! 🎉

Your pull request has been successfully merged into Paraline! Thank you so much for your valuable contribution and effort. Every single improvement helps make Paraline a better desktop experience for everyone! 🙌

🚀 What's Next?

  • Keep the momentum going! Feel free to browse through our open Issues and grab another one that interests you!
  • Support the Project: If you enjoyed contributing to Paraline, please take a second to star our repository! It helps increase the project's visibility and supports our community. ⭐

💬 Stay Connected:
Have any questions, want feedback, or just want to discuss further contributions? Feel free to reach out directly to the maintainer on Discord: dot_notsam!

Thank you again, and keep up the amazing work! 💻✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants