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

Login page displays the admin theme logo #6836

Open
olafgrabienski opened this issue Jan 24, 2025 · 14 comments
Open

Login page displays the admin theme logo #6836

olafgrabienski opened this issue Jan 24, 2025 · 14 comments

Comments

@olafgrabienski
Copy link

Description of the bug

When you show the Simplified login pages introduced in Backdrop 1.30.0 and use the admin theme for those pages, the Logo setting "Use the logo supplied by the active theme" on the "Site information" page results in a login page that doesn't display the logo of your frontend theme but the one provided by the admin theme, e.g. the Backdrop logo for Seven.

Steps To Reproduce

To reproduce the behavior:

  1. Spin up a fresh Backdrop site, version 1.30.0, or update an older site to Backdrop 1.30.0.
  2. Make sure, Seven is the admin theme.
  3. In the installer, choose a frontend theme that provides a logo, e.g. Shasetsu, and set it as default theme.
  4. Of the Login page options at the bottom of the page admin/config/people/login choose "Show simplified page" and enable "Use the administration theme for simplified login pages" (default setting for new sites).
  5. Go to the "Site information" configuration (admin/config/system/site-information), scroll to the Logo settings, and enable the checkbox "Use the logo supplied by the active theme".
  6. Clear caches.
  7. Log out, or open the site in another browser, and go to the Login page.

Actual behavior

The Login page shows the Backdrop logo.

Expected behavior

The page shows the logo from the default frontend theme.

@olafgrabienski
Copy link
Author

As mentioned during the weekly meeting, the current behavior is 'logical' from a technical point of view, but it's not what people would expect or even want.

Recording of the topic in the weekly meeting of January 23, 2025: https://www.youtube.com/live/ObNrrDKUJDI?t=1858

@olafgrabienski
Copy link
Author

One idea raised by @quicksketch in the weekly meeting was to not display the Backdrop logo for Seven on the login pages, also because it's not displayed anywhere else when you use the theme. I like the idea. What do others think?

@indigoxela
Copy link
Member

because it's not displayed anywhere else when you use the theme...

That's almost true, as it's displayed on - for example - the update page:

Image

But on the login page it doesn't make much sense. I belief, we agree here. (Why the admin theme is even usable for the login page, and is the default is completely off topic here. 😁 )

@izmeez
Copy link

izmeez commented Feb 1, 2025

Part of the reason this is convoluted is because the Default Administrative Layout does not have a Header block in the HEADER region.

If the Header block is added there is now options to show logo, site name and site slogan.

These may not behave quite as you expect, but now you can see.

The update page is different, it doesn't use a layout and already designates a spot for the logo.

When admin/config/system/site-information is set to use the logo supplied by the active theme: site side it will show theme logo and on admin side it shows the Backdrop logo with the Seven theme.

When the Header block is added to the default admin layout and show logo is checked the same thing happens: site side it will show theme logo and on admin side it shows the Backdrop logo.

This suggests that the Backdrop logo is the default logo for the Seven theme and by default only visible on the update (non-layout) page.

One the other hand if admin/config/system/site-information is set with uncheck use logo by theme and instead uses path to custom logo: the logo will show on both the site side and on the admin side, if the Header block is added to the default admin layout, and it also shows on the update block. It may also show on the login block. I'll have to test.

@olafgrabienski
Copy link
Author

olafgrabienski commented Feb 2, 2025

@izmeez Thanks for your input. Your comments have made me more aware that the wording of the option "Use the logo supplied by the active theme" may not make the crucial point clear enough: That it could indeed be the admin theme which supplies the logo. When I saw the word "logo" in this context, I never thought at the admin theme. So, I think it would be good to provide a description text which makes things more clear.

Apart from that, I'm still for changing the behavior. Either just not show the admin theme logo on the login page (as suggested in a comment above). Or change the form on admin/config/people/login, so that the problematic option "Use the administration theme for simplified login pages" isn't anymore the default for new sites.

@izmeez
Copy link

izmeez commented Feb 2, 2025

I repeated the steps described in my earlier comment with the Gin theme as the admin theme. The Gin theme has a logo and it is BIG. There is no css sizing in the admin layout.

Three things come to mind.

  1. Seven should not have a logo. Otherwise it will need it's own to avoid future confusion by using the Backdrop core logo.

  2. The admin layout in core will need css sizing for the logo in the admin layout. There may already be css sizing for the update block and sign-in block. When site information logo settings specifies a path to a logo, the logo will be shown in the admin theme and needs to be appropriately sized.

  3. When code checks site information, logo settings option: use logo supplied by theme; if it is selected and this is an admin theme, return display nothing on admin layout or blocks (update block, sign-in block, etc. )

@izmeez
Copy link

izmeez commented Feb 4, 2025

I opened a separate issue for square logos being too large that was mentioned in the dev meeting.

For this issue of which logo shows on the simplified login page when the administration theme is chosen for the simplified login, there is one more nuance to replicating the problem. The active theme for the website must itself have a logo.

If the site theme does not include a logo, even if the site information option to use the logo supplied by the active theme is selected (noting it is the default for Backdrop), the simplified login will NOT show a logo even when the option to use the administration theme, that has a logo like seven or gin, is chosen.

It is only when the site theme includes a logo this problem occurs, showing the admin theme logo on the simplified login using admin theme. Some may consider this to be the desired behaviour, similar to how other products like Wordpress, show a generic Wordpress login.

But, there is the nuance in the logic, requiring that the theme chosen for the site must itself have a logo.

@izmeez
Copy link

izmeez commented Feb 9, 2025

Looking at this issue from where it arose in #6570 (comment) it appears that the goal was to have a default backdrop login for any sites that want it, like Wordpress and the others have, "boldly showing it is Backdrop".

Anyone who doesn't want that can still have a simplified login with the theme they are using and not use the admin theme. This is probably the most anticipated use case, whether they use the logo provided by the active theme (backdrop default unchecked), or a custom logo path configured at admin/config/system/site-information.

Meanwhile, the login style is configured at admin/config/people/login. Here they can choose to: use tabs as before, use links, or simplified login with a further option to use the admin theme.

The backdrop default for this new feature is to use the simplified login with use admin theme but the resulting login is not the generic we want. It is limited by the site-information logo settings default and does not show the Backdrop logo, only showing the name Backdrop.

If the site information logo settings is changed to use the logo supplied by the active theme it works in conjunction with the backdrop default Login page options to show the simplified login with the admin theme, and provide the generic style sought. There may be more significant cases to be made for changing the backdrop default for this setting, but it may not be the best solution for this issue.

A better solution for the option: to use the simplified login with admin theme aka generic display, should not be dependent on the site information setting, it should always use the Backdrop logo, the logo used by the Seven theme.

But, what happens when the Gin theme is used as the admin theme, if the logo supplied by the admin theme is used it will not be the Backdrop logo. Therefore, should the simplified login with admin theme always use the Backdrop logo from core not the logo supplied by the admin theme?

An edge case may be to use the site theme as the admin theme in which case the simplified login with admin theme would look like the option without the admin theme, except it would use the Backdrop Logo like the generic login display.

To achieve this, the option will need to be coded to always use the Backdrop logo and the text changed to: `Use the administration theme with Backdrop logo.'

@olafgrabienski
Copy link
Author

Interesting observerations and thoughts, @izmeez! I find the questions almost too complex to progress in written discussion. Perhaps it would be good to discuss the topic again at a weekly meeting.

@izmeez
Copy link

izmeez commented Feb 9, 2025

Or a PR may help. I'll see what I can do.

@izmeez
Copy link

izmeez commented Feb 9, 2025

Actually, the more I think about it the more I think just changing the backdrop default for admin/config/site_information logo settings to checked for use logo supplied by active theme is the way to go.

Then, out of the box, Backdrop 1.30.0 new simplified login with admin theme will display the Backdrop logo as desired. Also, when trying different themes, any that have a logo will display them which is the desired behaviour. I found myself confused because Basis doesn't seem to have a logo, which surprised me.

When you see the simplified login shows the Backdrop logo, not your active theme logo, the use admin theme option can be unchecked providing the simplified login with the active theme and logo. It may make better sense, and as soon as a custom logo is used it will appear everywhere.

The support to use the admin theme for login is already there and will provide the desired look out of the box. Some use cases may prefer the option to use the admin theme while still being able to brand both the active and admin themes with custom logo.

Although, using another theme for the admin theme, such as the Gin theme, will display its logo unless a custom logo is specified. Again, this may be as expected.

@izmeez
Copy link

izmeez commented Feb 9, 2025

Now, I see there is more to consider from before from @klonos in #6560

@izmeez
Copy link

izmeez commented Feb 9, 2025

For reference here is the PR that was committed, backdrop/backdrop#4966

@izmeez
Copy link

izmeez commented Feb 9, 2025

And the issue that PR was for, #6799

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