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

Update stories - batch 1 #663

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pouretrebelle
Copy link
Member

@pouretrebelle pouretrebelle commented Jul 23, 2024

Summary

Part of https://github.com/github/primer/issues/3635

List of notable changes:

Updated stories of:

  • Accordion
  • ActionMenu
  • AnchorNav
  • Avatar

What should reviewers focus on?

Steps to test:

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • New visual snapshots have been generated / updated for any UI changes
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Please try to provide before and after screenshots or videos

Before After

Copy link

changeset-bot bot commented Jul 23, 2024

⚠️ No Changeset found

Latest commit: cc14203

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jul 23, 2024

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented Jul 23, 2024

⚠️ Visual differences found

Our visual comparison tests found UI differences.

Please review the differences by using the test artifacts to ensure that the changes were intentional.

Artifacts can be downloaded and reviewed locally.

Download links are available at the bottom of the workflow summary screen.

Example:

artifacts section of workflow run

If the changes are expected, please run npm run test:visual:update-snapshots to replace the previous fixtures.

Review visual differences

@pouretrebelle pouretrebelle force-pushed the pouretrebelle/storybook-reorg-1 branch from 22d940b to f1eaba3 Compare July 23, 2024 16:26
@pouretrebelle
Copy link
Member Author

@rezrah @joshfarrant I could do with a bit of feedback on my approach so far:

Here's what I'm doing:

  • Removing controls from default stories
  • Adding controls for child components in labelled sections
  • Using text as the control name when it's really just children - seems more intuitive than children (esp because you can't write jsx in the control field) but perhaps could cause some confusion as it's not a prop called text. Only Tooltip has an actual text prop, and there are a few existing stories that use text as a control name in the same way.
  • Using visible as a control to define whether a child component is rendered or not - again that's not the name of an actual prop on the component, just taking the lead from EyebrowBanner
  • Using 'Story customization' as a section for composed data and external customisation
  • Only showing editable controls in playground - excluding implementation details such as id, className, ref, aria labels etc.

Updated AnchorNav Playground story controls

Hope that sounds good to you! I'll do these in batches of ~5 components to make them easier to review, but could do a PR per component if that's preferred :)

Because the props of ActionMenu are properly annotated, the Storybook
infers controls even when they're not intuitive for the playground -
for example: classname, ref, id. I've made the playground only show
controls for props we'd explicitly want to play with. Weirdly the
controls are filtered by their name rather than argType key which
is why they have to be hard-coded.

This also removes the args from the default story so the code example
is ready to use.
Adds controls for actions, removes controls from default story.
Remove controls from default, add alternative playground for responsive
size, as this prop accepts two different types of data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant