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

Refine getServerState() & getServerContext() docs #67499

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

michalczaplinski
Copy link
Contributor

Implements comments from #66104

  1. Clarify that since getServerState() and getServerContext() are reactive, if the value of a property doesn’t change, the watch callback will not re-trigger.
  2. Fix the code snippets to correctly include the HTML tags (comment)
  3. Add note about local context (comment)

Copy link

github-actions bot commented Dec 2, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: michalczaplinski <czapla@git.wordpress.org>
Co-authored-by: luisherranz <luisherranz@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

github-actions bot commented Dec 2, 2024

Flaky tests detected in d4f57f4.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12127083014
📝 Reported issues:

Copy link
Member

@luisherranz luisherranz left a comment

Choose a reason for hiding this comment

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

LGTM now. Thanks, Michał.

@michalczaplinski michalczaplinski merged commit e0341a4 into trunk Dec 4, 2024
64 of 66 checks passed
@michalczaplinski michalczaplinski deleted the docs/interactivity-get-server-state-fixes branch December 4, 2024 12:02
@github-actions github-actions bot added this to the Gutenberg 19.9 milestone Dec 4, 2024
michalczaplinski added a commit that referenced this pull request Dec 5, 2024
* `getServerState()` & `getServerContext()` docs: Add note about reactivity.

* Fix the code snippets

* Add note about local context

* Fix param order and function name

* Remove the namespace and use the correct functions

Co-authored-by: michalczaplinski <czapla@git.wordpress.org>
Co-authored-by: luisherranz <luisherranz@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants