Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
5d00cfd
fix(create-storybook): drop contextual dependencies
43081j Jul 27, 2025
a7bb7d0
Merge branch 'next' into config-files-context
ndelangen Sep 15, 2025
3408388
test: Update vitestConfigFiles.test.ts to mock fs/promises with dynam…
ndelangen Sep 15, 2025
1853097
Integrate launch-editor-middleware for enhanced editor support. Added…
yannbf Sep 15, 2025
b665876
Introduce open in editor and copy story name actions in sidebar conte…
yannbf Sep 15, 2025
534e35b
add open in editor action in interactions panel
yannbf Sep 15, 2025
e5bcac0
Add share tool functionality with QR code support in the preview comp…
yannbf Sep 15, 2025
90b7020
surface network address to Storybook's UI
yannbf Sep 15, 2025
c110aed
fix types and most tests
yannbf Sep 15, 2025
4c3209a
fix story
yannbf Sep 16, 2025
c83b79c
only hide tooltip on escape key
yannbf Sep 16, 2025
f16eb5d
update storybook icons and use new bug icon
yannbf Sep 16, 2025
f72aa77
fix exports
yannbf Sep 16, 2025
33f12f1
use share icon
yannbf Sep 16, 2025
19a909d
Merge branch 'next' into config-files-context
43081j Sep 16, 2025
983e479
in the interactions panel, show just story name as text on deployed/c…
yannbf Sep 16, 2025
7a74161
fix shortcuts fonts
yannbf Sep 16, 2025
22e796c
fix registering shortcuts with alt on macos
yannbf Sep 16, 2025
cceb627
fix tests
yannbf Sep 16, 2025
6a3ae4b
chore: run format
43081j Sep 16, 2025
6756ac0
test: mock find.any
43081j Sep 16, 2025
4ce4bfd
cleanup and add copyStoryLink shortcut
yannbf Sep 16, 2025
03ddcf9
temporarily disable copy story name shortcut
yannbf Sep 16, 2025
1af1dbb
small rename on measure addon shortcut
yannbf Sep 16, 2025
0036635
fix qr url
yannbf Sep 16, 2025
f252cdb
small refactor
yannbf Sep 16, 2025
383fe6f
fix types
yannbf Sep 16, 2025
f4bb5fa
fix types
yannbf Sep 16, 2025
09cdcc3
Merge branch 'next' into yann/open-in-editor-feature
yannbf Sep 16, 2025
6636c1d
make qrcode fallback to current url
yannbf Sep 16, 2025
809d220
add copy story link default shortcut
yannbf Sep 16, 2025
45daed4
skip vitest test
yannbf Sep 16, 2025
632561d
fix qr code url calculation
yannbf Sep 16, 2025
0ec0168
stop using better-opn when open has improved
ndelangen Sep 17, 2025
4d43dc3
Fix: Handle browser opening error gracefully in storybookDevServer
ndelangen Sep 17, 2025
72d98b7
Merge branch 'next' into yann/open-in-editor-feature
yannbf Sep 17, 2025
5be73b1
update icons and use the new editor icon
yannbf Sep 17, 2025
63bb329
Merge pull request #32484 from storybookjs/norbert/updates-2025-septe…
ndelangen Sep 17, 2025
c8e2ac3
Merge branch 'next' into yann/open-in-editor-feature
ndelangen Sep 17, 2025
6984ccd
Enhance exports: Add 'EditorIcon' to the list of exported icons in gl…
ndelangen Sep 17, 2025
e442493
Merge branch 'yann/open-in-editor-feature' of github.com:storybookjs/…
yannbf Sep 17, 2025
b7f1e1b
Add AppleScript for reusing existing Chrome tabs and enhance browser …
ndelangen Sep 17, 2025
4eb6f4e
Enhance error handling and browser opening logic in `openInBrowser` a…
ndelangen Sep 17, 2025
8abb1e3
move code into common folder
ndelangen Sep 17, 2025
90817f1
rework the open in editor feature and add error handling
yannbf Sep 17, 2025
65a4506
remove globalization we decided to remove
ndelangen Sep 17, 2025
cf13e70
address PR feedback
yannbf Sep 17, 2025
63a55b0
Refactor error handling in `openInBrowser` and clean up logging in `o…
ndelangen Sep 17, 2025
244fac1
revamp context menu and support opening mdx stories
yannbf Sep 17, 2025
93eb503
Merge pull request #32488 from storybookjs/norbert/improve-open-again
ndelangen Sep 17, 2025
7fad5ab
Merge branch 'next' into yann/open-in-editor-feature
ndelangen Sep 17, 2025
cd1b6e5
replace qrcode library
yannbf Sep 17, 2025
43d966b
Merge branch 'yann/open-in-editor-feature' of github.com:storybookjs/…
yannbf Sep 17, 2025
a363ba8
more fixes
yannbf Sep 17, 2025
5528525
Merge pull request #32491 from storybookjs/norbert/remove-deprecated-…
ndelangen Sep 17, 2025
aeb30b3
Merge branch 'next' into yann/open-in-editor-feature
yannbf Sep 17, 2025
b2b20b4
Merge branch 'next' into pr/43081j/32134
ndelangen Sep 17, 2025
12ded7f
Refactor `coerce` function for improved readability in `vitestConfigF…
ndelangen Sep 17, 2025
d0653ad
fix stories
yannbf Sep 17, 2025
472d593
fix linting
ndelangen Sep 17, 2025
8c61a23
Merge branch 'next' into yann/open-in-editor-feature
ndelangen Sep 17, 2025
1190cb5
fix: add missing newline in no-stories-of.md documentation
ndelangen Sep 17, 2025
efd5294
fix: update comments and formatting in test and CSS files
ndelangen Sep 17, 2025
aa7d21c
Update documentation for `no-stories-of` rule to include correct impo…
ndelangen Sep 17, 2025
7ebc251
Merge branch 'next' into yann/open-in-editor-feature
ndelangen Sep 17, 2025
a8ba6a1
Update addon-designs to sb10 canary
ndelangen Sep 17, 2025
5335ed9
bumb to new canary
ndelangen Sep 17, 2025
e194a32
prebundle qrcode.react
yannbf Sep 18, 2025
c58e9e9
add "open in editor" action to component nodes
yannbf Sep 18, 2025
39f52e4
Merge pull request #32496 from storybookjs/norbert/bump-addon-designs…
ndelangen Sep 18, 2025
a744783
address PR feedback
yannbf Sep 18, 2025
bbfa9e9
write E2E tests
yannbf Sep 18, 2025
97f2089
Merge pull request #32134 from 43081j/config-files-context
ndelangen Sep 18, 2025
a6b51dc
revamp open in editor api and bring it into useStorybookApi
yannbf Sep 18, 2025
6c985c5
Merge branch 'next' into yann/open-in-editor-feature
yannbf Sep 18, 2025
21529d2
fix test
yannbf Sep 18, 2025
3b49d88
Merge branch 'yann/open-in-editor-feature' of github.com:storybookjs/…
yannbf Sep 18, 2025
af37fd7
fix tests
yannbf Sep 18, 2025
d399876
Enhance error handling in telemetry by queuing errors when the channe…
ndelangen Sep 18, 2025
6b967f1
Merge pull request #32499 from storybookjs/norbert/queue-telemetry-ma…
ndelangen Sep 18, 2025
269c931
better structure E2E tests
yannbf Sep 18, 2025
cc2ffba
Merge branch 'next' into yann/open-in-editor-feature
yannbf Sep 18, 2025
2d630a4
Merge pull request #32452 from storybookjs/yann/open-in-editor-feature
yannbf Sep 18, 2025
a8e4d83
Update CHANGELOG.md for v9.1.7 [skip ci]
storybook-bot Sep 18, 2025
a530612
Refactor FormComponent to use Angular signals and standalone module. …
ndelangen Sep 18, 2025
4c52fbf
Merge pull request #32502 from storybookjs/norbert/fix-angular-form-c…
ndelangen Sep 18, 2025
98c9bc7
Fix: Ensure newline at the end of JSON output in version bump scripts
ndelangen Sep 19, 2025
50ed0dd
Merge pull request #32505 from storybookjs/norbert/add-end-of-file-ne…
ndelangen Sep 19, 2025
9dc2e67
Fix: Ensure consistent newline at the end of JSON output in version b…
ndelangen Sep 19, 2025
d012461
Refactor: Update version test assertions to use expect.stringContaini…
ndelangen Sep 19, 2025
795e05c
Fix: Remove extra newline at the end of JSON output in version bump s…
ndelangen Sep 19, 2025
14c9b73
Write changelog for 10.0.0-beta.6 [skip ci]
storybook-bot Sep 19, 2025
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
Prev Previous commit
Next Next commit
Enhance error handling and browser opening logic in openInBrowser a…
…nd `opener`

- Improved error handling in `openInBrowser` by logging errors and conditionally opening the address based on previous errors.
- Added support for the 'Arc' browser in the `startBrowserProcess` function.
- Refactored command construction for executing AppleScript to improve readability and maintainability.
  • Loading branch information
ndelangen committed Sep 17, 2025
commit 4eb6f4eab47d91140b8ff59dc8ab09929037fdfa
17 changes: 15 additions & 2 deletions code/core/src/core-server/utils/open-browser/opener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function startBrowserProcess(
'Google Chrome',
'Microsoft Edge',
'Brave Browser',
'Arc',
'Vivaldi',
'Chromium',
];
Expand All @@ -95,12 +96,24 @@ function startBrowserProcess(
'server',
'openBrowser.applescript'
);
execSync(`osascript "${pathToApplescript}" "${encodeURI(url)}" "${chromiumBrowser}"`, {

const command = `osascript "${pathToApplescript}" \"`
.concat(encodeURI(url), '" "')
.concat(
process.env.OPEN_MATCH_HOST_ONLY === 'true'
? encodeURI(new URL(url).origin)
: encodeURI(url),
'" "'
)
.concat(chromiumBrowser, '"');

execSync(command, {
cwd: __dirname,
stdio: 'ignore',
});

return true;
} catch (err) {
// console.log('err', err);
// Ignore errors.
}
}
Expand Down
9 changes: 7 additions & 2 deletions code/core/src/core-server/utils/open-in-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ export async function openInBrowser(address: string) {
try {
await openBrowser(address);
} catch (error) {
console.error('A', error);
errorOccured = true;
}

try {
await open(address);
errorOccured = false;
if (errorOccured) {
await open(address);
console.info(`Opened ${address} in browser`);
errorOccured = false;
}
} catch (error) {
console.error('B', error);
errorOccured = true;
}

Expand Down
Loading