multipass icon indicating copy to clipboard operation
multipass copied to clipboard

[gui] Refactor confirmation dialogs

Open levkropp opened this issue 7 months ago • 4 comments

resolves #4102 This pull request refactors the confirmation dialogs in the GUI to improve user experience and consistency. Key changes include replacing custom Switch widgets with Checkbox widgets, updating dialog layouts, and swapping the button placements.

image
image

levkropp avatar May 28 '25 02:05 levkropp

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 89.31%. Comparing base (47f57a0) to head (87382c2). :warning: Report is 433 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4118   +/-   ##
=======================================
  Coverage   89.31%   89.31%           
=======================================
  Files         259      259           
  Lines       15684    15684           
=======================================
  Hits        14008    14008           
  Misses       1676     1676           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar May 28 '25 03:05 codecov[bot]

I've made the top and bottom padding for the action buttons the same, which required manually defining top and bottom padding in the actionsPadding of ConfirmationDialog. To the best of my knowledge, this appears to be required because of the defaults in ActionDialog. This has also reduced the size of the action buttons bar to be equal to the close tab bar. I have also added 8 more vertical spacing between the body text and the checkbox.

As for this:

keep the switcher in the other "Before quitting" modal

I interpreted this as keeping the switcher as in the settings. I strongly disagree with having one of the confirmation dialogs be a switch while the other one is a checkbox, since introducing an inconsistency here doesn't seem to align with the goal of "polish" in my eyes. We should discuss more about this when @vikorama returns from her vacation

levkropp avatar May 29 '25 15:05 levkropp

I've also made the padding on the top of the box containing the body text & button to be 4 larger than the bottom padding, to address the 18-22 discrepancy. This also comes from the "splash radius" of the checkbox that we are using

levkropp avatar May 29 '25 15:05 levkropp

I have also reduced the right side title padding by 8 to make the X in the top right look more symmetrical (also related to splash radius). Here is what the dialogs look like currently:

image
image

levkropp avatar May 29 '25 15:05 levkropp

After discussing with @vikorama , I have changed the BeforeCloseDialog to have a more consistent title with the CloseTerminalDialog (both are now questions), as well as having the number of actively running instances as part of the the text, with checkbox text as well.

image

levkropp avatar Jun 18 '25 19:06 levkropp