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

Add support for adding a collection accent color #5818

Merged
merged 5 commits into from Jun 3, 2021

Conversation

Oreilles
Copy link
Contributor

@Oreilles Oreilles commented May 21, 2021

Capture d’écran 2021-05-21 à 23 07 01

Because what's better than icons ?
( This also contains a fix for the select-icon interface placeholder not having been updated after rename )

Added migrations
Added color property to select-icon
Fixed select-icon placeholder
@rijkvanzanten
Copy link
Member

Oooohhhhh i actually don't know how i feel about this 👀 When setup correctly, it could be a cool way to differentiate certain collections, but for non-graphic-design-inclined users, it's an easy way to make things look horrendous 😨

@Oreilles
Copy link
Contributor Author

Oreilles commented May 21, 2021

Aha. It's more of a POC to open the discussion, but it's just something I wanted for the very start. All collection icons being the same color makes them less recognizable, and (imo) also makes the UI a bit sad. Ultimately the app design is the admin's decision - the logo, primary color, and pretty much the whole interface can already be themed in the app settings 🙂

@benhaynes
Copy link
Sponsor Member

Love it! I think this can be an optional, and powerful organizational tool for admins. Here are my thoughts:

  • Off by default. This is interesting because when "off" the nav icons are dark and the page icons are light gray.
  • Have a set of pre-defined "safe" colors to easily choose from, this will ensure things look decent
  • We might also want to have the Collection/Item detail pages use this color in the header icon (left of page title)
  • Maybe: Somehow allow for any color to be used (without resorting to CSS overrides)

@benhaynes
Copy link
Sponsor Member

Can I see a screenshot of the configuration options you are using for setup?

@rijkvanzanten
Copy link
Member

Have a set of pre-defined "safe" colors to easily choose from, this will ensure things look decent
Maybe: Somehow allow for any color to be used (without resorting to CSS overrides)

sounds like we'll just copy the color interface configuration for Project Color:

CleanShot 2021-05-21 at 21 36 15@2x

@benhaynes
Copy link
Sponsor Member

sounds like we'll just copy the color interface configuration for Project Color:

Exactly! Just wondering if we should allow "other"... I guess so. 🤔

@Oreilles
Copy link
Contributor Author

Oreilles commented May 22, 2021

This is what the setup looks like, I just used the select-color interface indeed:
Capture d’écran 2021-05-22 à 10 25 19
(Could be nice to have an input that does both... )

@rijkvanzanten
Copy link
Member

(Could be nice to have an input that does both... )

Agreed! Though the question "how can we have one interface (/field) save to two+ columns is a totally different can of worms 🪱

@Oreilles
Copy link
Contributor Author

Oreilles commented May 23, 2021

(Could be nice to have an input that does both... )

Agreed! Though the question "how can we have one interface (/field) save to two+ columns is a totally different can of worms 🪱

A workaround could be to change the icon field from text to json, and store it as { "name": ..., "color": ... } ( that way we could also add the filled prop too... ) - and have an select-icon interface produce that.

@benhaynes
Copy link
Sponsor Member

Let's keep the setup as you have it (no single field for two columns), but let's make name and description both half width:

[Name    ] [Note   ]
[Icon    ] [Color  ]

@rijkvanzanten
Copy link
Member

Good point, it doesn't necessarily have to remain the icon color, but could be configured as a generic "collection color" that we can surface elsewhere in the future as well

@Oreilles
Copy link
Contributor Author

Oreilles commented May 24, 2021

Let's keep the setup as you have it (no single field for two columns), but let's make name and description both half width:

[Name    ] [Note   ]
[Icon    ] [Color  ]
  • Done

Good point, it doesn't necessarily have to remain the icon color, but could be configured as a generic "collection color" that we can surface elsewhere in the future as well

Totally 👍

@rijkvanzanten rijkvanzanten added this to the v9.0.0-rc.72 milestone Jun 3, 2021
@rijkvanzanten rijkvanzanten changed the title Collections icon color property Add support for adding a collection accent color Jun 3, 2021
@rijkvanzanten rijkvanzanten merged commit 22f2e46 into directus:main Jun 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants