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

ServerSideRender: Some attribute updates are not reflected immediately #69220

Open
2 of 6 tasks
t-hamano opened this issue Feb 17, 2025 · 1 comment · May be fixed by #69237
Open
2 of 6 tasks

ServerSideRender: Some attribute updates are not reflected immediately #69220

t-hamano opened this issue Feb 17, 2025 · 1 comment · May be fixed by #69237
Labels
[Feature] Block API API that allows to express the block paradigm. [Package] Server Side Render /packages/server-side-render [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Feb 17, 2025

Description

Related issues:

In dynamic blocks using the ServerSideRender component, changes to attributes such as block supports should cause the component to be re-rendered.

However, it seems that some block supports are not reflected immediately and require a browser reload.

We still don't know the root cause, but this comment might be the closest to the answer.

Step-by-step reproduction instructions

Below are the test steps for the Calendar block.

  • Add Calendar Block
  • Change the text colour & background colour
  • Now you can not see any changes on the editor side but when we preview we can see the changes in frontend
  • On Refresh the page now we can see the changes in the editor

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@yogeshbhutkar
Copy link
Contributor

I tried investigating the issue and found that it arises because the debounced function call gets canceled as the debounce function changes/re-creates due to the props getting changed. I've created a PR above to fix this and added an explanation for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Package] Server Side Render /packages/server-side-render [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants