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

web: require enabling Chromatic snapshot for every story manually #30331

Merged
merged 2 commits into from Feb 15, 2022

Conversation

valerybugakov
Copy link
Member

@valerybugakov valerybugakov commented Jan 28, 2022

Context

The Frontend Platform team started looking into ways to limit our Chromatic spending that went out of hand. And as a first remediation measure, we proposed disabling snapshotting all stories by default. Snapshotting can be enabled for an individual story by adding disableSnapshot: false to story parameters. That way, it becomes a more conscious decision, and engineers can decide what's important to snapshot.

Here's the list of issues to track the progress per team.

Changes

  • Disabled Chromatic snapshots by default.
  • Enabled Chromatic snapshots for wildcard and shared stories.

Results

We have 321 snapshots in the Chromatic diff. There's still room for improvement as @eseliger mentioned in batchers PR — we can still merge some stories or disable specific viewports for some of them.

@valerybugakov valerybugakov marked this pull request as ready for review February 14, 2022 17:22
@sourcegraph-bot
Copy link
Contributor

Codenotify: Notifying subscribers in OWNERS files for diff 9b27c2e...8772e2e.

Notify File(s)
@sourcegraph/frontend-platform client/wildcard/src/components/Alert/Alert.story.tsx
client/wildcard/src/components/Badge/Badge.story.tsx
client/wildcard/src/components/Badge/ProductStatusBadge.story.tsx
client/wildcard/src/components/Button/story/Button.story.tsx
client/wildcard/src/components/ButtonLink/ButtonLink.story.tsx
client/wildcard/src/components/Card/Card.story.tsx
client/wildcard/src/components/Container/Container.story.tsx
client/wildcard/src/components/Feedback/FeedbackBadge/FeedbackBadge.story.tsx
client/wildcard/src/components/Feedback/FeedbackText/FeedbackText.story.tsx
client/wildcard/src/components/Form/Checkbox/Checkbox.story.tsx
client/wildcard/src/components/Form/Input/Input.story.tsx
client/wildcard/src/components/Form/RadioButton/RadioButton.story.tsx
client/wildcard/src/components/Form/Select/Select.story.tsx
client/wildcard/src/components/Form/TextArea/TextArea.story.tsx
client/wildcard/src/components/Grid/Grid.story.tsx
client/wildcard/src/components/Icon/Icon.story.tsx
client/wildcard/src/components/Link/Link/Link.story.tsx
client/wildcard/src/components/Link/RouterLink/RouterLink.story.tsx
client/wildcard/src/components/LoadingSpinner/LoadingSpinner.story.tsx
client/wildcard/src/components/Menu/Menu.story.tsx
client/wildcard/src/components/Modal/Modal.story.tsx
client/wildcard/src/components/PageHeader/PageHeader.story.tsx
client/wildcard/src/components/PageSelector/PageSelector.story.tsx
client/wildcard/src/components/Panel/Panel.story.tsx
client/wildcard/src/components/Popover/story/Popover.story.tsx
client/wildcard/src/components/Tabs/Tabs.story.tsx
client/wildcard/src/components/Tooltip/Tooltip.story.tsx
client/wildcard/src/components/Typography/Typography.story.tsx

@valerybugakov valerybugakov requested review from umpox and a team February 14, 2022 18:30
Copy link
Contributor

@courier-new courier-new left a comment

Choose a reason for hiding this comment

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

Great to see this! Could it be helpful to also add a note to our docs about testing to mention that Chromatic snapshots are configured to be off by default and share a snippet for how to re-enable it on a specific story?

@valerybugakov valerybugakov merged commit c25ef2d into main Feb 15, 2022
@valerybugakov valerybugakov deleted the vb/disable-chromatic branch February 15, 2022 12:32
pietrorosa77 added a commit that referenced this pull request Feb 15, 2022
* list pending invites

* added pending invitations for org grapql method

* pending invitations page update

* added revoke link and copy link

* fixed avatar url and gap in pending invites

* added resend invite

* try/catch on resend invite

* Update cmd/frontend/graphqlbackend/org_invitations.go

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>

* Update go.sum

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>

* Update internal/database/org_invitations.go

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>

* `Card`: Use raw values rather than CSS vars (#31233)

* web: require enabling Chromatic snapshot for every story manually (#30331)

* Update invite null text and differentiate between two cases (#31168)

* doc: update Chromatic docs (#31239)

* Experimental ref panel: allow users to collapse top-level lists (#31241)

This fixes #30974 by allowing users to collapse the "Definitions",
"References" and "Implementations" lists.

* search contexts: fix query editing and move error alert inside the form (#31232)

* fixing review comments it1

* prettify files

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>
Co-authored-by: Tom Ross <tom@umpox.com>
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
Co-authored-by: Philipp Spiess <hello@philippspiess.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Rok Novosel <rok@sourcegraph.com>
davejrt pushed a commit that referenced this pull request Feb 15, 2022
* list pending invites

* added pending invitations for org grapql method

* pending invitations page update

* added revoke link and copy link

* fixed avatar url and gap in pending invites

* added resend invite

* try/catch on resend invite

* Update cmd/frontend/graphqlbackend/org_invitations.go

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>

* Update go.sum

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>

* Update internal/database/org_invitations.go

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>

* `Card`: Use raw values rather than CSS vars (#31233)

* web: require enabling Chromatic snapshot for every story manually (#30331)

* Update invite null text and differentiate between two cases (#31168)

* doc: update Chromatic docs (#31239)

* Experimental ref panel: allow users to collapse top-level lists (#31241)

This fixes #30974 by allowing users to collapse the "Definitions",
"References" and "Implementations" lists.

* search contexts: fix query editing and move error alert inside the form (#31232)

* fixing review comments it1

* prettify files

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>
Co-authored-by: Tom Ross <tom@umpox.com>
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
Co-authored-by: Philipp Spiess <hello@philippspiess.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Rok Novosel <rok@sourcegraph.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chromatic cla-signed frontend-platform Issues related to our frontend platform, owned collectively by our frontend crew.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants