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

feat: consistent close button #6060

Merged
merged 1 commit into from Feb 26, 2024
Merged

Conversation

deboer-tim
Copy link
Collaborator

@deboer-tim deboer-tim commented Feb 18, 2024

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.

@deboer-tim deboer-tim requested review from benoitf and a team as code owners February 18, 2024 18:20
@deboer-tim deboer-tim requested review from axel7083, lstocchi and mairin and removed request for a team February 18, 2024 18:20
@axel7083
Copy link
Contributor

On certain place we are using the faXmark icon, it is also one we want to replace ?

faXmark.mp4

<Fa size="18" class="text-red-400" icon="{faXmarkCircle}" />

<Fa size="14" icon="{faXmark}" />

image

@deboer-tim
Copy link
Collaborator Author

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>
Copy link
Contributor

@axel7083 axel7083 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@lstocchi lstocchi left a comment

Choose a reason for hiding this comment

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

LGTM

@deboer-tim deboer-tim merged commit 9c13fc5 into containers:main Feb 26, 2024
8 checks passed
@podman-desktop-bot podman-desktop-bot added this to the 1.8.0 milestone Feb 26, 2024
@deboer-tim deboer-tim deleted the close-button branch February 26, 2024 16:41
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.

Nit: Should we use xmark icon?
4 participants