Skip to content
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

Support custom SVG icon in umb-child-selector component #10344

Merged

Conversation

bjarnef
Copy link
Contributor

@bjarnef bjarnef commented May 27, 2021

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #10340

Description

When using custom SVG icons these were not show in <umb-child-selector> component.
Furthermore this PR also replace the search filter markup with <umb-search-filter> component.

image

image

The compass icon is a custom font icon from my Material Design Icon Pack, the coffee icon a custom SVG icon and the rest Umbraco core icons.

image


This item has been added to our backlog AB#12146

@umbrabot
Copy link

umbrabot commented May 27, 2021

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:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • The contribution looks original and the contributor is presumably allowed to share it

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 🤖 🙂

@bjarnef bjarnef marked this pull request as ready for review May 27, 2021 17:55
@bjarnef
Copy link
Contributor Author

bjarnef commented May 27, 2021

Okay, I noticed a minor issue in list of datatypes / property editors, because items doesn't have the umb-card-grid-item class, but previous just used .umb-card-grid i in less.

image

Furthermore I noticed if using a custom SVG icon in a property editor, e.g. icon-coffee-cup this wasn't shown either.

image

@bjarnef
Copy link
Contributor Author

bjarnef commented May 27, 2021

It now looks like this.

image

@bjarnef
Copy link
Contributor Author

bjarnef commented May 27, 2021

I also noticed it is a similar issue if using property editor as macro parameter editor: https://our.umbraco.com/documentation/extending/macro-parameter-editors/

image

Fixed in a4d6847

image

@bjarnef
Copy link
Contributor Author

bjarnef commented May 27, 2021

A custom SVG icon was missing here as well - fixed in a54b0b1

image

@bjarnef
Copy link
Contributor Author

bjarnef commented May 28, 2021

@nul800sebastiaan is it too late to fix this in 8.14.0 release?

@nul800sebastiaan
Copy link
Member

@bjarnef Awesome! But yes, about 2 hours too late for the 8.14 release, not to worry, we'll get it into a patch release instead 👍 Thanks for the help, you're a star!

@nul800sebastiaan nul800sebastiaan added release/8.13.2 release/8.14.1 state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks labels May 28, 2021
@bjarnef
Copy link
Contributor Author

bjarnef commented May 28, 2021

Oh no! 😱 ... no espresso for me then ☕
Hopefully in the next patch releases then 🩹

@bjarnef bjarnef changed the title Show custom SVG icons in umb-child-selector component Support custom SVG icons in umb-child-selector component May 31, 2021
@bjarnef bjarnef changed the title Support custom SVG icons in umb-child-selector component Support custom SVG icon in umb-child-selector component May 31, 2021
Copy link
Contributor

@nathanwoulfe nathanwoulfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, thank you @bjarnef

It still bugs me that we pass the icon string into the umbIcon directive twice (once as the icon attribute, and again in the class). Probably not worth worrying about now, given it would be a pretty big change, but I'm sure we could be using the class attribute only for additional styling (color, size etc), then adding the icon attribute into the class string when we're rendering. Ideally the new UI will drop support for legacy icons, so the umbIcon component would be up for a rebuild anyway

@nathanwoulfe nathanwoulfe merged commit c2c6413 into umbraco:v8/contrib Jun 6, 2021
@bjarnef bjarnef deleted the v8/bug/umb-child-selector-icons branch June 6, 2021 22:40
@umbrabot umbrabot removed the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document type child nodes not showing custom icons
4 participants