Replace blocking prompt() with themed MBDialog helper#5844
Merged
walterbender merged 1 commit intosugarlabs:masterfrom Mar 8, 2026
Merged
Replace blocking prompt() with themed MBDialog helper#5844walterbender merged 1 commit intosugarlabs:masterfrom
walterbender merged 1 commit intosugarlabs:masterfrom
Conversation
This PR replaces the native, blocking window.prompt() in the file saving flow with a custom, asynchronous dialog component. The new MBDialog matches the application's widget styling and supports theme-aware CSS variables.
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
This was referenced Feb 20, 2026
Contributor
Author
|
@walterbender can you please review and let me know if i should continue. |
Member
|
This looks good. In testing, I noticed we have a few regressions -- notably in save ABC and save WAV |
12 tasks
parthdagia05
pushed a commit
to parthdagia05/musicblocks
that referenced
this pull request
Mar 15, 2026
This PR replaces the native, blocking window.prompt() in the file saving flow with a custom, asynchronous dialog component. The new MBDialog matches the application's widget styling and supports theme-aware CSS variables.
parthdagia05
pushed a commit
to parthdagia05/musicblocks
that referenced
this pull request
Mar 15, 2026
This PR replaces the native, blocking window.prompt() in the file saving flow with a custom, asynchronous dialog component. The new MBDialog matches the application's widget styling and supports theme-aware CSS variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces the native, blocking window.prompt() in the file saving interface flow with a custom dialog component. The new MBDialog matches the application's widget styling and supports theme-aware CSS variables.
Changes
The "MBDialog" Helper: I have created a new utility specifically designed to handle messages and text prompts.It can be used or the below mentioned alerts, prompt() calls.
Consistent Styling: The new dialogs now automatically match your current theme (Light or Dark mode) and use the same window styling as the rest of the app's widgets.
Architecture and workflow:
Images:

Future Roadmap
This new utility is the new standard for the app. In upcoming PRs, I will be swapping out old alerts in the following areas: