-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Implemented a Tooltip plugin to handle the JS-driven tooltip system across the UI #12262
Conversation
|
Short answer: This works great. Let's go for it :) |
Some issues that I noticed: Content changes affecting toolbar position
Actual: tooltip gets mispositioned. Collaboration.tools._.Classic.-.Google.Chrome.2022-08-16.13-21-02.mp4Find and replace
Actual: Tooltip is offset to bottom. The problem comes from the fact that "replace with" adds this tip that changes the height of the dropdown. If you move focus in the reverse order this does not happen. Manual.Test.-.Google.Chrome.2022-08-16.13-16-27.mp4Tooltips not hiding after clicking the buttonI believe this is a small nuisance but somehow it sticks to my eye a lot during clicking 😅 Previously tooltip got hidden upon clicking a button. Now it stays there until you move your cursor. Actual: Collaboration.tools._.Classic.-.Google.Chrome.2022-08-16.13-28-23.mp4Before: Collaboration.tools._.Classic.-.Google.Chrome.2022-08-16.13-30-17.mp4Having it the way it is proposed now makes me feel like after clicking I'm partially in previous stage of my interaction and partially in the new stage (interacting with the dropdown content). |
…rators change it.
…ts position is always accurate after a delay because DOM could change in the meanwhile.
…in SW and SE positions.
…the TooltipView class.
…n class to disable tooltips on an element. Removed remaining TooltipView CSS and mixins.
…bute to allow visual customizations.
…d tooltips from multiple editor instances.
…owHorizontalOffset to sideOffset.
… property connection.
…oltipManager correctly.
@ckeditor/qa-team Could you please take a look at this PR? Scope:
|
@dufipl @Acrophost could you please take a look at this PR? |
Tooltip going out of the screen when editor is sticking to edge of the screen still persist on one of our documentation examples after build
(edit: it has nothing to do with #10939, although this issue can't be fully closed due to grouped toolbar still cutting off) |
Suggested merge commit message (convention)
Feature (ui): Implemented a
TooltipManager
class to manage UI tooltips across components and features. Closes #12067.MINOR BREAKING CHANGE (ui): The
TooltipView
UI component has been removed, please use the new tooltip API instead. Please note that this change does not affect integrations that configure tooltips usingButtonView#tooltip
property.MINOR BREAKING CHANGE (ui): The static properties of
BalloonPanelView
have been renamed.BalloonPanelView.arrowVerticalOffset
isheightOffset
andBalloonPanelView.arrowHorizontalOffset
issideOffset
.Other issues that most likely got fixed (to be checked individually):
TooltipView
.Status of things.
This is a WIP without tests (although quite prod-ready)BalloonPanelView
) and gets controlled by JS.data-
set on DOM elements. If an element has these attributes (e.g. a button), the system will display a tooltip when it gets hovered/focused.Also:
BalloonPanelView
got two new positions (west and east)Concerns
The implementation is a plugin and the plugin needs to be loaded.Essentials
, we have tons of tests that do not loadEssentials
. Same with integrators, they could miss it.View
class (so that when you use anyView
, you get tooltips support out of the box). This isn't going to be pretty, to say the least (the implementation usesBalloonPanelView
that requiresView
on its own...)The implementation is listening to DOM events on the document: What about iframes?Previous implementation offered a chance change the tooltip text dynamically when it is displayed. The new one will only update text when the tooltip gets hidden and shows up again. This is because the new implementation is based ondata-
attributes of HTML elements.The implementation is affected by the technical debt of the balloon panel system, notably when the editor is located in a scrollable containerTODOs
BalloonPanelView.arrowVerticalOffset
→BalloonPanelView.arrowHeightOffset