Skip to content

feat(UnderlineNav): Support inset and flush variants #5829

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

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

Conversation

maraisr
Copy link
Contributor

@maraisr maraisr commented Mar 27, 2025

Variant: flush

image

Variant: inset (default)

image

Changelog

New

Added inset and full as variant props to UnderlineNav to aid in removing horizontal spacing.

Rollout strategy

  • Patch release

Testing & Reviewing

Since the current behaviour is with inset spacing, the default for this new prop is also inset. So fully backwards compatible, a testing strategy is that all existing vrt tests pass.

Merge checklist

Copy link

changeset-bot bot commented Mar 27, 2025

🦋 Changeset detected

Latest commit: eb68c08

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Mar 27, 2025
Copy link
Contributor

github-actions bot commented Mar 27, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 94.51 KB (+0.09% 🔺)
packages/react/dist/browser.umd.js 94.49 KB (-0.08% 🔽)

Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

Heads up that we're about to remove the CSS Modules feature flag from UnderlinePanel early next week. I would hold off on this until that merges so that you don't need to extend this behavior to sx

@lesliecdubs
Copy link
Member

lesliecdubs commented Apr 26, 2025

Hey @maraisr, thanks for the PR! Is this ready for review once conflicts are resolved?

@maraisr
Copy link
Contributor Author

maraisr commented Apr 28, 2025

Hi @lesliecdubs, I don't think its ready yet. Failing tests, conflicts etc. I have not had much time to get this PR up to shape, so if somebody on the team is looking to take this on, please do! 🚀 If not, I'll dedicate some time by the end of this week to wrap this up. 👍 I think its a great feature, and unlocks the removal of some sx usages in product code!

@hectahertz hectahertz self-requested a review May 19, 2025 14:25
@@ -11,6 +9,11 @@
/* using a box-shadow instead of a border to accomodate 'overflow-y: hidden' on UnderlinePanels */
/* stylelint-disable-next-line primer/box-shadow */
box-shadow: inset 0 -1px var(--borderColor-muted);

&:where([data-flush="false"], &[data-flush="false"] &) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If you could add a small explanation of the selector that would be nice, not required

@hectahertz
Copy link
Contributor

@maraisr if you have some time to make those changes I'd love to get this merged!

@hectahertz hectahertz assigned hectahertz and unassigned hectahertz May 20, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-5829 May 29, 2025 00:00 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-5829 May 29, 2025 00:13 Inactive
@maraisr maraisr changed the title feat: support the ability to remove inline padding feat(UnderlineNav): Support inset and full variants May 29, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-5829 May 29, 2025 01:37 Inactive
Copy link
Contributor

github-actions bot commented May 29, 2025

Uh oh! @maraisr, at least one image you shared is missing helpful alt text. Check your pull request body to fix the following violations:

  • Images should have meaningful alternative text (alt text) at line 5
  • Images should have meaningful alternative text (alt text) at line 9

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

🤖 Beep boop! This comment was added automatically by github/accessibility-alt-text-bot.

@github-actions github-actions bot requested a deployment to storybook-preview-5829 May 29, 2025 01:44 Abandoned
@maraisr maraisr marked this pull request as ready for review May 29, 2025 01:46
@maraisr maraisr requested review from a team as code owners May 29, 2025 01:46
@github-actions github-actions bot temporarily deployed to storybook-preview-5829 May 29, 2025 01:58 Inactive
@primer-integration
Copy link

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/380428

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels May 29, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-5829 May 29, 2025 06:01 Inactive
Copy link
Contributor

@hectahertz hectahertz left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks for your contribution!! 🚀

I think flush would work better, as that's what we've used in other components. If you could please change that, then we can merge this :)

Approving in advance!

@@ -145,3 +145,13 @@ export const CountersLoadingState = () => {
</UnderlineNav>
)
}

export const Full = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export const Full = () => {
export const VariantFull = () => {


const meta: Meta<typeof UnderlineNav> = {
title: 'Components/UnderlineNav',
component: UnderlineNav,
parameters: {
controls: {
expanded: true,
// variant and size are developed in the first design iteration but then they are abondened.
// size and others were developed in the first design iteration but then they are abandoned.
Copy link
Contributor

Choose a reason for hiding this comment

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

abondened

lol

@maraisr maraisr changed the title feat(UnderlineNav): Support inset and full variants feat(UnderlineNav): Support inset and flush variants May 29, 2025
@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants