Add property to hide colors/swatches from icon picker #20647
bjarnef
started this conversation in
Features and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I had a look at reusing
Umb.PropertyEditorUi.IconPickeras property editor wrapping inside a custom component as it isn't directly available as property editor: #20632However it doesn't seem to be that easy (and maybe just the lack of my knowledge for now):
https://forum.umbraco.com/t/re-use-icon-picker-property-editor/6455
And since the
umb-property editor ui components are not exported.It works however copying most of this inside my own component:
https://github.com/umbraco/Umbraco-CMS/blob/8434c7d0cbf919532be72e0c86bfed5a3af66877/src/Umbraco.Web.UI.Client/src/packages/property-editors/icon-picker/property-editor-ui-icon-picker.element.ts
It seems the
dataproperty is not available yet (but in v17, and in v16.4 I guess):Umbraco-CMS/src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.token.ts
Lines 3 to 6 in e893682
However in v13 I recall it was possible to hide swatches/colors from model.
It seems to be an oversight that this feature hasn't been implemented in the new backoffice: #13079
This will be useful, when one just want a icon picker and color doesn't matter (as styled in frontend anyway).
Perhaps also an filter function or similar, e.g. to filter icons by
prefix? That way it would be possible to only show icons from a specific icon pack (although all icons may be shown in default icon picker used for content type icons).For example if using Iconoir icon pack by @warrenbuckley in a custom property editor UI for a specific block one don't want e.g. Lucide icons + social icons from simple icons to show up in this picker:
https://marketplace.umbraco.com/package/umbraco.community.iconpack.iconoir
Although most probably just want neutral/black icons here, it would be useful if we even can configure swatches for the project brand colors.
For this specific project we have specific brand colors:
umbraco/Umbraco.UI#653
We can solve this just styling the icons in frontend (or a separate setting for icon color), but in this case it would make sense if the custom can select icon color as well :)
Beta Was this translation helpful? Give feedback.
All reactions