Skip to content

fix(font): avoid serializing full p5.Font data in previewEntry and IDE hook #3461

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lirenjie95
Copy link

@lirenjie95 lirenjie95 commented Apr 23, 2025

Fixes #3441

Changes:

  • In client/utils/previewEntry.js, add handleP5Font to extract only essential fields (name, path, face.family/style/weight) instead of the entire font data.
  • In client/modules/IDE/hooks/useHandleMessageEvent.js, update restoreP5Font to reconstruct a simplified font‐like object for console display.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

Copy link

welcome bot commented Apr 23, 2025

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@lirenjie95 lirenjie95 force-pushed the fix/stringify branch 4 times, most recently from 4e6d6cc to 9847f9d Compare April 24, 2025 10:05
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.

Attempting to stringify large variable results in an error log
1 participant