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

IBX-6883: [PB] Add tooltips for all buttons in header #960

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

GrabowskiM
Copy link
Contributor

@GrabowskiM GrabowskiM commented Oct 27, 2023

Question Answer
Tickets https://issues.ibexa.co/browse/IBX-6883
Bug fix? yes
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

[data-original-title] is used to store original title parameter, as after initializing tooltips BS takes control over title 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 function

hasEllipsisStyle checks for ellipsis style - if there's no such style, tooltip should be always visible. Otherwise, it should be visible only when ... is on screen
hasNewTitle 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 tooltip

When 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:

  1. name has changed - therefore width could change, we calculate if it should be visible now and init/reinit/dispose it
  2. name has not changed; width has changed - we calculate if it should be visible now and init/dispose it

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:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@GrabowskiM GrabowskiM force-pushed the IBX-6883-fix-headers branch from b5fb0aa to 14977cd Compare October 27, 2023 09:00
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@GrabowskiM GrabowskiM requested review from lucasOsti, tischsoic, dew326 and Gengar-i and removed request for lucasOsti and tischsoic October 27, 2023 11:18
@bogusez
Copy link
Contributor

bogusez commented Nov 6, 2023

Regression tests passed.

@dew326 dew326 merged commit 700a7ed into 4.5 Nov 6, 2023
18 checks passed
@dew326 dew326 deleted the IBX-6883-fix-headers branch November 6, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants