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

Fixed droplet tooltips so they no longer cover blocks #33920

Merged
merged 1 commit into from Mar 31, 2020

Conversation

jmkulwik
Copy link
Contributor

@jmkulwik jmkulwik commented Mar 30, 2020

On levels where applab starts in design mode, we hit an issue where the toolbox block tooltip would cover an an entire block. This made it difficult to click the block.
image

This happened because the block and toolbox locations were calculated while in design mode when the two had not yet been created.

This PR fixes this issue by waiting to calculate the tooltip location until the block and toolbox has been rendered.

image

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@@ -87,6 +87,13 @@ DropletBlockTooltipManager.prototype.installTooltipsForCurrentCategoryBlocks_ =
const hoverDivRect = blockHoverDiv.getBoundingClientRect();
const toolboxRight = $('.droplet-palette-scroller').width();
const offsetX = Math.min(hoverDivRect.width, toolboxRight);
if (offsetX === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible offsetX could ever be 0 at a time when we would want to render the tooltip?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't been able to find a case like that so far. Curious if you have any suggestions?

@jmkulwik jmkulwik merged commit c8b6fc3 into staging Mar 31, 2020
@jmkulwik jmkulwik deleted the fix-applab-tooltips branch March 31, 2020 16:08
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.

None yet

2 participants