Removed icon font classes from umb-icon implementations#9255
Removed icon font classes from umb-icon implementations#9255nathanwoulfe merged 8 commits intoumbraco:v8/contribfrom RachBreeze:v8/tmpiconfixes
Conversation
Merge latest Umbraco v8 into my repo
…into v8/contrib # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
… the icon and the class name may need to be the same in order for umb-icon to work
|
Hi @RachBreeze, apologies for taking so long to get to this! I've sorted the merge conflict on this one (our fault for letting your PR sit for six weeks...), and made a couple of updates:
If you wouldn't mind casting an eye over the bits I changed, then I'll merge if it's all good. |
|
@nielslyngsoe fyi - changes to the variant scheduling UI. Per my previous comment too, is there a reason the UI for variant is different to non-variant? |
|
Hi @nathanwoulfe this does look good, the only two thoughts that cross my mind say are that I can't use the keyboard to navigate into the scheduled dates, but I've checked against an older version (8.7.0) and that is true there too (and again would need a separate PR). Also thank you for rejigging the CSS and removing |
|
@RachBreeze would have been helpful too if I'd shared a before shot... Buttons were not styled as buttons, and the alignment was all a bit skewy. And for comparison, invariant scheduling looks like this: I'll merge this one, then further changes can be a fresh PR 😄 |
|
@RachBreeze removing the icon name from the class in It used to inherit the font family here, which doesn't seem to work with the legacy icons using font icons and If I add back the class here it inherit the correct font family, otherwise it isn't the It might not be necessary for to include the icon name when SVG icons are available, but it seems to be necessary to ensure backward compatibility with font icons. A great way to test this is to install a custom font icon package, e.g. Material Design Icon Pack and in this case search for With the latest changes in If I add back the icon name to the class, where Some places it might be okay to remove the class on |
|
@nul800sebastiaan can we revert part of these changes to ensure legacy icons still are shown correct? |
|
Maybe we could modify the directive always render the icon attribute into the class as well? That way the class can be passed for adding additional styles (sizes, colours etc), but we'll know that the icon name is also added as a class. Saves devs having to decide whether or not they need to pass the icon name as class as well. |
|
@nathanwoulfe yes, it might be an option the render icon in class attribute here as well https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/views/components/umb-icon.html#L1 I haven't tested it though. |
|
It can by default set cssClass to icon name and add additional classes. |
|
Thanks all! I've added back the icon name in I see another problem with some search boxes now, the icon is aligned left and pushing the search box down, any ideas? |
|
@nul800sebastiaan cool, however it is not only an issue in iconpicker - also if using font icon in component which use yes, I have fixed that as well in #9631 |
|
The suggestion @nathanwoulfe might work, e.g. something like this. I haven't tested it though. |
(cherry picked from commit f869259)
|
Alright, given that we are building a release candidate of 8.11 today, I'm going to have to revert all these changes for now. We'll need to re-attempt this PR with all the problems fixed. Sorry @RachBreeze that it can't be part of 8.11 yet, but we'll get there! |
|
@nul800sebastiaan no worries and I totally understand :-) and thank you |
This reverts commit 1b95282.
This reverts commit 7a71bc5.









@MMasey implementation of
umb-iconmeans that the font icon classes can be removed and replaced with svgs.This is done by replacing
<i>directive with theumb-icondirective. Hoiwever in a number of places the icon font name has been left in the class, and this is not required. This PR removes the unnecessary classes.