+
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 Dec 5, 2024

🚀 Description

N/A

📋 Checklist

🔬 How to Test

  1. Navigate to Dropdown in Storybook.
  2. Open Dropdown.
  3. Click a disabled option.
  4. Verify nothing happens.
  5. Tab to Dropdown.
  6. Arrow through the options.
  7. Verify disabled options are skipped over.
  8. Hover over the first option.
  9. Verify a tooltip is not shown.
  10. Rinse and repeat for multiselect Dropdown.

📸 Images/Videos of Functionality

image image

Copy link

changeset-bot bot commented Dec 5, 2024

🦋 Changeset detected

Latest commit: 382480a

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

Copy link
Contributor

github-actions bot commented Dec 5, 2024

@clintcs clintcs changed the title Add disabled attribute to dropdown option Add disabled attribute to Dropdown Option Dec 5, 2024
@clintcs clintcs force-pushed the add-disabled-attribute-to-dropdown-option branch from a7a5d8f to be7a935 Compare December 5, 2024 15:51
<glide-core-dropdown-option
label="Two"
value="two"
?selected=${arguments_['<glide-core-dropdown-option>.two.selected']}
Copy link
Collaborator Author

@clintcs clintcs Dec 5, 2024

Choose a reason for hiding this comment

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

For testing purposes. I'll revert this and everything below before merging.

@clintcs clintcs force-pushed the add-disabled-attribute-to-dropdown-option branch from be7a935 to 5b0f1f5 Compare December 5, 2024 17:39
'reportValidity()': '',
required: false,
'select-all': false,
'select-all': 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.

Suggested change
'select-all': true,
'select-all': false,

Comment on lines 59 to 60
'<glide-core-dropdown-option>.label':
'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
'<glide-core-dropdown-option>.label':
'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
'<glide-core-dropdown-option>.label': 'One',

'<glide-core-dropdown-option>.label':
'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
'<glide-core-dropdown-option>.addEventListener(event, handler)': false,
'<glide-core-dropdown-option>.disabled': 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.

Suggested change
'<glide-core-dropdown-option>.disabled': true,
'<glide-core-dropdown-option>.disabled': false,

@clintcs clintcs force-pushed the add-disabled-attribute-to-dropdown-option branch 6 times, most recently from b8d59c9 to 914f778 Compare December 5, 2024 18:13
reflect: true,
type: Boolean,
})
privateDisableLabelTooltip = false;
Copy link
Collaborator Author

@clintcs clintcs Dec 5, 2024

Choose a reason for hiding this comment

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

I talked to Design. They don't want the tooltip shown on hover when an option is disabled. This property makes that happen.

@clintcs clintcs force-pushed the add-disabled-attribute-to-dropdown-option branch 4 times, most recently from 7554d5f to 1761d3a Compare December 5, 2024 18:56
---

- Dropdown Options now support a `disabled` attribute.
- Dropdown now dispatches "input" events before "change" to match native.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bonus.

@clintcs clintcs force-pushed the add-disabled-attribute-to-dropdown-option branch 3 times, most recently from e74efd4 to c4dc796 Compare December 5, 2024 21:37
@clintcs clintcs marked this pull request as ready for review December 5, 2024 21:37
@clintcs clintcs force-pushed the add-disabled-attribute-to-dropdown-option branch from c4dc796 to 382480a Compare December 9, 2024 13:48
@clintcs clintcs merged commit f735a31 into main Dec 9, 2024
7 checks passed
@clintcs clintcs deleted the add-disabled-attribute-to-dropdown-option branch December 9, 2024 13:57
@github-actions github-actions bot mentioned this pull request Dec 9, 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.

3 participants

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