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

Change "title scroll" functionality so it's based on card/title width #9

Open
FOSSforlife opened this issue Apr 18, 2020 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@FOSSforlife
Copy link
Member

FOSSforlife commented Apr 18, 2020

Right now, when you hover over a CollectionItem, the title begins to scroll left and right if the title is more than 20 characters. We want it to scroll if the title is too long to fit within the card instead.

This should be done by measuring the title and card width, and then setting the "longText" variable to true or false (use useState) based on whether title width > card width.

Will also need to write two tests:

  1. Text scrolls when longText and hovered are true (should already pass).
  2. longText is only true when title width > card width.
@FOSSforlife FOSSforlife added bug Something isn't working good first issue Good for newcomers labels Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant