-
Notifications
You must be signed in to change notification settings - Fork 108
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
TCCP: Add tooltip with purchase APR context #8483
Conversation
I realize that my original mock-up was using the black with reversed type, but I was thinking we'd follow the style Grad path developed so that we were consistent. Which is gray-5 background with gray-40 border. |
@caheberer colors updated in latest commit: ![]() |
Thanks for the colors update! Other design tweaks for @contolini
Do we want to expand the width of this so that it takes up less vertical space? I was using two columns (full width on mobile). It doesn't save that much room, so if there's a reason it's this size that's okay too. |
@caheberer here's the latest updates that I added to this PR. LMK if you want me to reduce the outer padding.
|
To test, run a local server and visit http://localhost:8000/consumer-tools/credit-cards/explore-cards/cards/. Mouseover the question mark icon. This implementation works without JavaScript but needs work for mobile. Placement also needs to be moved above the icon per latest design.
Installs a small third-party JS library called tippy.js to assist with accessible tooltips. Also adds a CFPB theme for the tooltips. See https://kabbouchi.github.io/tippyjs-v4-docs/
TCCP tooltips are children of anchor tags so tapping them causes the link to be followed instead of showing the tooltip. The anchors are now checked to see if a tooltip is the event.target and ignored if so.
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.
Merging in preparation for user testing. Further improvements TBD.
Looks good to me! One tiny thing that doesn't need to happen before testing—could we add a line break before the date range on mobile? |
@caheberer Yeah most def |
To test, run a local server and visit http://localhost:8000/consumer-tools/credit-cards/explore-cards/cards/. Mouseover the question mark icon.
This implementation works without JavaScript but needs work for mobile. Placement also needs to be moved above the icon per latest design.
Screenshots
Checklist
/docs
folder) – for basic, close-to-the-code docs on working with this repoFront-end testing
Browser testing
Check the current browser support cutoff list](https://cfpb.github.io/consumerfinance.gov/browser-support#current-browser-support-metrics) for browsers that are advisable
to prioritize for testing.
Accessibility
Other