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

fix: remove changing title in LoginPageLayout #1111

Merged

Conversation

vladimir-cucu
Copy link
Contributor

@vladimir-cucu vladimir-cucu commented Aug 9, 2024

Done

  • Don't change title when LoginPageLayout renders. This allow for a consistent behavior with other components and will fix bugs like the one bellow.
  • Conditionally remove is-paper body class on unmount.

Fixes

Fixes: canonical/identity-platform-admin-ui#373
https://warthogs.atlassian.net/browse/WD-14064

@webteam-app
Copy link

Copy link
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. I don't have a lot of context on how this would be used, but seems to do what intended.

Copy link
Collaborator

@huwshimi huwshimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this might not be the right approach. I'm not sure the layout components should be managing the window title as I can imagine different apps would want to manage the title through different implementations e.g. through the use of hooks.

Maybe the fix would be to not set the document title in LoginPageLayout and allow each application to manage the window title themselves. This would be a breaking change, but worth it I think.

I also noticed that the LoginPageLayout adds an is-paper body class but doesn't clean it up when unmounted so there's a couple of unintended side effects by using this component.

@vladimir-cucu vladimir-cucu changed the title fix: change title in ApplicationLayout fix: remove changing title in LoginPageLayout Aug 13, 2024
Copy link
Collaborator

@huwshimi huwshimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this. I think it would be worth noting that this is a breaking change in the release: https://github.com/semantic-release/semantic-release?tab=readme-ov-file#commit-message-format.

@vladimir-cucu vladimir-cucu merged commit 10e4fe7 into canonical:main Aug 15, 2024
16 checks passed
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Wrong title displayed in the browser tab once logged in
4 participants