+
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 May 20, 2024

🚀 Description

  • Migrates Dropdown to Label.
  • Replaces Dropdown's validation message, shown only when invalid, with a description slot to match other controls.
  • Adds the required label attribute to Dropdown's test fixtures.
  • Adds a couple tests to Label and Dropdown asserting they throw when a required slot is missing.

📋 Checklist

  • I have read and followed the Contributing Guidelines.
  • I have added tests to cover new or updated functionality.
  • I have created or updated stories in Storybook to document the new functionality.
  • I have included a changeset with this Pull Request if it adds/updates/removes functionality for consumers.
  • I have scheduled a Design Review for these changes, if one is required.
  • I have followed the ARIA Authoring Practices Guide and/or met with the Accessibility Team to ensure this functionality is accessible.

🔬 How to Test

Have a look at Dropdown. Make sure it looks like production. Run it through a screenreader. Make sure its label is announced even when hidden. Make sure its validation message is announced when the component is invalid.

📸 Images/Videos of Functionality

Horizontal

image

Vertical

image

Copy link

changeset-bot bot commented May 20, 2024

🦋 Changeset detected

Latest commit: 0d170e5

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-components 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

@clintcs clintcs changed the title Migrate dropdown to label Migrate Dropdown to Label May 20, 2024
@clintcs clintcs force-pushed the migrate-dropdown-to-label branch 6 times, most recently from 96615ac to 695bea9 Compare May 20, 2024 21:14
grid-column: 2;
line-height: var(--cs-body-xs-line-height);
margin-block-start: var(--cs-spacing-xxxs);
margin-block-start: var(--cs-spacing-xxs);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Figma calls for --cs-spacing-xxs.

@clintcs clintcs force-pushed the migrate-dropdown-to-label branch from 695bea9 to af0dd28 Compare May 20, 2024 21:33
},
},
args: {
label: 'Label',
Copy link
Collaborator Author

@clintcs clintcs May 20, 2024

Choose a reason for hiding this comment

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

Aha! It's args not argTypes that determines the order.

Before

image

After

image

I'll move required attributes to the top of args across the board in a followup followup PR.

@clintcs clintcs force-pushed the migrate-dropdown-to-label branch 2 times, most recently from 1733c7d to 043d714 Compare May 20, 2024 21:44
</div>
</div>
<div
Copy link
Collaborator Author

@clintcs clintcs May 20, 2024

Choose a reason for hiding this comment

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

The mockups were incomplete. Dropdown is meant to have a description like every other control.

@clintcs clintcs force-pushed the migrate-dropdown-to-label branch 6 times, most recently from e1e989d to 84028ab Compare May 20, 2024 22:21
@clintcs clintcs marked this pull request as ready for review May 20, 2024 22:23
@clintcs clintcs force-pushed the migrate-dropdown-to-label branch from 84028ab to d18381c Compare May 20, 2024 22:23
Co-authored-by: Dan Wenzel <11724146+danwenzel@users.noreply.github.com>
@clintcs clintcs merged commit cee64b3 into main May 21, 2024
@clintcs clintcs deleted the migrate-dropdown-to-label branch May 21, 2024 17:25
@github-actions github-actions bot mentioned this pull request May 21, 2024
@clintcs clintcs mentioned this pull request May 21, 2024
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浏览器服务,不要输入任何密码和下载