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

[RFC] Files mime icons theming #45579

Open
skjnldsv opened this issue May 30, 2024 · 5 comments
Open

[RFC] Files mime icons theming #45579

skjnldsv opened this issue May 30, 2024 · 5 comments

Comments

@skjnldsv
Copy link
Member

skjnldsv commented May 30, 2024

Since we updated a few mime icons (doc, spreadsheets, pdf, archives...), we stepped away from the themed mime icons to use either org-provided colors (like red for pdf, blue for docx...) or fallback to the standard grey #969696

I am not sure we benefit from supporting the svg coloring feature the mime API provides.
As of technical debt, I think we could deprecate and remove it.

cc @nextcloud/designers @nextcloud/server-frontend

Goal

The goal is to agree on a line to follow from here. If the design team is ok with this:

  1. if the mime is associated with a specific color, often provided by the org that created this file type, use it
  2. else, fallback to a default #969696 grey
  3. if folder, we always use the primary color

image

@susnux
Copy link
Contributor

susnux commented May 30, 2024

I agree here, but additionally I would suggest to move to an inline-svg approach. Because currently it is not really possible to get the correct primary color.
The color depends on:

  • Theme the user uses
  • Preferred color schema of the browser

The first is "easy" to get on the backend, the second only with some new browser stuff not supported by e.g. Firefox.

So instead if we move to inline svgs instead of background images, we could simply use fill: var(--color-primary-element).

@skjnldsv
Copy link
Member Author

We would never use the primary color. I suggest removing this entirely in the first post :)

@susnux
Copy link
Contributor

susnux commented May 31, 2024

We would never use the primary color. I suggest removing this entirely in the first post :)

...

if folder, we always use the primary color

So we still have the primary for the folder, which suffers this issue on the PHP api

@skjnldsv
Copy link
Member Author

No the folder are inline svg right now, we migrated away from using the mime api :)
I'm talking about every other file type but a directory 📂

@jancborchardt
Copy link
Member

The proposal sounds good from the design side. It helps folders, files with previews and specific file types (PDF, docs, spreadsheets, slides) to stand out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants