Icon Picker: Restore option to hide colors#20650
Conversation
|
Hi there @bjarnef, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to hide the color picker section in the icon picker modal, restoring functionality that existed in the old backoffice UI. This allows developers to programmatically hide colors when opening the icon picker modal by setting hideColors: true in the modal data.
Key Changes:
- Added
hideColorsproperty to the icon picker property editor and modal interfaces - Refactored color picker rendering into a conditional
renderColors()method
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| property-editor-ui-icon-picker.element.ts | Adds hideColors property and passes it to the modal data |
| icon-picker-modal.token.ts | Extends modal data interface with optional hideColors boolean field |
| icon-picker-modal.element.ts | Refactors color picker rendering into conditional method that respects hideColors flag |
...Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts
Show resolved
Hide resolved
...Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts
Show resolved
Hide resolved
|
Hi again @bjarnef! Thanks for this PR to fix part of the discussion in #20647 and add the option to hide colours from the icon picker (previously available in the old backoffice UI). I've just seen some merge conflicts that don't look easy to auto-resolve - are you comfortable to look into those before one of the team take a look at this? Best regards Emma |
|
@nielslyngsoe @AndyButland is it possible we can bring back this feature? 🙏 In a current project on 16.3.4, I am re-using icon picker / icon modal, but would really like to hide colors as it was possible in Umbraco 13 😎 If possible it would be great if it can be included in 16.5.0 |
|
@AndyButland I think it is considered a regression this wasn't re-implemented in v17 :) |
|
I think this will be a nice addition @bjarnef. If you could get it up to date with |
...Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts
Show resolved
Hide resolved
…on-picker-hide-colors # Conflicts: # src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts
AndyButland
left a comment
There was a problem hiding this comment.
I've tested this out and it all works as expected. You can define the icon picker to have the colour selections hidden, and choosing icons works correctly whether colours are shown or not. Thanks for the contribution @bjarnef.
* Add option to hide colors from icon picker * Hide colors * Hide colors from config # Conflicts: # src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-picker-modal/icon-picker-modal.element.ts
|
Backported to |
Prerequisites
If there's an existing issue for this PR then this fixes
Description
This PR fix part of the discussion in #20647 and add the option to hide colors from icon picker, which was previously available in the old backoffice UI: #13079
It would be great if we furthermore can pass in an arrray of color/swatch modal to override the
umbracoColorsarray, but I still think it is useful explicit to hide colors even though colors may be defined.Example:
or via configuration of
Umb.PropertyEditorUi.IconPicker.