Skip to content

Fix column tooltip not repositioning correctly when resizing columns#534

Merged
mofojed merged 1 commit intodeephaven:mainfrom
mofojed:510-column-tooltip-resize
May 2, 2022
Merged

Fix column tooltip not repositioning correctly when resizing columns#534
mofojed merged 1 commit intodeephaven:mainfrom
mofojed:510-column-tooltip-resize

Conversation

@mofojed
Copy link
Member

@mofojed mofojed commented Apr 27, 2022

  • When the column is resized, we were updating props but not calling tooltip.update() to update the existing tooltip
  • Needed to bring the getBoundingClientRect method out of the in line definition - before, even after getting called again, it was just using the old values (what the values were when the function was created). Pulled the latest metrics from this and then it's good.
  • Side note: Because of the order of mouse handlers, the tooltip mouse handler doesn't get an event on click; it's eaten by GridColumnSeparatorMouseHandler. We don't really want to change the order of those mouse handlers, as the tooltip should be a low priority thing (i.e. we don't want to tooltip appearing when hovering over the column separator), so did not adjust the ordering.
  • Fixes Column stats popper becomes detached on column resize #510

- When the column is resized, we were updating props but not calling tooltip.update() to update the existing tooltip
- Needed to bring the getBoundingClientRect method out of the in line definition - before, even after getting called again, it was just using the old values (what the values were when the function was created). Pulled the latest metrics from `this` and then it's good.
- Side note: Because of the order of mouse handlers, the tooltip mouse handler doesn't get an event on click; it's eaten by GridColumnSeparatorMouseHandler. We don't really want to change the order of those mouse handlers, as the tooltip should be a low priority thing (i.e. we don't want to tooltip appearing when hovering over the column separator), so did not adjust the ordering.
- Fixes deephaven#510
@mofojed mofojed added the bug Something isn't working label Apr 27, 2022
@mofojed mofojed added this to the April 2022 milestone Apr 27, 2022
@mofojed mofojed requested a review from mattrunyon April 27, 2022 14:44
@mofojed mofojed self-assigned this Apr 27, 2022
@codecov
Copy link

codecov bot commented Apr 27, 2022

Codecov Report

Merging #534 (9c62826) into main (37f36e4) will decrease coverage by 0.00%.
The diff coverage is 10.00%.

@@            Coverage Diff             @@
##             main     #534      +/-   ##
==========================================
- Coverage   36.38%   36.38%   -0.01%     
==========================================
  Files         390      390              
  Lines       28503    28509       +6     
  Branches     6730     6730              
==========================================
+ Hits        10371    10372       +1     
- Misses      17786    17791       +5     
  Partials      346      346              
Flag Coverage Δ
unit 36.38% <10.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/iris-grid/src/IrisGrid.jsx 28.71% <10.00%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37f36e4...9c62826. Read the comment docs.

@mofojed mofojed merged commit a90c752 into deephaven:main May 2, 2022
@mofojed mofojed deleted the 510-column-tooltip-resize branch May 2, 2022 12:40
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Column stats popper becomes detached on column resize

2 participants