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

chore(ci): reconfigure percy to only snapshot mobile in the white theme #14886

Conversation

tay1orjones
Copy link
Member

Closes #14779

Based on our discussion of ideas, this reconfigures percy so that components are only snapshotted at the mobile breakpoint in the white theme. Components snapshotted in g10, g90, and g100 will only snapshot at the default 1366 width.

Changelog

Changed

  • reconfigure percy to only snapshot mobile in the white theme

Testing / Reviewing

@tay1orjones tay1orjones requested a review from a team as a code owner October 11, 2023 21:30
@tay1orjones tay1orjones self-assigned this Oct 11, 2023
@netlify
Copy link

netlify bot commented Oct 11, 2023

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 681e887
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65293378c1ed1d0008a164b1
😎 Deploy Preview https://deploy-preview-14886--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 11, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 681e887
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/652933783bc4f60009cf86d5
😎 Deploy Preview https://deploy-preview-14886--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

🤞

@tay1orjones
Copy link
Member Author

tay1orjones commented Oct 12, 2023

We hit the snapshot limit before we could test this 😞

We'll have a new allotment on Monday to test this.

@tw15egan tw15egan added this pull request to the merge queue Oct 16, 2023
@tw15egan tw15egan removed this pull request from the merge queue due to a manual request Oct 16, 2023
@tay1orjones
Copy link
Member Author

Something's not right, Percy still shows 920 snapshots being used for this PR. I think we should be seeing a diff of some snapshots being deleted on this PR.

@tay1orjones
Copy link
Member Author

Looking into this further, it appears the snapshot "count" in the percy dashboard does not reflect the true count of snapshots.

Build #12923 is the most recent build on main. It's listed as 920 snapshots within this build. You can see in this screenshot that the currently selected snapshot is taken in two browser widths (top right corner):

image

Meanwhile, a recent build from this PR shows the update made here to restrict that same snapshot to a single browser width:

image

In both cases the total snapshot "count" for the build is 920. Based on this support article, browser widths do count as a snapshot each:

Percy calculates your usage based on the number of snapshots/screenshots you are trying to take per build.

As an example, if you snapshot one page on:

  • Chrome across 3 widths (say 1024, 1366, 375)

  • Edge across 3 widths (say 1024, 1366, 375)

The above would result in 6 snapshots (i.e., 1 snapshot x 3 widths per browser).

Overall this means we have no way to verify that the billed snapshots per build are less than before this change.

@tay1orjones tay1orjones added this pull request to the merge queue Oct 16, 2023
Merged via the queue into carbon-design-system:main with commit c9ad02f Oct 16, 2023
15 checks passed
@tay1orjones tay1orjones deleted the 14779-reduce-percy-breakpoint-snapshots branch October 16, 2023 19:10
@tay1orjones
Copy link
Member Author

Update: you can view the total screenshots by viewing the additional build information behind the info icon next to the build information in the top left of the percy build screen

Main This PR 🎉
image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Be more strategic with our Percy snapshot quota
3 participants