-
Notifications
You must be signed in to change notification settings - Fork 36
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
Use a tooltips library #3002
Use a tooltips library #3002
Conversation
Without contexts Without having to rewrite all the usages Just listens for hover on elements with "title" attribute and uses that title as a tooltip text Thus, you don't have to know how to use our tooltip library to use it. A pit of success!
Triggered by 177fe66 on branch refs/heads/tooltips
Screen.Recording.2023-02-16.at.6.53.20.AM.movI'm not sure that having the tooltip jump from one item to another between hovering. I don't think it should be jumping around if possible. It looks great on the side navigation menu but it should only shift if the items are within 2-3 items of each other. I know that might be complicated to implement, so it would be worth changing shifting behavior if it is difficult. |
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.
There are a number of usability concerns I have about the current implementation– many of which may be resolved by making the hover requirement a longer period of time before displaying the tooltips.
The navigation menu items should have the tooltip display at the current speed, but not every button or field in my opinion.
Another issue– if you have a tooltip open and the dialog changes or disappears the tooltip remains: See "Edit" in this instance
Screen.Recording.2023-02-16.at.7.05.25.AM.mov
We can, but those fixed would have to be applied on case-by case basis (if translation is longer in some language, the UI breaks; if tooltip is near the edge of the screen, the max width has to be small). Instead, I enabled a special feature in the tooltip library that would auto shift the tooltip to fit on the screen: |
It's a bug. Caused by animations being enabled (we have a global style saying all transitions should be animated - most of the time it's good - exceptions are the dialog drag and the tooltip move). I had animations off so didn't detect this. Should be fixed now.
@grantfitzsimmons though, there is another question. I made tooltips have an 800ms delay before being shown for the first time, but then if you move your mouse to another element, the tooltip for the new element is displayed right away (assuming you moved you mouse to new element within the 1000ms threshold). Should I change that behavior to require 800ms for each hover? or maybe some smaller number? For reference, I added an exception for the the side menu tooltips so they don't have any delay Or would you like me to temporarily add user prefs for customizing these timeout durations so that we can fine-tune them and set good defaults? |
Fixed. Tooltip is now automatically closed if you click on the element that triggered the tooltip (i.e, clicked on the "Edit" button), or the element was removed (you clicked the "ESC" key to close the dialog while hovering over the "Edit" button) |
They are not needed now that tooltips call it automatically
Triggered by 45534d2 on branch refs/heads/tooltips
Put tooltip at the bottom always, unless manually said otherwise or there is not enough space Fixes #3009
Fixes #3009 |
Added a shadow |
@grantfitzsimmons If this is good now, we can merge it and release |
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.
Ok– you have won me over. There is more work to do here, so don't think this is the last time we will see tooltip tomfoolery
@maxpatiiuk Just need to resolve the conflict & we can release |
This pull request has been mentioned on Specify Community Forum. There might be relevant details there: https://discourse.specifysoftware.org/t/specify-7-8-6-release-announcement/1064/1 |
To test:
Some bugs found so far:
Overlaps with content:
Causes page overflow: