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(issues): Avoid animating tags on initial load #76762

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

scttcper
Copy link
Member

On page load, the tags animate in and all are rendered regardless of if they're expanded or not. Using AnimatePresence allows us to avoid the initial render animation and skip rendering collapsed tags and their mouse listeners and tooltips.

example of route navigation causing a rerender that causes the tags to animate again even thought the data is unchanged.

CleanShot.2024-08-29.at.15.10.14.mp4

On page load the tags animate in and all are rendered regardless of if they're expanded or not. Using AnimatePresence allows us to avoid the initial render animation and skip rendering collapsed tags and their mouse listeners and tooltips.
@scttcper scttcper requested review from edwardgou-sentry and a team August 29, 2024 22:12
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 29, 2024
Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...nts/group/tagFacets/tagFacetsDistributionMeter.tsx 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #76762      +/-   ##
==========================================
+ Coverage   73.64%   78.16%   +4.52%     
==========================================
  Files        6914     6914              
  Lines      307575   307571       -4     
  Branches    50431    50429       -2     
==========================================
+ Hits       226499   240416   +13917     
+ Misses      74557    60777   -13780     
+ Partials     6519     6378     -141     

Copy link
Contributor

@edwardgou-sentry edwardgou-sentry left a comment

Choose a reason for hiding this comment

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

nice!

@scttcper scttcper merged commit e73c3e9 into master Sep 3, 2024
43 checks passed
@scttcper scttcper deleted the scttcper/avoid-rendering-tags branch September 3, 2024 16:25
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants