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

Improve our tooltip #38

Open
caepenna opened this issue Aug 22, 2017 · 0 comments
Open

Improve our tooltip #38

caepenna opened this issue Aug 22, 2017 · 0 comments

Comments

@caepenna
Copy link
Contributor

caepenna commented Aug 22, 2017

Basic guidance for this issue

These are the base files used to build our current tooltip:

src/core/static/js/modules/tooltip.js
src/core/static/styles/components/_tooltip-box.scss

We'd like to keep our triggering concept intact, which is:
Any element that we include a data-tooltip="text content" and data-hide-tooltip="false" will trigger the tooltip to show itself with its "text content".

See it in action:
By adding an element with those data attributes yourself. Or...
By clicking in one of the red buttons inside an agenda, then hover on a disabled button:

pauta issue tooltip

With that in mind, we'd like to:

  • Adapt its size based on its content, instead of resorting to an arbitrary min-width value. And it should only break lines when it reaches its max-width value

  • Make it work when close to the edge of the screen. As of today, a section of the tooltip will overflow to the outside of the screen 😱

  • Bonus item* Make it work properly when inside absolute or fixed positioned elements (We'll accept PRs that don't necessarily fix this, as I believe it might need a larger refactor of the current working code while adding plenty of JS)

@cfviotti cfviotti changed the title Fix tooltip problems Improve our tooltip Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants