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

Preview: Ensure docs container re-renders when globals change #18711

Merged
merged 2 commits into from Jul 18, 2022

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Jul 14, 2022

Issue: #18477 #18771

What I did

Added a story to demonstrate and ensure that DocsRender always re-renders on globals change

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?

@tmeasday tmeasday requested a review from shilman Jul 14, 2022
@nx-cloud
Copy link

nx-cloud bot commented Jul 14, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 47c51cc. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


Successfully ran 1 target

Sent with 💌 from NxCloud.

@tmeasday tmeasday added bug patch Bugfix & documentation PR that need to be picked to master branch addon: docs labels Jul 14, 2022
@tmeasday
Copy link
Member Author

tmeasday commented Jul 18, 2022

The errors here seem to exist already on next

@shilman shilman self-assigned this Jul 18, 2022
Copy link
Member

@shilman shilman left a comment

Nice tests 💯

@shilman
Copy link
Member

shilman commented Jul 18, 2022

@tmeasday I noticed in QA that when you update the globals the story gets re-rendered twice. Is that intentional? the docs container gets re-rendered once as expected

@shilman shilman changed the title Ensure docs container re-renders when globals change Preview: Ensure docs container re-renders when globals change Jul 18, 2022
@shilman shilman merged commit c9225ab into next Jul 18, 2022
50 of 59 checks passed
@shilman shilman deleted the tom/sb-419-sb18477-changes-to-global-values-do-not branch Jul 18, 2022
@tmeasday
Copy link
Member Author

tmeasday commented Jul 18, 2022

I think the story already got rendered twice, maybe due to strict mode? It might be something that's worth a little bit of investigation, I'll take a look.

@tmeasday
Copy link
Member Author

tmeasday commented Jul 20, 2022

I checked and it does seem like renderToDOM is only getting called once, so we can probably put this down to strict mode.

@shilman shilman added the picked Patch/release PRs cherry-picked to master/release branch label Jul 26, 2022
shilman added a commit that referenced this issue Jul 26, 2022
…-to-global-values-do-not

Preview: Ensure docs container re-renders when globals change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs bug patch Bugfix & documentation PR that need to be picked to master branch picked Patch/release PRs cherry-picked to master/release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants