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

Add new pricing options component #530

Merged
merged 40 commits into from
Mar 22, 2024

Conversation

danielguillan
Copy link
Contributor

@danielguillan danielguillan commented Feb 1, 2024

Summary

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

Adds new pricing options component.

🔗 Documentation
🔗 Storybook

📋 Todo

  • Fix one item layout
  • Increase test coverage
  • Add Default story
  • Add visual snapshots
  • Add changeset
  • Add documentation
  • Update pricing format with currency code
  • Add collapsible feature set on small viewports

List of notable changes:

  • added pricing options component

What should reviewers focus on?

Steps to test:

  1. Use this storybook link and review the individual stories and playground
  2. Use this documentation link to read through public docs

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:

Default presentation

options presentation

Two items

Feature sets and included and excluded items

No features

Dark color mode

@danielguillan danielguillan self-assigned this Feb 1, 2024
Copy link

changeset-bot bot commented Feb 1, 2024

🦋 Changeset detected

Latest commit: 919fd01

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@primer/react-brand Minor
@primer/brand-primitives Minor
@primer/brand-e2e Minor
@primer/brand-fonts Minor
@primer/brand-config Minor
@primer/brand-storybook Minor

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Contributor

github-actions bot commented Feb 1, 2024

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented Feb 1, 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

@danielguillan danielguillan force-pushed the danielguillan/add-pricing-card-component branch from 5edd985 to 9f6330c Compare February 22, 2024 10:11
@danielguillan danielguillan force-pushed the danielguillan/add-pricing-card-component branch from 9f6330c to d129011 Compare February 22, 2024 10:28
@danielguillan danielguillan marked this pull request as ready for review February 22, 2024 10:29
* Once subgrid is supported in the last 3 major versions of Safari (i.e., when Safari 18 is released), it can be fully removed.
* https://caniuse.com/css-subgrid
*/
@supports not (grid-template-rows: subgrid) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be done as a progressive enhancement, where using subgrid is optional and opt-in? Looks like it's the other way around right now, which might not fly with house rules. That said, this is much nicer for balancing our tech debt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I implemented the progressive enhancement approach initially but chose this route because:

  1. It's as safe as the progressive enhancement: the @supports at-rule is supported on all our supported browsers 🤪, which ensures everyone is getting the "baseline" behavior
  2. It is much simpler and easier to read than the progressive enhancement implementation. And we can delete the whole statement when subgrid is fully supported.

Copy link
Collaborator

@rezrah rezrah left a comment

Choose a reason for hiding this comment

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

Very nice work @danielguillan. It's a big PR, so I've focussed on providing critical path feedback only so we can get this out today. Anything extra can be updated in follow up PR's or uncovered during smoke tests.

@danielguillan danielguillan merged commit a9f0c1a into main Mar 22, 2024
17 checks passed
@danielguillan danielguillan deleted the danielguillan/add-pricing-card-component branch March 22, 2024 11:56
@primer-css primer-css mentioned this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants