Skip to content
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

feat: add readonly dropdown #12430

Merged
merged 10 commits into from
Dec 2, 2022

Conversation

lee-chase
Copy link
Member

@lee-chase lee-chase commented Oct 31, 2022

Contributes to #2177

Closes #12432

Adds the read-only feature to the Dropdown component.

Changelog

Added

  • Adds readOnly property to Dropdown and functionality
  • Adds test for read-only Dropdown
  • Adds styling for read-only Dropdown.

Testing / Reviewing

Reviewed the result in Storybook and a added read-only test.

@netlify
Copy link

netlify bot commented Oct 31, 2022

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b860707
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/638a4a37bd05fa0008f02d54
😎 Deploy Preview https://deploy-preview-12430--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Oct 31, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit b860707
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/638a4a372f0f3b00080a38cc
😎 Deploy Preview https://deploy-preview-12430--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

LGTM!

Looks like you have a couple merge conflicts, and one super small thing, would be nice to add


  readOnly: {
    control: {
      type: 'boolean',
    },
    defaultValue: false,
  }, 

to the Playground.argTypes in storybook

@lee-chase
Copy link
Member Author

lee-chase commented Nov 10, 2022

LGTM!

Looks like you have a couple merge conflicts, and one super small thing, would be nice to add


  readOnly: {
    control: {
      type: 'boolean',
    },
    defaultValue: false,
  }, 

to the Playground.argTypes in storybook

@alisonjoseph conflicts resolved

The readOnly prop appears in the playground but has no default. I'm not sure adding a default value to an optional property would be correct. If anything Storybook should allow an optional property to be reset to undefined.

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

LGTM pending design review 👍 ✅

@aledavila
Copy link
Contributor

@thyhmdo if you could review this when you have time please !

Copy link
Member

@thyhmdo thyhmdo left a comment

Choose a reason for hiding this comment

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

Looks good.

@kodiakhq kodiakhq bot merged commit 776bdf0 into carbon-design-system:main Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Read-only inputs]: Dropdown implementation
6 participants