Skip to content

Conversation

@stutijain2006
Copy link

This PR fixes incorrect tooltip placement by

  • Supporting dynamic positioning like top, bottom, left and right
  • Using correct selector for main/aux toolbar icons.
  • Removes hardcoded positioning of various buttons.

Fixes #4809

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

js/toolbar.js Outdated
console.log("Tooltip override block REACHED!");
const icons = Array.from(document.querySelectorAll('.tooltipped'));
const right_icons = Array.from(document.querySelectorAll('ul.main.right a'));
const left_below_icons = Array.from(document.querySelectorAll('ul.aux.ledt a'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ledt?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

she meant left probably

index.html Outdated
</li>
<li>
<a id="stop" class="left tooltipped"><i class="material-icons main">stop</i></a>
<a id="stop" class="left tooltipped"><i class="material-icons main ">stop</i></a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you adding the space?

@walterbender
Copy link
Member

Can you be clear about what changes in the UX from this PR?

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@stutijain2006
Copy link
Author

Can you be clear about what changes in the UX from this PR?
In order to make the interface simpler and more user-friendly, this PR enhances the tooltip behavior.

Earlier tooltips used to have a fixed position. As a result:

  1. Sometimes adjacent buttons were covered by tooltips, making them difficult or impossible to click.
  2. Additionally, tooltips may overlap dropdown content, preventing interaction and visibility.

With this modification:

  1. The positioning of tooltips is now dynamic.
  2. Depending on the available space, each tooltip modifies its position.
  3. Other buttons and dropdown items are no longer covered by tooltips.
  4. Without having to shift the cursor, users can effortlessly interact with all controls.

In general, this results in a cleaner, easier-to-use, and less annoying user interface, particularly when interacting with closely spaced buttons.

Also, Some changes in the diff are due to automatic code formatting applied by my IDE.
These include whitespace adjustments and indentation fixes. No functional logic
was altered in those sections.

@theAnuragMishra
Copy link

I believe this is too much for something as simple as tooltips.
I gave your changes a look. To me it looks like you'll be adding event listeners and configuring tooltips for every icon on every mouse event related to hover. Too much imo. Maybe even causes performance issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI Bug (Hover Blockage)

3 participants