You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Font Awesome Icon Chooser React component to allow our content editors to choose icons to use in our content. As I'm not able to guarantee the component will be retained across selections, it would be quite useful if the following updates were made to the component:
Component Props
defaultStyleFilters: IconPrefix | IconPrefix[] | CssStyleClass | CssStyleClass[] | IconStyle | IconStyle[] | undefined - would allow us to pass in style filters that we want applied by default. Currently the default is hard-coded to Solid, Brands, and Uploaded. If the prop isn't set it would fall back to the current functionality. This will also help with retaining previous state.
availableStyleFilters: IconPrefix | IconPrefix[] | CssStyleClass | CssStyleClass[] | IconStyle | IconStyle[] | undefined - would allow us to pass in style filters that we want to be available for selection. Currently all styles are displayed. If the prop isn't set it would fall back to the current functionality. If a UI is being built with a specific icon style, we may not need or want all of the filters to be available and this will simplify the UI.
currentIcon: IconDefinition | IconLookup | undefined - would allow us to pass in the currently selected icon. It would turn on the applicable style filters and populate the search input with the icon name. If the style conflicts with availableStyleFilters, this prop would be treated as undefined. This will help with retaining the previous state.
Event Handlers
Include the user-selected style filters in the event.detail passed to the onFinish handler. This will allow us to store them as necessary and use them later (such as in defaultStyleFilters)
The text was updated successfully, but these errors were encountered:
@TSIA-SN and @Gilighost I've just released 0.7.0, which removes the defaultStyleFilters functionality entirely.
This is because it relied on a static/hardcoded list of familyStyles, which meant that this icon chooser could only support newly released familyStyles (there've been several--and more on the way!) when this component's source code is updated (which is not often enough!)
Could you let me know how this impacts your feature request, one way or another? At a minimum, it seems like the request would need to be reframed given the new UI.
At worst, perhaps you'll think this change throws a wrench in your content editor's existing workflows. Or maybe, like me, it'll seem like a welcome solution to a problem.
I'm using the Font Awesome Icon Chooser React component to allow our content editors to choose icons to use in our content. As I'm not able to guarantee the component will be retained across selections, it would be quite useful if the following updates were made to the component:
defaultStyleFilters='far'
defaultStyleFilters={['fa-solid', 'fa-regular', 'fad']}
availableStyleFilters='far'
availableStyleFilters={['fa-solid', 'fa-regular', 'fad']}
onFinish
handler. This will allow us to store them as necessary and use them later (such as indefaultStyleFilters
)The text was updated successfully, but these errors were encountered: