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

Fix calculation of width of "view container title" #3866

Merged
merged 1 commit into from Aug 24, 2023

Conversation

cmdcolin
Copy link
Collaborator

This PR fixes a bug observed by @scottcain in chat where the "view title" could sometimes have incorrect width. There was a bad assumption in the code that the "clientWidth" was essentially observable, but this is not the case (it is a static html prop, not part of react, etc).

This PR updates the view title to use our proper ResizeObserver based useMeasure hook to get the width

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Aug 24, 2023
@cmdcolin cmdcolin added bug Something isn't working and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Aug 24, 2023
@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #3866 (6e7d6ed) into main (f8f0a77) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3866      +/-   ##
==========================================
- Coverage   64.45%   64.45%   -0.01%     
==========================================
  Files        1004     1004              
  Lines       29812    29809       -3     
  Branches     7155     7154       -1     
==========================================
- Hits        19216    19213       -3     
  Misses      10430    10430              
  Partials      166      166              
Files Changed Coverage Δ
packages/core/ui/EditableTypography.tsx 56.66% <100.00%> (-3.94%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmdcolin cmdcolin merged commit bf555d0 into main Aug 24, 2023
11 checks passed
@cmdcolin cmdcolin deleted the fix_view_title_width branch August 24, 2023 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant