Skip to content

Conversation

danielguillan
Copy link
Contributor

@danielguillan danielguillan commented Jul 17, 2025

Summary

Resolves https://github.com/github/primer/issues/5465. Updates the layout of single item pricing options to stack the content vertically and center align on large viewports.

What should reviewers focus on?

  • Ensure the layout and the spacing are correct in different viewport sizes (desktop, tablet and mobile).
  • Verify that no design regressions have been introduced in the multiple item variants

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
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • 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
image image

Copy link

changeset-bot bot commented Jul 17, 2025

🦋 Changeset detected

Latest commit: 42fad6e

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

This PR includes changesets to release 8 packages
Name Type
@primer/brand-primitives Patch
@primer/react-brand Patch
@primer/brand-docs Patch
@primer/brand-css Patch
@primer/brand-e2e Patch
@primer/brand-fonts Patch
@primer/brand-config Patch
@primer/brand-storybook Patch

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 Jul 17, 2025

🔍 Design token changes found

View CSS variable changes
+ --brand-PricingOptions-items1-container-paddingInline: var(--base-size-32);

Copy link
Contributor

github-actions bot commented Jul 17, 2025

⚠️ 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 marked this pull request as ready for review July 17, 2025 10:46
@Copilot Copilot AI review requested due to automatic review settings July 17, 2025 10:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the PricingOptions component layout to stack single item content vertically and center-align on large viewports, replacing the previous horizontal two-column layout. The changes simplify the CSS structure and improve the visual presentation for single pricing options.

  • Removed complex single-item grid layout with horizontal columns
  • Added vertical stacking with 50% width and center alignment for single items
  • Updated story example to include feature list for better demonstration

Reviewed Changes

Copilot reviewed 4 out of 16 changed files in this pull request and generated no comments.

File Description
PricingOptions.module.css Removes horizontal grid layout for single items, adds vertical centering with 50% width
PricingOptions.features.stories.tsx Moves OneOption story and adds FeatureList items for better visual testing
pricing-options.json Adds new design token for single item container padding
bright-gifts-cheer.md Documents the layout change in changelog
Comments suppressed due to low confidence (1)

packages/react/src/PricingOptions/PricingOptions.module.css:152

  • The CSS custom property name uses inconsistent casing. It should be '--brand-pricing-options-items1-container-padding-inline' to match the established naming pattern used elsewhere in the file.
    --brand-pricing-options-container-padding-inline: var(--brand-PricingOptions-items1-container-padding-inline);

@rezrah
Copy link
Collaborator

rezrah commented Jul 18, 2025

@danielguillan FYI the docs example is broken for one pricing option.

Screenshot 2025-07-18 at 12 33 24

I think this is related to a bug where the Doctocat stylesheet is interfering with our local one. I have a fix, which I'll try to land ASAP. Should fix this bug.

Copy link

@simmonsjenna simmonsjenna left a comment

Choose a reason for hiding this comment

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

LGTM 👍

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.

🚀

@danielguillan danielguillan merged commit 30d9f1f into main Jul 21, 2025
18 checks passed
@danielguillan danielguillan deleted the danielguillan/update-single-pricing-option-layout branch July 21, 2025 15:10
@primer-css primer-css mentioned this pull request Jul 21, 2025
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.

3 participants