+
Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Conversation

clintcs
Copy link
Collaborator

@clintcs clintcs commented Jul 23, 2025

🚀 Description

Adds an Options Group component for use in Menu and Select.

📋 Checklist

  • I have followed the Contributing Guidelines.
  • I have added tests to cover new or updated functionality.
  • I have added or updated Storybook stories.
  • I have localized new strings.
  • I have followed the ARIA Authoring Practices Guide or met with the Accessibility Team.
  • I have included a changeset.
  • I have scheduled a design review.
  • I have reviewed the Storybook and Visual Test Report links below.

🔬 Testing

  1. Navigate to Menu's "With Options" story in Storybook.
  2. Verify hovering grouped Option(s) works.
  3. Verify arrowing through grouped Option(s) works.
  4. Verify VoiceOver announces the groups.

Copy link

changeset-bot bot commented Jul 23, 2025

🦋 Changeset detected

Latest commit: 8ded269

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

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

@clintcs clintcs force-pushed the add-options-group branch from 65c9ee5 to a7fc13c Compare July 23, 2025 15:41
),
...this.querySelectorAll<Menu>(
// The "content" slot and Options Group case.
':scope > glide-core-options > glide-core-options-group > glide-core-option > [slot="content"] > glide-core-menu',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🙄

}
.container {
block-size: 1.75rem;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now 28 pixels tall instead of 27. One pixel difference. So I thought I'd skip a changeset for it. Eh?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm on the fence. It is a change that consumers may notice if they have visual tests, similar to how ours detected the diff. So part of me thinks it may be wise to call it out explicitly for visibility.

But I can also communicate this outwardly to folks if we don't feel it's worth one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The visual tests thing is a good point. I'll add a changeset. Thanks.

/**
* @attr {string} label
* @attr {boolean} [hide-label=false]
* @attr {'group'|'optgroup'} [role='group']
Copy link
Collaborator Author

@clintcs clintcs Jul 23, 2025

Choose a reason for hiding this comment

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

optgroup for Select. Select will look for Options Groups in its default slot and set role to "optgroup" for consumers.

@clintcs clintcs force-pushed the add-options-group branch 2 times, most recently from 00d409a to d58ec49 Compare July 23, 2025 15:47
@clintcs clintcs force-pushed the add-options-group branch from d58ec49 to 6b55f6a Compare July 23, 2025 15:50
@clintcs clintcs marked this pull request as ready for review July 23, 2025 15:57
Copy link
Collaborator

@ynotdraw ynotdraw left a comment

Choose a reason for hiding this comment

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

Looks like a minor issue when an Option has a description. Can see the issue here and here with an Option Group + Option description.

To reproduce:

}
.container {
block-size: 1.75rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm on the fence. It is a change that consumers may notice if they have visual tests, similar to how ours detected the diff. So part of me thinks it may be wise to call it out explicitly for visibility.

But I can also communicate this outwardly to folks if we don't feel it's worth one.

@clintcs
Copy link
Collaborator Author

clintcs commented Jul 23, 2025

Looks like a minor issue when an Option has a description. Can see the issue here and here with an Option Group + Option description.

To reproduce:

Derp. Thank you. That's what I get for a making that last minute change. I'll push a fix.

@clintcs clintcs force-pushed the add-options-group branch from 1ece024 to 8ded269 Compare July 23, 2025 17:21
@clintcs
Copy link
Collaborator Author

clintcs commented Jul 23, 2025

Looks like a minor issue when an Option has a description. Can see the issue here and here with an Option Group + Option description.
To reproduce:

Derp. Thank you. That's what I get for a making that last minute change. I'll push a fix.

8ded269

@clintcs clintcs added this pull request to the merge queue Jul 23, 2025
Merged via the queue into main with commit e591e4c Jul 23, 2025
29 checks passed
@clintcs clintcs deleted the add-options-group branch July 23, 2025 18:38
@github-actions github-actions bot mentioned this pull request Jul 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载