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

Bug: version switcher of compositions #21621

Merged
merged 5 commits into from Mar 20, 2023

Conversation

ndelangen
Copy link
Member

Closes #21505

What I did

  • I ensured the version switcher closes when you click outside
  • I ensure the version switcher closes when you click another version
  • I ensured the ref enters a loading state when a new version is being requested

How to test

  • add a ref
  refs: {
    'design-system': {
      title: 'Design System',
      url: 'https://master--5ccbc373887ca40020446347.chromatic.com',
    },
  },

... to code/ui/.storybook/main.ts

  • start the ui storybook
  • open the browser
  • go to the ref
  • change version

Expect that the version switcher closes
Expect that the ref enters the loading state
Expect that after some time, the ref shows again, and the same story is still selected. (assuming the same sotry existed in the other version)

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

LGTM @ndelangen! I noticed that the ref still starts off in the error state before it loads the first time. I'm not sure if that was something this PR was targetting as well, but I thought I'd mention it.

code/lib/manager-api/src/lib/stories.ts Outdated Show resolved Hide resolved
@ndelangen
Copy link
Member Author

I noticed that the ref still starts off in the error state before it loads the first time. I'm not sure if that was something this PR was targeting as well, but I thought I'd mention it.

Will try to fix that in another PR.

@ndelangen ndelangen merged commit 8814ac3 into next Mar 20, 2023
18 checks passed
@ndelangen ndelangen deleted the norbert/bug-composition-version-switcher branch March 20, 2023 11:30
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.

[Bug]: Composition - version switcher doesn't close, no visual feedback
3 participants