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 Animation stories #674

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

pouretrebelle
Copy link
Member

@pouretrebelle pouretrebelle commented Jul 29, 2024

Summary

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

List of notable changes:

  • Changed title from 'Animations' to 'AnimationProvider' as this is the component's name
  • Moved examples to examples folder
  • Added feature stories for interaction observer and advanced animation options
  • Updated playground to show staggering and only actionable controls
  • Added minimal default story

What should reviewers focus on?

  • Review per commit to skip renaming confusion
  • Not sure I've done the right thing with the visual snapshots? A couple unrelated shots have changed but have no noticeable differences, and I'm not sure all the shots for the animation stories are useful

Steps to test:

https://primer-91b141f773-26139705.drafts.github.io/storybook/?path=/story/components-animationprovider--default

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

This is the component which is required for all animations, so is an appropriate
name for the group of stories relating to animation.
Also removes the component from the story meta - this shows the props of
AnimationProvider in the controls panel which cannot be edited in example
or feature stories and may cause confusion.
Copy link

changeset-bot bot commented Jul 29, 2024

⚠️ No Changeset found

Latest commit: 962e668

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 29, 2024

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented Jul 29, 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

Copy link
Collaborator

Choose a reason for hiding this comment

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

These look like the animation didn't complete before the screenshot was taken. Might be worth increasing the timeout or regenerating these to see if it fixes itself.

</LogoSuite>
</AnimationProvider>
)
IntersectionObserver.argTypes = {
Copy link
Collaborator

@rezrah rezrah Jul 31, 2024

Choose a reason for hiding this comment

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

Do argTypes need to be declared per story here? Usually they can be set in the default export at the top of the file to keep the individual stories shorter and reduce duplication. Could we do that here?

</Stack>
</AnimationProvider>
)
export const AdvancedAnimation = args => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is advanced referring to the use of multiple parameters like delay, duration etc at the same time? I feel like this example is quite similar to Playground or might be better served in our docs tbh.

<ProgressBar width="70%" />
<ProgressBar width="50%" />
<ProgressBar width="25%" />
export const IntersectionObserver = ({variant, ...args}) => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool example 👍

@rezrah
Copy link
Collaborator

rezrah commented Jul 31, 2024

Changes are looking good @pouretrebelle 👍, thanks.

Some additional feedback that doesn't fit inline...

  • As you're changing story names, you'll also need to update the VRT exclusion / timeouts list, which is here

  • Reason for having Animation folder previously was to incorporate all animation-specific components into one folder, like we do for forms. E.g. AnimationProvider and Animate components. Could we create a separation between those two components and follow the forms example instead? Or bring both up to top-level so they exist side-by-side?

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.

2 participants