Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@brandonroberts
Copy link
Contributor

@brandonroberts brandonroberts commented Oct 23, 2025

Closes #

What I did

When using the previewAnnotations with the @storybook/builder-vite its unable to resolve the preview and docs config files because they aren't mapped correctly. The @analogjs/storybook-angular package re-exports the previewAnnotations from the @storybook/angular package.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 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 publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Chores
    • Improved path formatting used by the Angular preset for preview and documentation configuration locations.
    • Adjustment only affects internal path representation; no changes to public APIs or runtime behavior.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Path resolution in the Angular preset is updated to wrap import.meta.resolve() calls with fileURLToPath() for two paths: preview-prod and docs/config, converting resolved URLs to filesystem path strings without changing control flow or error handling.

Changes

Cohort / File(s) Summary
Path Resolution Wrapping
code/frameworks/angular/src/preset.ts
Wraps two import.meta.resolve() calls with fileURLToPath() to convert URL results into filesystem paths for preview-prod and docs/config annotations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f32297a and e5d342f.

📒 Files selected for processing (1)
  • code/frameworks/angular/src/preset.ts (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mrginglymus
Copy link
Contributor

@valentinpalkovic valentinpalkovic changed the title fix(@storybook/angular): add fileURLToPath for preview annotation paths Angular: add fileURLToPath for preview annotation paths Oct 27, 2025
@valentinpalkovic valentinpalkovic changed the title Angular: add fileURLToPath for preview annotation paths Angular: Add fileURLToPath for preview annotation paths Oct 27, 2025
@storybook-app-bot
Copy link

storybook-app-bot bot commented Oct 27, 2025

Package Benchmarks

Commit: d9f9dda, ran on 28 October 2025 at 10:55:58 UTC

No significant changes detected, all good. 👏

@valentinpalkovic valentinpalkovic added this to the 10 blocking milestone Oct 27, 2025
@nx-cloud
Copy link

nx-cloud bot commented Oct 28, 2025

View your CI Pipeline Execution ↗ for commit e5d342f

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 47s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-28 11:55:27 UTC

@ndelangen ndelangen merged commit d22d0a9 into storybookjs:next Oct 28, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Oct 28, 2025
3 tasks
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.

4 participants