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: Default select to viewMode story #18370

Merged
merged 1 commit into from May 31, 2022

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented May 31, 2022

Issue: #18347

Telescoping on #18369

When setCurrentStory is emitted with a storyId but no viewMode, no view mode is set, and our code defaults to docs in some places.

What I did

Ensure we always set a view mode.

How to test

  • Is this testable with Jest or Chromatic screenshots?
  1. Open any storybook's iframe.html without a selection
  2. Run __STORYBOOK_ADDONS_CHANNEL__.emit('setCurrentStory', { storyId: '$STORY_ID' }) where $STORY_ID is a story in the Storybook
  3. Check the URL includes viewMode=story

@nx-cloud
Copy link

nx-cloud bot commented May 31, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 05740e6. 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 changed the base branch from next to refactor-preview-web-tests May 31, 2022 05:28
Base automatically changed from refactor-preview-web-tests to next May 31, 2022 06:10
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label May 31, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@shilman shilman changed the title Default select to viewMode story Preview: Default select to viewMode story May 31, 2022
@shilman shilman merged commit b689333 into next May 31, 2022
@shilman shilman deleted the tom/sb-393-sb18347-showpreparingdocs-applies branch May 31, 2022 06:19
shilman added a commit that referenced this pull request Jun 3, 2022
…paringdocs-applies

Preview: Default select to `viewMode` story
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants