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

CLI: Add addon-interactions to angular template #17437

Merged
merged 3 commits into from Feb 9, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Feb 7, 2022

Issue: #16722

What I did

  • Added E2E test for addon-interactions
  • Changed the Header and Page components and made the Page component stateful
  • Added addon-interactions example to the angular template:
angular-changes.mov

A small thing I did not solve although I'd love to is this:

image

☝️ the buttons in the header don't have a space between them (it was already like that before). The reason for that is because we use a common css which has the following rule:

button + button {
  margin-left: 10px;
}

however in angular, the button elements are wrapped in a storybook-button element from angular, so the css rule will never be applied:

image

A solution would be to just add a margin-left css class to the buttons, this way it would work regardless of framework. This means making a small change but in every framework template, which I could do in another PR if y'all agree with the change!

How to test

  • Checkout the branch

  • yarn build cli

  • run the cli lib/cli/bin/index.js repro --framework angular

  • Is this testable with Jest or Chromatic screenshots?

  • Does this need a new example in the kitchen sink apps?

  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@yannbf yannbf added feature request cli angular patch:yes Bugfix & documentation PR that need to be picked to main branch labels Feb 7, 2022
@nx-cloud
Copy link

nx-cloud bot commented Feb 7, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 095fef7. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

}

// export const Page = ({ user, onLogin, onLogout, onCreateAccount }) => (
Copy link
Member Author

Choose a reason for hiding this comment

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

This was part of the template for quite some time 🙈

@yannbf yannbf requested a review from ThibaudAV February 7, 2022 14:49
@shilman shilman changed the title CLI: add addon-interactions to angular template CLI: Add addon-interactions to angular template Feb 7, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM!

@shilman shilman merged commit c3a4cda into next Feb 9, 2022
@shilman shilman deleted the feat/add-interactions-to-cli-template-angular branch February 9, 2022 18:59
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
angular cli feature request 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.

None yet

2 participants