Skip to content

Conversation

@robertknight
Copy link
Contributor

@robertknight robertknight commented Aug 28, 2025

Make lazy-loading components created by lazy render synchronously (ie. render the actual component on the first render) if the component was already loaded by a previous instance of the lazy wrapper component.

In h the async rendering was causing annotation cards to transition their height slightly after appearing. This change doesn't prevent the animation from happening when annotation cards first appear, but does prevent it on subsequent renders.

Make lazy-loading components created by `lazy` render synchronously (ie. render
the actual component on the first render) if the component was already loaded by
a previous instance of the lazy wrapper component.

In h the async rendering was causing annotation cards to transition their height
slightly after appearing. This change doesn't prevent the animation from
happening when annotation cards first appear, but does prevent it on subsequen
renders.
@robertknight robertknight requested a review from acelaya August 28, 2025 11:00
@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (465a715) to head (bb7dc4a).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2074   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           71        71           
  Lines         1361      1364    +3     
  Branches       509       509           
=========================================
+ Hits          1361      1364    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@acelaya acelaya left a comment

Choose a reason for hiding this comment

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

👍🏼

@robertknight robertknight merged commit 6021430 into main Aug 28, 2025
4 checks passed
@robertknight robertknight deleted the lazy-sync branch August 28, 2025 12:33
robertknight added a commit to hypothesis/h that referenced this pull request Aug 28, 2025
This is a partial fix for an issue where annotation card heights change slightly
after the first render. See hypothesis/frontend-shared#2074.
robertknight added a commit to hypothesis/h that referenced this pull request Aug 28, 2025
This is a partial fix for an issue where annotation card heights change slightly
after the first render. See hypothesis/frontend-shared#2074.
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.

3 participants