Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize messageBox handling on app #1139

Merged
merged 14 commits into from
Feb 6, 2025

Conversation

tupaschoal
Copy link
Collaborator

There were several places using showMessageBox and showMessageBoxSync throughout the app, but they all called them differently and with different names. This centralizes and standardizes them all so that all dialog interactions feel consistent:

  • 3b63618 and 4427452
    Just making the names actually consistent with what they do
  • 3f129c7
    Allow people using showDialogSync to customize the dialog further
  • 169c0f0 and bae0497
    Make files using showMessageBox* use the aliases of window-aux instead.
  • 08287cf
    We know this makes mocks work on tests, so let's prepare for the day these are mocked :D
  • 1ab2d3d
    No need to specify titles, they will come from the utility functions themselves.
  • bce1224
    All dialogs will now have the "Time to Leave" title, with the previous title being a blue title inside the dialog and the previous message further down:
    image
  • c822b96 and 38cacec
    I noticed several dialogs were doing things upon being closed on the X, which should never happen, so I made sure all of them had cancelId set to the same defaultId which is the action that won't do anything.
  • 3222607
    Made dialogs use the info, warning, ... icons instead of the TTL app icon, which previously felt weird
  • 24c6850
    Small bug fix
  • be1a792
    Getting rid of redundant option to "cancel" when the option to say "no" is already there.

The method uses showMessageBox under the hood, which is not sync
@araujoarthur0
Copy link
Collaborator

@tupaschoal I see sometimes we use Yes/No buttons on the footer and at other times big buttons with please and thanks. Maybe we should just use the footer buttons and make the text more neutral?
image
image

js/ipc-constants.mjs Outdated Show resolved Hide resolved
Copy link
Collaborator

@araujoarthur0 araujoarthur0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement 😊

@tupaschoal tupaschoal merged commit d559412 into TTLApp:main Feb 6, 2025
3 checks passed
@tupaschoal
Copy link
Collaborator Author

\changelog-update
Message: Enhancement [#1139]: Improved consistency of all pop-ups in the application

@tupaschoal tupaschoal deleted the dialog-refactor branch February 6, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants