Skip to content

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Sep 19, 2025

  • Updates Parcel to improve code splitting and fix styling issues.
  • Removes card descriptions, which avoids pulling in 10MB of docs json.
  • Code splits search menu so it only loads the contents when it first opens
  • Code splits the illustrations page so only the svgs for the active illustration type gets loaded (though it's still pretty big)
  • Only includes English translations in the bundle since we hard code the Provider to en-US anyway

@devongovett devongovett marked this pull request as draft September 19, 2025 00:56
matches changes in Parcel for ReactStaticPackager
@rspbot
Copy link

rspbot commented Sep 19, 2025

return document.getCollection();
}, [document]);
let collection = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
useLayoutEffect(() => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Bug found on the illustrations page when wrapping a collection in Suspense: when switching illustration types, the content would not update in the collection. This was because during Suspense React "unmounts" effects by calling their cleanup functions, but doesn't actually remove the component from the DOM. Before it re-mounts the effect, it removes the old content from the collection. We had this optimization where we ignored removals when unmounted, so these would never be processed. I tested in Storybook with our large collection stories and didn't notice a performance issue without this, so perhaps we fixed the original issue somewhere else in the meantime.

@devongovett devongovett marked this pull request as ready for review September 19, 2025 23:30
@rspbot
Copy link

rspbot commented Sep 19, 2025

snowystinger
snowystinger previously approved these changes Sep 22, 2025
@rspbot
Copy link

rspbot commented Sep 22, 2025

LFDanLu
LFDanLu previously approved these changes Sep 22, 2025
@rspbot
Copy link

rspbot commented Sep 22, 2025

@devongovett devongovett added this pull request to the merge queue Sep 22, 2025
Merged via the queue into main with commit ac96fa1 Sep 22, 2025
32 checks passed
@devongovett devongovett deleted the update-parcel branch September 22, 2025 20:58
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.

4 participants