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
feat: consistent close button #6060
Conversation
On certain place we are using the
faXmark.mp4
podman-desktop/packages/renderer/src/lib/window-control-buttons/LinuxControlButton.svelte Line 22 in a2c31dd
|
Most of these are clear buttons, not close dialog/window. I don't think we necessarily have to use the same icon for both (and definitely wasn't trying to unify here). @mairin do you have a preference for faTimes vs faXmark for either close or clear buttons? Would also be nice to get your +1 on the color difference (thread paragraph in description). |
We have 9 close buttons that I could find in Podman Desktop. They were at least 3 different colors, 6 of them changed color when you hover, and one hover changed the hover background too. Except for the one, the lack of/inconsistent hover indication was standing out to me compared with our Links and Buttons. This provides a common CloseButton component in a medium-dark gray. On hover, it goes white and has the same bg as a Link (but slightly larger since the icon is small). The button accepts either an href or an on:click action to support our different uses. I've made a call here that all close buttons look the same, instead of leaving those on dialogs/modals white. IMHO this consistency is better, allows the hover indication to be more clear, and we don't need to highlight the Close button in any of these places. Although we might normally divide up the component + usage in two PRs, the amount of change here wasn't big and I thought it's important to see it in all of the contexts, so I've included both and can split up if requested. Fixes containers#2352. Signed-off-by: Tim deBoer <git@tdeboer.ca>
7da39d8
to
7d7234b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
We have 9 close buttons that I could find in Podman Desktop. They were at least 3 different colors, 6 of them changed color when you hover, and one hover changed the hover background too. Except for the one, the lack of/inconsistent hover indication was standing out to me compared with our Links and Buttons.
This provides a common CloseButton component in a medium-dark gray. On hover, it goes white and has the same bg as a Link (but slightly larger since the icon is small). The button accepts either an href or an on:click action to support our different uses.
I've made a call here that all close buttons look the same, instead of leaving those on dialogs/modals white. IMHO this consistency is better, allows the hover indication to be more clear, and we don't need to highlight the Close button in any of these places.
Although we might normally divide up the component + usage in two PRs, the amount of change here wasn't big and I thought it's important to see it in all of the contexts, so I've included both and can split up if requested.
Screenshot / video of UI
Before:
Screen.Recording.2024-02-18.at.1.16.38.PM.mov
After:
Screen.Recording.2024-02-18.at.1.03.00.PM.mov
What issues does this PR fix or reference?
Fixes #2352.
How to test this PR?
Unit tests updated. Try modal dialogs, message boxes, and form/detail pages.