design-system-react icon indicating copy to clipboard operation
design-system-react copied to clipboard

App Launcher search as optional

Open swilliamset opened this issue 10 years ago • 7 comments

Could we move this block of code behind a prop

https://github.com/salesforce-ux/design-system-react/blob/master/components/app-launcher/index.jsx#L161-L168

swilliamset avatar Aug 03 '16 16:08 swilliamset

I hadn't realized this would ever be optional. Might be better to follow the pattern used by Card.

tweettypography avatar Aug 03 '16 16:08 tweettypography

Update: after discussion we definitely want to follow the pattern used by Card and Global Header

tweettypography avatar Aug 03 '16 16:08 tweettypography

Let's use Card pattern of a search prop, so the children can just be sections

interactivellama avatar Aug 03 '16 16:08 interactivellama

@tweettypography @interactivellama ok, so you are suggesting we have a property on App Launcher called search that accepts a node? (this would allow us to remove props.onSearch and props.searchPlaceholderText)

Also, in card/header.jsx the prop is called filter not search.. should we changes either of these?

Global Header has a slightly different approach, it accepts a GlobalHeaderSearch as a child.

iowillhoit avatar Aug 04 '16 18:08 iowillhoit

Technically this is a filter not a search, too, so I'm in favor of consistency

tweettypography avatar Aug 04 '16 18:08 tweettypography

@tweettypography I'm second guessing this.. I feel like passing in an instance of forms/input/search.jsx as a prop named filter would be confusing.

I think I'm going to keep it called search, that alright?

iowillhoit avatar Aug 04 '16 19:08 iowillhoit

I think it's fine do pass it. It should be wrapped as a child and called components/app-launcher/filter.jsx, so we can change it in the future and magically update.

interactivellama avatar Aug 04 '16 20:08 interactivellama