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

Release: Prerelease 7.5.0-alpha.5 #24363

Closed
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
8c5354b
update react-docgen to 6.0.0-rc.9
danez Apr 30, 2023
0d5b7fd
Merge branch 'next' into pr/danez/22324
ndelangen May 22, 2023
a26c431
fix type issues
ndelangen May 22, 2023
f9b9e76
fix: update to 6.0 final
danez Jun 21, 2023
056719f
Merge branch 'next' into pr/danez/22324
ndelangen Jun 21, 2023
1f0fc81
Merge branch 'next' into react-docgen
ndelangen Jun 21, 2023
d174979
Upgrade to react-docgen 6.0.2
shilman Aug 13, 2023
e874745
Merge branch 'next' into pr/22324
shilman Aug 13, 2023
c6ab522
Docs-tools: Fix react-docgen enum handling
shilman Aug 13, 2023
7875282
Merge branch 'next' into shilman/fix-react-docgen-enum
shilman Aug 22, 2023
f5430d3
rename release preparement workflows
JReinhold Aug 28, 2023
8d582d7
merge stable to latest-release instead of next-release, resolving mer…
JReinhold Aug 29, 2023
1161b7a
more renaming of new release workflows
JReinhold Aug 29, 2023
d6297bf
only commit changelog changes when there are actual changes
JReinhold Aug 30, 2023
670bc51
add comments
JReinhold Aug 30, 2023
d5df684
simplify
JReinhold Aug 30, 2023
431ec63
ensure next is always ahead of main during stable releases
JReinhold Aug 31, 2023
5075165
improve readability of publish script
JReinhold Aug 31, 2023
44e988c
pul all release workflows in same concurrency group
JReinhold Aug 31, 2023
bff632d
add todos
JReinhold Sep 1, 2023
8eddd45
Merge branch 'next' of github.com:storybookjs/storybook into release-…
JReinhold Sep 8, 2023
ba8e5fe
cancel any release-preparation runs in progress
JReinhold Sep 8, 2023
a84e270
cleanup
JReinhold Sep 8, 2023
e1a2172
only consider open PRs when looking for frozen state
JReinhold Sep 8, 2023
4d569f2
update tests
JReinhold Sep 8, 2023
79bc783
React-vite: TS strict mode
shilman Sep 11, 2023
33e677c
Merge branch 'next' into shilman/fix-react-docgen-enum
shilman Sep 11, 2023
796f4a5
Merge branch 'next' into shilman/fix-react-docgen-enum
shilman Sep 13, 2023
d620a34
Update snapshots for improved react-docgen enum handling
shilman Sep 13, 2023
72a8744
Fix default next image loader when src has params
hazzard993 Sep 15, 2023
984d156
Use URL to fix next image loader src params
hazzard993 Sep 15, 2023
c4ba760
Remove double default in next image default loader
hazzard993 Sep 15, 2023
a683939
Merge branch 'next' into fix-next-image-search-params
ndelangen Sep 19, 2023
cb39a1f
Merge branch 'next' into fix-next-image-search-params
ndelangen Sep 21, 2023
00a9089
Merge branch 'next' of github.com:storybookjs/storybook into release-…
JReinhold Sep 24, 2023
4bf6ba4
cleanup
JReinhold Sep 24, 2023
25ebf5c
fix type errors
JReinhold Sep 24, 2023
cc55c3d
added info about emit() function
ATREAY Sep 25, 2023
32ba0d9
Merge branch 'next' of github.com:storybookjs/storybook into release-…
JReinhold Sep 25, 2023
9ca7ed4
cancel when 0 patches to pick
JReinhold Sep 25, 2023
22f12e6
temp rename workflow to test
JReinhold Sep 25, 2023
e719c53
try number when reading pr-count
JReinhold Sep 25, 2023
d757590
compare less than 1
JReinhold Sep 25, 2023
8466a08
check non-null in pr count
JReinhold Sep 25, 2023
d83d422
rename patch workflow
JReinhold Sep 25, 2023
74040b7
Merge branch 'next' into fix-next-image-search-params
valentinpalkovic Oct 2, 2023
2b29cfb
Add code to let the preview decide which story to view if the URL doe…
ndelangen Oct 2, 2023
773d650
Merge branch 'next' into norbert/fix-24292
ndelangen Oct 2, 2023
dee3552
fix unit test
ndelangen Oct 2, 2023
543871f
Update docs to point to addon-styling-webpack
Oct 2, 2023
bc8a496
Use the same Image Context for ESM and CommonJS
martinnabhan Oct 3, 2023
4c49a5a
change test, to hopefully also pass on CI
ndelangen Oct 3, 2023
cea5d61
Fix zone.js legacy deep import
greut Oct 3, 2023
6f5dcd9
Add note about when to use styling addon
Oct 3, 2023
7da1046
Merge branch 'next' into storybook
jonniebigodes Oct 3, 2023
31704fc
Merge branch 'next' into shilman/fix-react-docgen-enum
shilman Oct 3, 2023
c78890f
React: Fix react-docgen handling for arrays, records, functions
shilman Oct 2, 2023
617666d
Fix types
shilman Oct 3, 2023
60748de
Fix snapshots
shilman Oct 3, 2023
723481e
Update CHANGELOG.md for v7.4.6 [skip ci]
storybook-bot Oct 3, 2023
ac738ec
Restore chromatic ignore
shilman Oct 3, 2023
1073829
Merge branch 'next' into storybook
ATREAY Oct 4, 2023
9fe358f
Merge branch 'next' into shilman/fix-react-docgen-enum
shilman Oct 4, 2023
109eb20
Merge pull request #23825 from storybookjs/shilman/fix-react-docgen-enum
shilman Oct 4, 2023
fb3568f
Revert "disable Angular 15 sandbox in CI"
valentinpalkovic Oct 4, 2023
1404929
Add debugWebpack option to Angular schema
valentinpalkovic Oct 4, 2023
ca7f6f8
hotfix -> patch, next-release -> non-patch-release
JReinhold Oct 4, 2023
15b5933
more renaming
JReinhold Oct 4, 2023
37d6cd5
Downgrade file-system-cache
valentinpalkovic Oct 4, 2023
fb06301
Fix types
valentinpalkovic Oct 4, 2023
b2e5f4b
Merge branch 'next' into fix/gh-24297
valentinpalkovic Oct 4, 2023
614146d
Merge branch 'valentin/fix-angular-sandbox' into fix/gh-24297
valentinpalkovic Oct 4, 2023
d2ed2d4
Merge pull request #24354 from greut/fix/gh-24297
valentinpalkovic Oct 4, 2023
97e0c60
Restrict allowed zone.js version range
valentinpalkovic Oct 4, 2023
ed18a24
move ensure-next-ahead from a bash script to a tested node script
JReinhold Oct 4, 2023
19b8468
add error class to error name
yannbf Oct 4, 2023
1b7d792
Merge branch 'next' into docs/addon-styling
Oct 4, 2023
b4424c1
Pin some package versions
valentinpalkovic Oct 4, 2023
8e83b97
Fix types
valentinpalkovic Oct 4, 2023
abe0d61
Docs: Point to styling-webpack addon in styling docs #24348
Oct 4, 2023
556569e
update @storybook/jest
yannbf Oct 4, 2023
c028ce2
always set --no-link when creating angular sandboxes
yannbf Oct 4, 2023
930adf4
move bash script to cancel preparation runs to tested node script
JReinhold Oct 4, 2023
0b35c18
Merge branch 'next' into release-stable-to-latest
JReinhold Oct 4, 2023
72837ae
fix tests
JReinhold Oct 4, 2023
406e0a5
Merge branch 'release-stable-to-latest' of github.com:storybookjs/sto…
JReinhold Oct 4, 2023
f0a10f7
Merge pull request #24373 from storybookjs/yann/no-link-angular
valentinpalkovic Oct 5, 2023
6946369
Merge branch 'next' into valentin/fix-angular-sandbox
valentinpalkovic Oct 5, 2023
08efdbd
Pin overlayscrollbars to exact version
valentinpalkovic Oct 5, 2023
b838b29
Add Resolutions.md file
valentinpalkovic Oct 5, 2023
7d8a2c6
Merge pull request #24367 from storybookjs/valentin/fix-angular-sandbox
valentinpalkovic Oct 5, 2023
4e11f29
Merge pull request #24187 from json-betsec/fix-next-image-search-params
valentinpalkovic Oct 5, 2023
38de6fc
Merge branch 'next' into bugfix/nextjs-image-context-2
valentinpalkovic Oct 5, 2023
9139e90
Merge pull request #24106 from storybookjs/release-stable-to-latest
JReinhold Oct 5, 2023
33e564e
Merge pull request #24146 from martinnabhan/bugfix/nextjs-image-conte…
valentinpalkovic Oct 5, 2023
5e02480
always run registry when generating angular sandboxes
yannbf Oct 5, 2023
dac7e2f
display webpack errors on build
yannbf Oct 5, 2023
eec9eeb
Merge branch 'next' into storybook
ATREAY Oct 5, 2023
b079ed6
Revert "Release tooling: Release stable releases from `latest-release`"
JReinhold Oct 5, 2023
f4e13cd
Merge pull request #24379 from storybookjs/revert-24106-release-stabl…
JReinhold Oct 5, 2023
7823426
Merge pull request #24377 from storybookjs/yann/display-webpack-error…
ndelangen Oct 5, 2023
a1963a3
Merge pull request #24345 from storybookjs/norbert/fix-24292
ndelangen Oct 5, 2023
3b276e7
Merge pull request #24376 from storybookjs/yann/angular-sandbox-registry
yannbf Oct 5, 2023
9619860
Merge pull request #24371 from storybookjs/yann/add-error-name
yannbf Oct 5, 2023
5184a7a
add more angular options
yannbf Oct 5, 2023
80951d3
Merge pull request #24388 from storybookjs/yann/add-missing-angular-o…
yannbf Oct 5, 2023
c78267a
Merge branch 'next' into storybook
ATREAY Oct 6, 2023
0e0d01b
updated changes
ATREAY Oct 6, 2023
1d52a86
updated alignment changes
ATREAY Oct 6, 2023
1593ff3
Merge pull request #24296 from ATREAY/storybook
jonniebigodes Oct 6, 2023
a3d6ec8
Update my-component-story-basic-and-props.js.mdx
bkfarnsworth Oct 8, 2023
e508783
Update my-component-story-basic-and-props.ts-4-9.mdx
bkfarnsworth Oct 8, 2023
ee149dd
Update my-component-story-basic-and-props.ts.mdx
bkfarnsworth Oct 8, 2023
c653826
Merge pull request #24405 from bkfarnsworth/patch-2
jonniebigodes Oct 8, 2023
b8fc3dc
Merge branch 'next' into patch-3
jonniebigodes Oct 8, 2023
36796e8
Merge pull request #24404 from bkfarnsworth/patch-3
jonniebigodes Oct 8, 2023
455c704
Merge branch 'next' into patch-1
jonniebigodes Oct 8, 2023
162bbf3
Merge pull request #24403 from bkfarnsworth/patch-1
jonniebigodes Oct 8, 2023
e665141
Write changelog for 7.5.0-alpha.5
storybook-bot Oct 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions code/e2e-tests/navigation.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { test, expect } from '@playwright/test';
import process from 'process';
import { SbPage } from './util';

const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';

test.describe('navigating', () => {
test('a URL with a partial storyId will redirect to the first story', async ({ page }) => {
// this is purposefully not using the SbPage class, and the URL is a partial (it does not contain the full storyId)
await page.goto(`${storybookUrl}?path=/story/example-button`);

const sbPage = new SbPage(page);

await sbPage.waitUntilLoaded();

await expect(sbPage.page.url()).toContain('/docs/example-button--docs');
});
});
7 changes: 5 additions & 2 deletions code/lib/manager-api/src/modules/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -637,15 +637,18 @@ export const init: ModuleFn<SubAPI, SubState> = ({
state.path === '/' || state.viewMode === 'story' || state.viewMode === 'docs';
const stateHasSelection = state.viewMode && state.storyId;
const stateSelectionDifferent = state.viewMode !== viewMode || state.storyId !== storyId;
const { type } = state.index[state.storyId] || {};
const isStory = !(type === 'root' || type === 'component' || type === 'group');

/**
* When storybook starts, we want to navigate to the first story.
* But there are a few exceptions:
* - If the current storyId and viewMode are already set/correct.
* - If the current storyId and viewMode are already set/correct AND the url section is a leaf-type.
* - If the user has navigated away already.
* - If the user started storybook with a specific page-URL like "/settings/about"
*/
if (isCanvasRoute) {
if (stateHasSelection && stateSelectionDifferent) {
if (stateHasSelection && stateSelectionDifferent && isStory) {
// The manager state is correct, the preview state is lagging behind
provider.channel.emit(SET_CURRENT_STORY, {
storyId: state.storyId,
Expand Down
12 changes: 8 additions & 4 deletions code/lib/manager-api/src/tests/stories.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,31 +542,35 @@ describe('stories API', () => {

describe('STORY_SPECIFIED event', () => {
it('navigates to the story', async () => {
const moduleArgs = createMockModuleArgs({ initialState: { path: '/' } });
const moduleArgs = createMockModuleArgs({ initialState: { path: '/', index: {} } });
initStories(moduleArgs as unknown as ModuleArgs);
const { navigate, provider } = moduleArgs;

provider.channel.emit(STORY_SPECIFIED, { storyId: 'a--1', viewMode: 'story' });
expect(navigate).toHaveBeenCalledWith('/story/a--1');
});
it('DOES not navigate if the story was already selected', async () => {
const moduleArgs = createMockModuleArgs({ initialState: { path: '/story/a--1' } });
const moduleArgs = createMockModuleArgs({ initialState: { path: '/story/a--1', index: {} } });
initStories(moduleArgs as unknown as ModuleArgs);
const { navigate, provider } = moduleArgs;

provider.channel.emit(STORY_SPECIFIED, { storyId: 'a--1', viewMode: 'story' });
expect(navigate).not.toHaveBeenCalled();
});
it('DOES not navigate if a settings page was selected', async () => {
const moduleArgs = createMockModuleArgs({ initialState: { path: '/settings/about' } });
const moduleArgs = createMockModuleArgs({
initialState: { path: '/settings/about', index: {} },
});
initStories(moduleArgs as unknown as ModuleArgs);
const { navigate, provider } = moduleArgs;

provider.channel.emit(STORY_SPECIFIED, { storyId: 'a--1', viewMode: 'story' });
expect(navigate).not.toHaveBeenCalled();
});
it('DOES not navigate if a custom page was selected', async () => {
const moduleArgs = createMockModuleArgs({ initialState: { path: '/custom/page' } });
const moduleArgs = createMockModuleArgs({
initialState: { path: '/custom/page', index: {} },
});
initStories(moduleArgs as unknown as ModuleArgs);
const { navigate, provider } = moduleArgs;

Expand Down
Loading