Overview
Currently the search box will render a searchingIndicator React node passed in as an optional prop from Unity Bar's host application to be rendered when the isSearching prop is set to be true.
In cases when isSearching is true but no searchingIndicator prop has been passed in, the current fallback is to keep displaying the magnifying glass icon.
However, it'd be preferable to give the search box a defaultProp to render in cases when searchingIndicator is null. We can use a cleaned up FA SVG to match the other icons. This would make it so other apps don't have to pass in a searching indicator at all and still enable the search box to get into a searching state.
Describe the solution you'd like
-
add a cleaned up FA spinner SVG. Check with @lederer about what is the correct icon to use and what is the correct cleaning to do on the SVG file.
-
include the spinner icon in the SVGIcons component with an ID like pwdub-icon-spinner
-
use something like this as the defaultProp for the searchingIndicator in the UnityBar:
<svg className="icon" aria-hidden="true">
<use xlinkHref="#pwdub-icon-spinner" />
</svg>
Overview
Currently the search box will render a
searchingIndicatorReact node passed in as an optional prop from Unity Bar's host application to be rendered when theisSearchingprop is set to betrue.In cases when
isSearchingistruebut nosearchingIndicatorprop has been passed in, the current fallback is to keep displaying the magnifying glass icon.However, it'd be preferable to give the search box a
defaultPropto render in cases whensearchingIndicatoris null. We can use a cleaned up FA SVG to match the other icons. This would make it so other apps don't have to pass in a searching indicator at all and still enable the search box to get into a searching state.Describe the solution you'd like
add a cleaned up FA spinner SVG. Check with @lederer about what is the correct icon to use and what is the correct cleaning to do on the SVG file.
include the spinner icon in the SVGIcons component with an ID like
pwdub-icon-spinneruse something like this as the defaultProp for the
searchingIndicatorin the UnityBar: