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

Change the icon in the Document Types Tree to be the chosen icon instead of a default one. #7358

Open
wants to merge 1 commit into
base: v8/dev
from

Conversation

@prjseal
Copy link
Contributor

prjseal commented Dec 18, 2019

In the Settings section, Document Types tree we see all document types with the exact same default icon like this

image

In the content type picker that was recently added we can see the icon for the doc type and its colour like this:

image

As a developer / architect of an umbraco site it would be so useful to be able to see which icons and colours have been chosen for a document type at the tree level. It would save us clicking through to each document type to see which icon has been chosen for it. Also it would give continuity to what we have with the content type picker, showing the icon and colour.

My PR fixes this issue and shows us the chosen icon with its colour instead of just a black default doc type icon. Here is what it will look like:

image

…ther than the default doc type icon
@prjseal prjseal changed the title - changed the icon in the document types tree to be the icon chose ra… Change the icon in the Document Types Tree to be the chosen icon instead of a default one. Dec 18, 2019
@bjarnef

This comment has been minimized.

Copy link
Contributor

bjarnef commented Dec 18, 2019

What happens if the developer use a folder icon as a repository, archieve or similar for e.g. document type or media type (and not a different color)?

In that case it would looks like a folder in the tree, which it isn't.
Does that mean developers shouldn't be able to use "folder" icons for e.g. document types?

@prjseal

This comment has been minimized.

Copy link
Contributor Author

prjseal commented Dec 18, 2019

@bjarnef this isn't stopping anyone from using icons, this is showing them which icons they have used. In your scenario above, they could use the folder icon and maybe use a different colour for it to differentiate it from the actual folders.

@bjarnef

This comment has been minimized.

Copy link
Contributor

bjarnef commented Dec 18, 2019

@prjseal yes, I don't say it doesn't work, but if they don't use a different color and a folder icon (core folder icon or another folder icon), it might be confusing in the tree because it looks like a folder, but it isn't.

With the content tree it is different, because the developer define the structure. In document, media and member types the "folder" nodes and the icon of these are defined in core.

Imagine the "Article list" was using a folder icon and just default color (black). It would look like the other tree folders, but the behaviour is not the same, e.g. there is no right-click action to create a folder on this document type (which looks like a folder).

For newbies this could be confusing and personally I like the building blocks are neutral.

@jacklawry

This comment has been minimized.

Copy link

jacklawry commented Dec 18, 2019

Seams to make sense to me… If there is an icon why not use it.

@OwainWilliams

This comment has been minimized.

Copy link
Contributor

OwainWilliams commented Dec 18, 2019

We were actually talking about this in the office today. I think it makes sense.

I get what @bjarnef is saying thought about the defaults and if you then use the folder icon for something else it could cause confusion. Is it maybe a thought to change the defaults to be something that can't be used by the developer so there is no confusion?

I guess the problem with changing the defaults though is that a folder works well for the current purpose. It is a difficult thing to get right but I do think changing the icons is a good idea and helps from a visual point of view to find things quicker.

@bjarnef

This comment has been minimized.

Copy link
Contributor

bjarnef commented Dec 18, 2019

@OwainWilliams how to ensure developers doesn't use same folder icon? At the moment it is possible to add your own custom font icons, so you can probably always use same icon, e.g. folder icon from Font Awesome package.

Although the folder icon not is exactly the same, it might still cause some confusion.

@prjseal

This comment has been minimized.

Copy link
Contributor Author

prjseal commented Dec 18, 2019

@bjarnef if this is a problem, why do they use the actual icons on the content type picker? That has been approved and merged into live. This is being consistent with that. It's better to be consistent than to do things differently. That can cause more confusion.

@deMD

This comment has been minimized.

Copy link

deMD commented Dec 18, 2019

I love it. I am a pretty visual person so if I can find the doc type I want to edit by just seeing the icon I become very happy.

Though one suggestion, if no icon has been selected, the current one should be shown, and not the page icon.

@OwainWilliams

This comment has been minimized.

Copy link
Contributor

OwainWilliams commented Dec 18, 2019

@OwainWilliams how to ensure developers doesn't use same folder icon? At the moment it is possible to add your own custom font icons, so you can probably always use same icon, e.g. folder icon from Font Awesome package.

Although the folder icon not is exactly the same, it might still cause some confusion.

I was just voicing a thought - not a solution :D I don't know how you ensure a developer doesn't use a folder icon.

@bjarnef

This comment has been minimized.

Copy link
Contributor

bjarnef commented Dec 18, 2019

@prjseal I can't say why it has been approved to use icons in the content type picker, just that there ser potential issues using the selected icons for content types.

The content tree and content type trees (document type, media type and member type are two different things).

In content tree you as developer decide/define the icons and where you want to use folder icons. In content type tree the folder icon is defined in core, so other kind of folder icons shown in the tree could cause confusion. In section picker we don't use icons either.

@CarlSargunar

This comment has been minimized.

Copy link

CarlSargunar commented Dec 18, 2019

I really love this idea - making searching for types visually makes it much faster and easier, removes mental load.

And I think the solutions suggested for folders work too. All for this

@ReVoid

This comment has been minimized.

Copy link
Contributor

ReVoid commented Dec 18, 2019

I remember when I develop my very first document types with Umbraco, I wondered why it possible to set an icon, but it doesn't reflect to document type tree like everywhere else?

I think it is a good idea! DocTypes tree becomes much more intuitive and friendly.

@bjarnef All you told sound reasonable, but if I have to choice of two evils, I would prefer different icons. May be a compromise would solve the problem, like make all the icons in one color except folder icon. @prjseal What do you think about it?

@bjarnef

This comment has been minimized.

Copy link
Contributor

bjarnef commented Dec 18, 2019

@nielslyngsoe has some thoughts of if we should limit the number of colors to use:
#7360

Furthermore if we change this, it should also be reflected on media types and member types as well, where the default "folder" media type use a folder icon.

In settings under media types the folder media type will then look like a subfolder, but it isn't. That is where I think it will be inconsistent, because they look similar but have different behaviour.

@skttl

This comment has been minimized.

Copy link
Contributor

skttl commented Dec 19, 2019

I've been thinking of doing the same. I like it, and it makes it a lot easier to find the desired doctype in a hughe pile of doctypes.

I see the concern of having doctypes with the folder icon clash with doc type containers. But we already allow doctypes without folder-icons to be expandable in the content tree, so I don't think the presence of a folder icon says "expand me" that much more than the little arrow besides it. I don't think folder icon clashes is a problem in this regard.

@Rockerby

This comment has been minimized.

Copy link

Rockerby commented Dec 19, 2019

I really like this. When making content for the site you use the icon to see what type of content you've created, I think this change ties the two in really nicely.

@skttl skttl mentioned this pull request Dec 20, 2019
1 of 1 task complete
@skttl

This comment has been minimized.

Copy link
Contributor

skttl commented Dec 20, 2019

Hi @prjseal

I think you should do the same thing to Media and Member types for consistency.

@prjseal

This comment has been minimized.

Copy link
Contributor Author

prjseal commented Dec 20, 2019

@skttl I agree that would be good. What do HQ think? @nielslyngsoe @nul800sebastiaan

@nul800sebastiaan

This comment has been minimized.

Copy link
Member

nul800sebastiaan commented Dec 20, 2019

Agreed on the folder icon, let's not build a special case for now and see how it goes.

Yep, we'd be happy if you did the same for Media/Member Types @prjseal!

@greystate

This comment has been minimized.

Copy link
Contributor

greystate commented Jan 18, 2020

Thanks for this @prjseal — Can't tell you how many times I've had to cancel building (or prematurely save) a Doctype because I had to go check the existing ones' icons and colors first :D

I have no issues with the folder icon - being able to see icons & colors many times outweigh being confused about a specific icon for a couple of seconds once in a while.

👍

@prjseal

This comment has been minimized.

Copy link
Contributor Author

prjseal commented Jan 18, 2020

No worries. I’ll finish this PR this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.