IBX-6883: [PB] Add tooltips for all buttons in header #960
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[data-original-title]
is used to store originaltitle
parameter, as after initializing tooltips BS takes control overtitle
parameter and I want to have reliable way of retrieving og value ("If you want something done right, do it yourself")initializeTooltip
method is almost the same code as before (minus disposing tooltip instance) just moved to new functionhasEllipsisStyle
checks for ellipsis style - if there's no such style, tooltip should be always visible. Otherwise, it should be visible only when...
is on screenhasNewTitle
tracks if title was changed by dev - as BS removes completely this value, if it's there at next parsing, it means dev wants to change it.tooltipInitialized
checks if given node was already parsed and is ready to show tooltipWhen node has no ellipsis styles we ALWAYS want to show tooltip, so in general after first
parse()
we don't have to touch it again, except when title has changed (disposing and initializng is necessary to update tooltip content)When node has ellipsis styles we have cases:
We ALWAYS remove
title
, as when element has ellipsis styles, has title, but shouldn't have tooltip (no...
visible) there should be no native title/tooltip as well.Checklist:
$ composer fix-cs
)