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

Viewport: Store viewport, rotation in globals #25321

Closed
wants to merge 6 commits into from

Conversation

shilman
Copy link
Member

@shilman shilman commented Dec 26, 2023

Closes N/A

Redo of #23448

What I did

Instead of storing the viewport & rotation in addon state, store them in globals.

This has two benefits:

  1. users can now set the viewport via globals URL parameters:
    a. viewport controls device settings
    b. viewportRotated controls device orientation
  2. gets us a step closer to using globals across our toolbar addons

How to test

  1. Fire up a sandbox
  2. Adjust the viewports in Page stories & note URL changes
  3. Navigate between stories
  4. Navigate to the viewport stories in the sandbox and do the same

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@shilman
Copy link
Member Author

shilman commented Jan 3, 2024

closing in favor of #25423

@shilman shilman closed this Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant