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

UI: Fix document title not updating #8056

Merged
merged 2 commits into from
Sep 25, 2019

Conversation

lonyele
Copy link
Member

@lonyele lonyele commented Sep 12, 2019

Issue: #866

What I did

I extracted storyInfo and passed it to <Helmet /> so that it can refresh document title.

How to test

  • Is this testable with Jest or Chromatic screenshots? Should later add tests to lib/ui package
  • Does this need a new example in the kitchen sink apps? No
  • Does this need an update to the documentation? No

@vercel
Copy link

vercel bot commented Sep 12, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-fork-lonyele-fix-changing-document-title.storybook.now.sh

@ndelangen ndelangen merged commit f6365a9 into storybookjs:next Sep 25, 2019
@ndelangen ndelangen modified the milestones: 5.3.0, 5.2.x Sep 25, 2019
@ndelangen ndelangen added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Sep 25, 2019
@lonyele
Copy link
Member Author

lonyele commented Sep 25, 2019

@ndelangen I should have explained more context for better code review experience, I can't really spend much time on opensource right now...(recruiting process...)
Just more info, It would have been better if I could find why selected is undefined and fix this part. Instead, I used storiesHash for finding the story info we are looking for. The reason for this implementation is that as I know of storiesHash is the core data structure and selected is some derived state from clicking or routing. I simply thought using this core data is more reliable in the long run.

@lonyele lonyele deleted the fix/changing-document-title branch September 25, 2019 10:42
@ndelangen
Copy link
Member

@lonyele thanks for the clarification.

I tested the solution and it worked. I'll revisit the code and the reason why we had to do this at a later stage. Thanks for the time you've invested already. You're welcome back anytime! 💯 👏

@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Oct 7, 2019
shilman pushed a commit that referenced this pull request Oct 7, 2019
UI: Fix document title not updating

Co-authored-by: Norbert de Langen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants