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 (live-preview): populates Lexical - blocks and inline blocks relations are not populated #8275

Open
tsemachh opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels
live-preview @payloadcms/live-preview plugin: richtext-lexical @payloadcms/richtext-lexical status: needs-triage Possible bug which hasn't been reproduced yet v3

Comments

@tsemachh
Copy link

Link to reproduction

No response

Environment Info

Node.js v22.8.0

Binaries:
  Node: 22.8.0
  npm: 10.8.2
  Yarn: N/A
  pnpm: 9.4.0
Relevant Packages:
  payload: 3.0.0-beta.104
  next: 15.0.0-canary.104
  @payloadcms/db-mongodb: 3.0.0-beta.104
  @payloadcms/graphql: 3.0.0-beta.104
  @payloadcms/live-preview: 3.0.0-beta.104
  @payloadcms/next/utilities: 3.0.0-beta.104
  @payloadcms/plugin-cloud-storage: 3.0.0-beta.104
  @payloadcms/richtext-lexical: 3.0.0-beta.104
  @payloadcms/storage-s3: 3.0.0-beta.104
  @payloadcms/translations: 3.0.0-beta.104
  @payloadcms/ui/shared: 3.0.0-beta.104
  react: 19.0.0-rc-06d0b89e-20240801
  react-dom: 19.0.0-rc-06d0b89e-20240801
Operating System:
  Platform: linux
  Arch: x64
  Version: #44-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 13 13:35:26 UTC 2024
  Available memory (MB): 31817
  Available CPU cores: 8

Describe the Bug

When author enter inline blocks or block if the block has relation field like upload or any other relation.
The data in the live preview message does not contain the document of the relation.
For now there's a need to call API for each relation and sometimes the live preview is not responding

Reproduction Steps

Clone:
https://github.com/tsemachh/payload/tree/bug(live-preview)-LexicalRelationsNotExpanded
pnpm dev live-preview
Debug on :
webpack://_N_E/packages/live-preview/src/traverseRichText.ts?7b26
Add to Test tab to the lexical content media block and see that it doesn't expand it regardless the depth provided
Example of debug:
image

Adapters and Plugins

No response

@tsemachh tsemachh added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels Sep 18, 2024
@tsemachh
Copy link
Author

Actually without this working , we are moving back to regular preview , it's much more solid than this one

@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Sep 24, 2024
@AlessioGr AlessioGr added status: needs-triage Possible bug which hasn't been reproduced yet plugin: richtext-lexical @payloadcms/richtext-lexical live-preview @payloadcms/live-preview labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
live-preview @payloadcms/live-preview plugin: richtext-lexical @payloadcms/richtext-lexical status: needs-triage Possible bug which hasn't been reproduced yet v3
Projects
None yet
Development

No branches or pull requests

3 participants