+
Skip to content

Conversation

clintcs
Copy link
Collaborator

@clintcs clintcs commented Sep 3, 2025

🚀 Description

Patch

Select now supports multiselection via a new multiple attribute.

📋 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.

🔬 Manual Testing

  1. Navigate to Select in Storybook.
  2. Add the multiple attribute.
  3. Verify multiselection works as you'd expect.

Copy link

changeset-bot bot commented Sep 3, 2025

🦋 Changeset detected

Latest commit: e622ea2

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-select-multiple-attribute branch 8 times, most recently from 4f0fb49 to 546b1b8 Compare September 9, 2025 16:54
import { html } from 'lit';
import { expect, test } from './playwright/test.js';

test(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just moved single-select specific tests from select.test.keyboard.ts.

import { html } from 'lit';
import { expect, test } from './playwright/test.js';

test(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just moved single-select specific tests from select.test.miscellaneous.ts.

const options = page.getByRole('option');

// eslint-disable-next-line playwright/no-force-option
await options.first().click({ force: true });
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Another legitimate use of { force: true }.

await expect(page).toHaveScreenshot(
`${test.titlePath.join('.')}.png`,
);
test.describe('multiple=${false}', () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wrapped a few existing tests in test.describe('multiple=${false}' and test.describe('multiple=${true}'.

@clintcs clintcs force-pushed the add-select-multiple-attribute branch 2 times, most recently from c7942cf to 53f827e Compare September 9, 2025 17:29
@clintcs clintcs marked this pull request as ready for review September 9, 2025 17:44
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.

Nice!

});

test(
'sets `aria-multiselectable` on its target when multiselect initially',
Copy link
Collaborator

Choose a reason for hiding this comment

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

aria-multiselectable TIL

<glide-core-options>
<glide-core-option label="One" value="one"></glide-core-option>
<glide-core-option label="Two" value="two"></glide-core-option>
<glide-core-option label="One" value="one"></glide-core-option>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Assume the duplicate value is intentional, eh?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Aye. Because multiple options can have the same value.

@clintcs clintcs force-pushed the add-select-multiple-attribute branch from 53f827e to e622ea2 Compare September 10, 2025 13:42
@clintcs
Copy link
Collaborator Author

clintcs commented Sep 10, 2025

Rebased to resolve the changeset conflict.

@clintcs clintcs enabled auto-merge September 10, 2025 13:43
@clintcs clintcs added this pull request to the merge queue Sep 10, 2025
Merged via the queue into main with commit 7f2b520 Sep 10, 2025
22 checks passed
@clintcs clintcs deleted the add-select-multiple-attribute branch September 10, 2025 13:58
@github-actions github-actions bot mentioned this pull request Sep 9, 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.

2 participants

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