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

Add previewMediaType flag for simpler node preview rendering #2694

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

christian-byrne
Copy link
Collaborator

@christian-byrne christian-byrne commented Feb 23, 2025

This PR simplifies node preview rendering by setting a previewMediaType property on the node, rather than traversing the entire node in search of widgets with specific options (image_upload, video_upload, etc.) within every frame cycle. The responsibility for setting the media type falls to:

  • For media uploaded from the client: The preview constuctor (useNodeImage, useNodeVideo, AUDIOUPLOAD, etc.)
  • For media created on the backend: The server via fields in the result items of the response

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested a review from a team as a code owner February 23, 2025 18:42
@christian-byrne christian-byrne marked this pull request as draft February 23, 2025 19:03
@christian-byrne christian-byrne marked this pull request as ready for review February 24, 2025 11:09
@huchenlei huchenlei merged commit a35071f into main Feb 24, 2025
9 of 10 checks passed
@huchenlei huchenlei deleted the preview-media-type branch February 24, 2025 15:48
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.

2 participants