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

Document SearchBar changes from Security migration #4239

Open
Tracked by #4611
elycheea opened this issue Feb 7, 2024 · 2 comments
Open
Tracked by #4611

Document SearchBar changes from Security migration #4239

elycheea opened this issue Feb 7, 2024 · 2 comments
Assignees
Labels
area: migration ➡️ Migration of Security package to IBM Products

Comments

@elycheea
Copy link
Contributor

elycheea commented Feb 7, 2024

(See example)

Review original SearchBar component from v1 IBM Products / Security against the new version introduced in main.
Update migration notes in Box.

@elycheea elycheea mentioned this issue Feb 7, 2024
5 tasks
@elycheea elycheea changed the title Document changes for migration ([see example](https://github.com/carbon-design-system/ibm-products/pull/4139)) Document SearchBar changes from Security migration Feb 7, 2024
@elycheea elycheea added the area: migration ➡️ Migration of Security package to IBM Products label Feb 7, 2024
@elycheea elycheea self-assigned this Feb 8, 2024
@elycheea
Copy link
Contributor Author

elycheea commented Feb 26, 2024

Prop updates

This is as implemented in initial PR. Props still subject to change during subsequent reviews, especially around the time of release review.

e.g. placeHolderText may become placeholderText.

Old prop New prop Change
className className
clearButtonLabelText clearButtonLabelText
hideScopesLabel hideScopesLabel
labelText labelText No longer required
onChange onChange
onSubmit onSubmit
placeHolderText placeHolderText
Suggest changing to placeholderText
scopeToString scopeToString
scopes scopes
scopesTypeLabel scopesTypeLabel
selectedScopes selectedScopes
sortItems sortItems
submitLabel submitLabel
titleText titleText
translateWithId translateWithId
value value

Additional notes —

  • FYI, noticing that several of the props, (scopesTypeLabel, scopes, selectedScopes, translateWithId, sortItems) are meant to be passed to the MultiSelect. Since these are all related, I wonder if it would make sense to follow the approach from @davidmenendez where we have Dropdown in AddSelect and we group these related props in an object/array.
  • Don’t think we see titleText in use at all so may be worth deprecating. Actually, it looks like another MultiSelect prop only don’t see it passed anywhere. May be okay to remove if we use the approach from David? 🤔
  • Should set controls for more search bar props in Storybook.

@davidmenendez
Copy link
Contributor

FYI, noticing that several of the props, (scopesTypeLabel, scopes, selectedScopes, translateWithId, sortItems) are meant to be passed to the MultiSelect. Since these are all related, I wonder if it would make sense to follow the approach from @davidmenendez where we have Dropdown in AddSelect and we group these related props in an object/array.

yeah i agree with this. basically any time that we're working with multiple carbon components we should do our best to enable users to pass as many props to those components for maximum flexibility. unless there's a specific callout in the design to not use something specific we should probably have something like btnProps = {} and multiSelectProps = {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: migration ➡️ Migration of Security package to IBM Products
Projects
Status: Done 🚀
Development

No branches or pull requests

2 participants