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

Make input fields translucent #2717

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Make input fields translucent #2717

merged 1 commit into from
Jul 13, 2023

Conversation

robinandeer
Copy link
Contributor

Describe your changes

  • Change background color of input fields to "translucent 1"

  • Update useHighlightAnimation hook to use JS animations instead of framer motion

  • Fix highlight animation for horizontal radio group inputs

Justify why they are needed

  • I had to switch from framer motion to JS animations becuase framer motion has difficulties tweening colors with alpha values. I also think the new impolementation is slightly easier to understand.

  • The new solution returns a ref which you attatch to the element you want to animate. In the few cases where we already use the ref, I decided to add a wrapper div around it and animate that (e.g. Combobox).

  • We want the inputs to be translucent to work better in the price calculator which has a blurred background on mobile.

Checklist before requesting a review

  • I have performed a self-review of my code

@robinandeer robinandeer requested a review from a team as a code owner July 7, 2023 14:23
@vercel
Copy link

vercel bot commented Jul 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hedvig-dot-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 10:08am
onboarding ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2023 10:08am

@robinandeer
Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

Copy link
Contributor

@guilhermespopolin guilhermespopolin left a comment

Choose a reason for hiding this comment

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

Looks good :)
The new implementation for the animations is easier understand as you've mentioned.

Copy link
Member

@gustaveen gustaveen left a comment

Choose a reason for hiding this comment

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

Good job!

Copy link
Contributor

@guilhermespopolin guilhermespopolin left a comment

Choose a reason for hiding this comment

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

@robinandeer robinandeer merged commit e41ab6f into main Jul 13, 2023
@robinandeer robinandeer deleted the update/translucent-inputs branch July 13, 2023 08:18
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.

3 participants