-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Datatype Collection: Add fallback icon for datatype #21269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datatype Collection: Add fallback icon for datatype #21269
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a fallback icon for datatypes in the collection view to match the behavior already present in the tree view. Previously, datatypes without an icon (such as those not yet migrated to new property editor UI) would not display any icon in the collection table view, while the tree correctly showed 'icon-circle-dotted' as a fallback.
Key Changes
- Added fallback to 'icon-circle-dotted' icon for datatypes that don't have a specific icon assigned
|
And hello @bjarnef :) Thanks for your PR to add a fallback icon for the datatype, along with the screenshots for replication. I like the idea of a standard fallback icon. Something HQ would be best to confirm but makes sense to avoid duplication. One of the Core Collaborators team will review this as soon as possible. As before, just wondering if is there an associated issue for this (to avoid duplication or rework)? If so, please could you link to it. Thanks, |
|
@bjarnef I don't suppose you have a quick way for me to add the files to replicate this in a test please (e.g. if you have a legacy property editor I can borrow)? No worries if not - I started a fresh install on my PC. |
|
@emmagarland the simplest is probably to copy over e.g. a Umbraco v13 database (or change connection string to an Umbraco 13, e.g. with The Starterkit installed). When the property editor UI is missing, it should show this for the existing datatype instance. |
engijlr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, the fallback logic is correct and matches the tree view pattern 👍
Prerequisites
Description
The collection view for datatypes didn't show fallback icon as in tree, e.g. for a datatype not migrated/updated to new property editor UI:
Perhaps it should use this utility function throughout the code, so it doesn't hardcode
icon-circle-dottedmore than necessary.The function could optional have a parameter to set fallback icon besides default.
Umbraco-CMS/src/Umbraco.Web.UI.Client/src/packages/core/entity-item/utils.ts
Lines 12 to 18 in cbde6af