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

TextButton & IconButton - fix icon&font color for hover & pressed state #570

Closed
19 tasks done
Tracked by #452
thrbnhrtmnn opened this issue Nov 10, 2023 · 5 comments
Closed
19 tasks done
Tracked by #452
Assignees
Labels
⌨️ dev issue Task is for developers 🎓 junior issue Good for juniors 🚨 new::bug Something isn't working

Comments

@thrbnhrtmnn
Copy link
Contributor

thrbnhrtmnn commented Nov 10, 2023

Description / User Story

The icon & font color of the Icon- and TextButton are changing in pressed and hover state, when they should not.
Most buttons should have the same color in rest, hover and pressed state, but some (secondary & silent) have different colors. Currently all buttons have different colors in rest, hover and pressed state.


Acceptance Criteria

  • The icon color of the IconButton is as defined in design in the pressed and hover state:
    • Light Mode CTA hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,90%,1)
    • Light Mode Primary hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,90%,1) in hover and hsl(220,65%,50%,1) in pressed
    • Light Mode Destructive hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,80%,1)
    • Light Mode Encourage hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,80%,1)
    • Dark Mode CTA hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,30%,1)
    • Dark Mode Primary hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,30%,1) in hover and hsl(220,65%,40%,1) in pressed
    • Dark Mode Destructive hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,40%,1)
    • Dark Mode Encourage hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,40%,1)
  • The icon & font color of the TextButton is as defined in design in the pressed and hover state:
    • Light Mode CTA hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,90%,1)
    • Light Mode Primary hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,90%,1) in hover and hsl(220,65%,50%,1) in pressed
    • Light Mode Destructive hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,80%,1)
    • Light Mode Encourage hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,80%,1)
    • Dark Mode CTA hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,30%,1)
    • Dark Mode Primary hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,30%,1) in hover and hsl(220,65%,40%,1) in pressed
    • Dark Mode Destructive hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,40%,1)
    • Dark Mode Encourage hover & pressed are hsl(0,0%,100%,1) instead of hsl(220,10%,40%,1)
  • Also the xxs size variant for the iconButton has been removed in Storybook, as it is not defined in design

Background information

  • This was found after TextButton - rename tokens #532 & IconButton - rename tokens #531 were done, therefor the errors are likely caused by semantic tokens and not by component tokens
  • Other things found that need to be discussed:
    • Is it correct, that there are also hover, pressed and focus states for the loading state?
    • I assume the focus ring will be correctly applied in Focus State - global improvement #330 and after this issue we wont have different approaches for IconButton (outer border) and TextButton (inner border) plus the focus ring will be white in dark-mode
    • I assume preventing that loading and disabled can be simultaneously true in SB is not that easy and thats why we don't do it for release 1.0
    • Loading state for text & icon button will be fixed within TextButton, IconButton - fix loading state #498
    • Is it correct to apply the focus ring after a pressing the button and moving the mouse away? As the pressed state does not have the focus ring in design, I suppose not. I see that some other DS however do that, like carbon, where the button already is styled like it is focused when pressing. But others don't do it, like for example nordhealth and atlassian. What is interesting here is, that in nordhealth the focus ring will be removed for example when another button than the focussed is clicked but in atlassian the focus ring always stays on the same element even if some other button is clicked.
@thrbnhrtmnn thrbnhrtmnn added 🦹 needs:help Extra attention is needed 🚨 new::bug Something isn't working 🎓 junior issue Good for juniors labels Nov 10, 2023
@thrbnhrtmnn thrbnhrtmnn removed the 🦹 needs:help Extra attention is needed label Nov 16, 2023
@RubirajAccenture RubirajAccenture self-assigned this Nov 16, 2023
@thrbnhrtmnn thrbnhrtmnn self-assigned this Nov 21, 2023
@thrbnhrtmnn
Copy link
Contributor Author

As discussed in todays design review session: Differences between design and code could not be validated, so I will have a look again at this.

@thrbnhrtmnn thrbnhrtmnn self-assigned this Nov 21, 2023
@thrbnhrtmnn
Copy link
Contributor Author

Hey @RubirajAccenture , I checked the component and all colors are correct now.

But I still see that the last AC is open "Also the xxs size variant for the iconButton has been removed in Storybook, as it is not defined in design". Could you have a look and remove the xxs size variant for the Icon Button?

@thrbnhrtmnn thrbnhrtmnn removed their assignment Nov 22, 2023
@thrbnhrtmnn thrbnhrtmnn changed the title IconButton & TextButton - fix icon&font color for hover & pressed state TextButton & IconButton - fix icon&font color for hover & pressed state Nov 22, 2023
@DenizSaganak DenizSaganak self-assigned this Nov 27, 2023
@thrbnhrtmnn
Copy link
Contributor Author

Hey @DenizSaganak , I saw the change on develop, so I would just close this issue now. Or is there anything open you still want to do? :-)

@DenizSaganak
Copy link
Contributor

It is merged just now. I moved the ticket to ready for approval to have the design approval in design merge session to be on the safe side :) but it think you can just close the issue.

@thrbnhrtmnn
Copy link
Contributor Author

Nice, I think we can save the time in the design review and do not have to discuss this one :-) I close it now. Thank you!

@thrbnhrtmnn thrbnhrtmnn added the ⌨️ dev issue Task is for developers label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌨️ dev issue Task is for developers 🎓 junior issue Good for juniors 🚨 new::bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants