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(ListBox): add slug prop to Dropdown, MultiSelect, ComboBox, and Select #15206

Merged

Conversation

tw15egan
Copy link
Collaborator

@tw15egan tw15egan commented Nov 14, 2023

Closes #15188
Closes #15186

This PR adds the slug prop to all ListBox components (Dropdown, MultiSelect, FilterableMultiSelect,
andComboBox) as well as Select.

Changelog

New

  • slugLabel added to Slug that is passed down to ToggletipButton to change the text that is narrated when focusing on the Slug with a screenreader
  • Pass down any additional props to Toggletip or IconButton via ...rest
  • Added all styles for Listbox components to list-box.scss, Select styles

Changed

  • Added the updated components to the AI Form story (Form --> AI Form in Storybook)
  • FIxed a few issues with the Warning icon inner path showing up with the incorrect color in dark themes (should always be black-100)

Testing / Reviewing

Go to Form --> Ai Form in Storybook and ensure the components listed above match the spec

Copy link

netlify bot commented Nov 14, 2023

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 71d0e33
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6555212d3d5e730008e4e1f0
😎 Deploy Preview https://deploy-preview-15206--v11-carbon-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 configuration.

@tw15egan tw15egan changed the title feat(ListBox): add slug prop to Dropdown, MultiSelect, and ComboBox feat(ListBox): add slug prop to Dropdown, MultiSelect, ComboBox, and Select Nov 15, 2023
@tw15egan
Copy link
Collaborator Author

tw15egan commented Nov 15, 2023

Percy error is due to the change in Select that sets the inner path to black-100 to match all other warning icons

Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

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

No feedback, looks good!

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

The caret on the top or bottom of the left or right seems off?

image

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

I don't know if that visual I commented about is blocking - everything else looks great

@tw15egan
Copy link
Collaborator Author

tw15egan commented Nov 16, 2023

@tay1orjones I think this is just a side effect of the autoAlign property on smaller screen sizes with Popover. A user could specify a different alignment for different screen sizes, I have it set to autoAlign for ease of use, but let me know if we want to change this. No positioning was touched in this PR, but we may want to make a separate issue to take a deeper look into this (or bundle with the floating UI refactor).

Update: actually, I think this is exacerbated because we now have a rounded border on the callout. We may have to bump the position of the caret a few pixels for the slug callout

@tay1orjones tay1orjones merged commit 3117cb9 into carbon-design-system:main Nov 16, 2023
21 checks passed
tay1orjones pushed a commit to tay1orjones/carbon that referenced this pull request Nov 16, 2023
…x`, and `Select` (carbon-design-system#15206)

* feat(TextInput): support slug prop

* fix(TextInput): add types for slug prop

* refactor(Slug): remove old file, move demo to form story

* docs(Storybook): update form story

* feat(NumberInput): add slug to NumberInput

* refactor(NumberInput): remove pseudo elements and use box-shadow

* style(NumberInput): fix issue with z-index, add invalid styles

* feat(DatePicker): add slug prop to DatePickerInput

* feat(TextArea): add slug prop to TextArea

* test(snapshot): update snapshots

* fix(TextArea): remove console warning

* style(Fluid): adjust styles for fluid inputs

* docs(Storybook): fix ids

* fix(Slug): adjust positioning, add storybook controls

* fix(Storybook): add story styles to form example

* fix(Slug): adjust positioning when invalid, warning state

* style(Slug): adjust padding when slug is present

* docs(Storybook): add examples with revert functionality

* fix(NumberInput): fix type error

* refactor(storybook): adjust stories

* feat(Slug): add revertLabel prop

* fix(Undo): replace undo, redo with coreect asset

* feat(ListBox): add Slug prop to ListBox components

* fix(Slug): adjust revert positioning, remove margin

* docs(Storybook): rearrange storybook order

* fix(NumberInput): don't set defaultValue if not provided, remove console

* feat(Select): add Slug prop to Select

* chore(files): add ai-gradient to react package

* test(snapshot): update snapshots

* refactor(Slug): remove aria-hidden
@tay1orjones tay1orjones mentioned this pull request Nov 16, 2023
@mattrosno
Copy link
Member

@tw15egan @aagonzales I found a couple overlap and alignment issues. Are these tracked in issues yet?

image image image

@tw15egan
Copy link
Collaborator Author

No issues for things like that yet, can you start one that has any issues you see with the 9 components merged in, and then which variant/state it's occurring? I just need to adjust some padding/positioning between fluid/default states, but I want to ensure I get them all.

@mattrosno
Copy link
Member

@tw15egan will do. I'll create the issue.

danoro96 pushed a commit to danoro96/carbon that referenced this pull request Jan 18, 2024
…x`, and `Select` (carbon-design-system#15206)

* feat(TextInput): support slug prop

* fix(TextInput): add types for slug prop

* refactor(Slug): remove old file, move demo to form story

* docs(Storybook): update form story

* feat(NumberInput): add slug to NumberInput

* refactor(NumberInput): remove pseudo elements and use box-shadow

* style(NumberInput): fix issue with z-index, add invalid styles

* feat(DatePicker): add slug prop to DatePickerInput

* feat(TextArea): add slug prop to TextArea

* test(snapshot): update snapshots

* fix(TextArea): remove console warning

* style(Fluid): adjust styles for fluid inputs

* docs(Storybook): fix ids

* fix(Slug): adjust positioning, add storybook controls

* fix(Storybook): add story styles to form example

* fix(Slug): adjust positioning when invalid, warning state

* style(Slug): adjust padding when slug is present

* docs(Storybook): add examples with revert functionality

* fix(NumberInput): fix type error

* refactor(storybook): adjust stories

* feat(Slug): add revertLabel prop

* fix(Undo): replace undo, redo with coreect asset

* feat(ListBox): add Slug prop to ListBox components

* fix(Slug): adjust revert positioning, remove margin

* docs(Storybook): rearrange storybook order

* fix(NumberInput): don't set defaultValue if not provided, remove console

* feat(Select): add Slug prop to Select

* chore(files): add ai-gradient to react package

* test(snapshot): update snapshots

* refactor(Slug): remove aria-hidden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add AI enhancements to React Select Add AI enhancements to React Dropdown
4 participants