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

Angular: Update Angular cli templates #25152

Merged

Conversation

Marklb
Copy link
Member

@Marklb Marklb commented Dec 8, 2023

Closes #22453

What I did

Fixed a few issues with the initial stories in an Angular project.

I left a mix of standalone and non-standalone, since Angular supports both, but I can change them to all standalone if we want.

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!

  1. Create a sandbox for template, e.g. yarn task --task sandbox --start-from auto --template angular-cli/default-ts
  2. Open Storybook in your browser
  3. Access Example stories

The code was incorrect, but because of how Storybook generates the NgModule they happened to still work in a story. So, you can access the stories to make sure I didn't break them, but this is mainly just a correction of the code.

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/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 canary-release-pr.yml --field pr=<PR_NUMBER>

@valentinpalkovic
Copy link
Contributor

@Marklb! Thanks so much. Do you think you can incorporate some changes from #24898 into your PR? I don’t know whether they are still relevant.

@Marklb
Copy link
Member Author

Marklb commented Dec 8, 2023

@valentinpalkovic I didn't notice that PR, when I decided to make this one, but sure I can add those changes. The parts I don't have are that yours set each component as standalone. Is that what we want? It is ideally what should be done, but do we want the examples to be ideal or a mix of what is supported?

@valentinpalkovic
Copy link
Contributor

I would say let’s switch them over to standalone completely. WDYT?

@Marklb
Copy link
Member Author

Marklb commented Dec 8, 2023

I made the changes and removed a few other things that didn't seem necessary.

Should the stories file names be changed to lowercase? I assume the uppercase is from matching the React files, but I don't think Angular apps typically have files with an uppercase name.

@valentinpalkovic
Copy link
Contributor

Sure! :)

@Marklb
Copy link
Member Author

Marklb commented Dec 8, 2023

Updated the filenames. I also removed the default exports, since I don't think I have actually seen an Angular project doing that, but I can change that back if not wanted.

@valentinpalkovic valentinpalkovic added the ci:daily Run the CI jobs that normally run in the daily job. label Dec 8, 2023
@valentinpalkovic valentinpalkovic self-assigned this Dec 11, 2023
@valentinpalkovic valentinpalkovic merged commit 986f86b into storybookjs:next Dec 11, 2023
89 of 90 checks passed
@github-actions github-actions bot mentioned this pull request Dec 11, 2023
9 tasks
@shilman
Copy link
Member

shilman commented Dec 11, 2023

Should this be patched back to 7.6 @valentinpalkovic @Marklb ?

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Dec 11, 2023

Yes let's do it.

@valentinpalkovic valentinpalkovic added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Dec 11, 2023
storybook-bot pushed a commit that referenced this pull request Dec 11, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
@github-actions github-actions bot mentioned this pull request Dec 11, 2023
10 tasks
storybook-bot pushed a commit that referenced this pull request Dec 11, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 11, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 11, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 11, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 12, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 12, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 12, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 13, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 13, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 13, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 14, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 14, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 14, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 14, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
storybook-bot pushed a commit that referenced this pull request Dec 15, 2023
Angular: Update Angular cli templates
(cherry picked from commit 986f86b)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
angular bug ci:daily Run the CI jobs that normally run in the daily job. patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Storybook Angular sample components are not marked standalone?
3 participants