Skip to content

Conversation

@EtiennePasteur
Copy link
Contributor

@EtiennePasteur EtiennePasteur commented Nov 21, 2025

What I did

I replaced:

import { ApplicationConfig } from '@angular/platform-browser';

with:

import { ApplicationConfig } from '@angular/core';

because Angular 21 removed the deprecated ApplicationConfig import from @angular/platform-browser entirely.

image

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
    • Optimized internal code organization for improved maintainability with no changes to user-facing functionality or features.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 24, 2025

📝 Walkthrough

Walkthrough

Import statements are consolidated in two Angular framework files. ApplicationConfig is relocated from @angular/platform-browser to @angular/core in both files. Multiple import statements are merged into single imports per module, with no functional or public API changes.

Changes

Cohort / File(s) Summary
Import consolidation and source relocation
code/frameworks/angular/src/client/decorators.ts, code/frameworks/angular/src/client/types.ts
Merged multiple import statements into single imports per module. ApplicationConfig source changed from @angular/platform-browser to @angular/core. No changes to exported APIs or type shapes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

✨ Finishing touches
  • 📝 Generate docstrings

📜 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 456e21c and ecd1f3b.

📒 Files selected for processing (2)
  • code/frameworks/angular/src/client/decorators.ts (1 hunks)
  • code/frameworks/angular/src/client/types.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-24T09:39:39.233Z
Learnt from: ndelangen
Repo: storybookjs/storybook PR: 32507
File: code/core/src/manager/globals/globals-module-info.ts:25-33
Timestamp: 2025-09-24T09:39:39.233Z
Learning: In Storybook, storybook/actions/decorator is a preview-only entrypoint and should not be included in manager globals configuration. The duplicatedKeys array in code/core/src/manager/globals/globals-module-info.ts is specifically for manager-side externalization, not preview entrypoints.

Applied to files:

  • code/frameworks/angular/src/client/decorators.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: normal
🔇 Additional comments (2)
code/frameworks/angular/src/client/decorators.ts (1)

3-3: Import consolidation looks good.

The consolidation of ApplicationConfig and Type imports from @angular/core is consistent with the changes in types.ts and aligns with the Angular 21 compatibility fix.

code/frameworks/angular/src/client/types.ts (1)

7-7: No issues found. The import consolidation is verified as correct.

Current Storybook requires Angular 18+, and based on the web search results, ApplicationConfig has been available from @angular/core since Angular 16. The import change correctly consolidates both types to @angular/core, aligning with Angular 21 compatibility. No backward compatibility concerns exist within Storybook's supported Angular version range.


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.

@martin-yumsto
Copy link

Is there any workaround to make storybook work with Angular v21 ? Has been stuck on this issue since few days.

Copy link
Contributor

@valentinpalkovic valentinpalkovic left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your contribution

@valentinpalkovic valentinpalkovic changed the title fix: deprecated import of ApplicationConfig from '@angular/platform-b… Angular: Replace deprecated import of ApplicationConfig Nov 26, 2025
@valentinpalkovic valentinpalkovic merged commit 3578ce7 into storybookjs:next Nov 26, 2025
56 of 60 checks passed
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