Define logo origin on the Toolbar

Created on 18 September 2023, over 1 year ago
Updated 21 September 2023, over 1 year ago

Problem/Motivation

In the current prototype, Drupal's logo has been added to the Toolbar. But right now is hard-coded on the template and a lot of people might prefer to either not have a logo at all or customize it with the client/company logo.

That opens several questions:

  • Should the logo be customizable?
  • If so, where should this form live? Should we create a general form to standardize admin UI settings like proposed in ✨ Provide form for customizable settings Active or should we have an specific Toolbar config form?
  • If so, what limits do we enforce to files uploaded? For example, logo size ( πŸ“Œ Add hi-res Drupal logo Fixed ), proportions or format
  • If so, where should this logo live?

Proposed resolution

To define.

Remaining tasks

User interface changes

API changes

Data model changes

🌱 Plan
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ckrina
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    I think it would be great to make the logo customizable. The minimal version could be that it lives with a twig template that the site's subtheme can customize. But we discourage runtime subtheming ;)

    I think an admin theme settings screen would be useful. The existing site logo upload is for the frontend and global to all themes, right?

  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    > The existing site logo upload is for the frontend and global to all themes, right?

    I thought that the logo upload is per theme, because there is also the checkbox on theme settings that lets you just use the default logo provided by the theme. When left unchecked, you can upload your own logo, which then gets stored into theme settings. I could be wrong, but seems like this could just use the same theme settings that Drupal already supports, provide the `logo.svg` and let it be overridden. It might be helpful to provide additional context on this specific theme's logo upload form to specify ideal dimensions, image formats (eg PNG &SVG preferred) or any color requirements (eg white on transparent bg).

  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    The existing site logo upload is for the frontend and global to all themes, right?

    I would assume so. Maybe as an MVP we could go with the front-end logo, but it scares me what you can face with "scaled square-forced" logos (prepared to be printed way bigger on the front-end). So I'd rather keep the Drupal logo...

    I think an admin theme settings screen would be useful.

    Good point. Maybe the logo on a theme, when it's admin, can be used there? But I'm a bit afraid of relying on external themes for that, because not even Claro has this logo now. Another alternative is something generic like "Administration settings" under "User interface" in config, created by this module itself?

  • πŸ‡ΊπŸ‡ΈUnited States mherchel Gainesville, FL, US

    I think we definitely want to have the logo customizable. I also think it needs to go through the image style process so it looks and loads quickly.

    Whatever route/path we put this on, we also need to think of other future settings like colors, dark mode, etc that hopefully will be coming down the line. My initial thought is somewhere in system settings.

  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

    What I'm currently missing is an easy way to provide a site-specific SVG logo that can consider dark/light mode. The only way (I think) to do this is by changing the logo to an inline SVG with embedded CSS styles like this:

    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
       <style>
            path {
                fill: black;
            }
            @media (prefers-color-scheme: dark) {
                path { fill: white; }
            }
        </style>
        <path d="..."/>
    </svg>
    

    And the only way to achieve that would be to override a template, to allow uploading an SVG through a text field (doesn't sound like a good idea) or if an SVG image is uploaded, to inline it instead of rendering as an <img> tag (sounds insecure).

  • Status changed to Closed: duplicate over 1 year ago
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    πŸ“Œ Support admin theme logo Needs review was opened as a duplicate but has code to implement swapping the logo from the admin theme settings. I'll close this and carry over credits to there.

Production build 0.71.5 2024