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

YaruTitleBar: allow specifying the hero tag #554

Merged
merged 3 commits into from
Jan 20, 2023
Merged

YaruTitleBar: allow specifying the hero tag #554

merged 3 commits into from
Jan 20, 2023

Conversation

jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Jan 20, 2023

The YaruTitleBar counterpart of #553.

Close: #549

@jpnurmi jpnurmi requested a review from Jupi007 January 20, 2023 09:37
Copy link
Member

@Jupi007 Jupi007 left a comment

Choose a reason for hiding this comment

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

LGFM 👍

I suppose that the toString method of the object passed to _YaruTitleBarHeroTag.id() is always properly implemented.

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 20, 2023

In our case, it becomes "<_YaruDetailPageHeroTag YaruWindowTitleBar>" so it reads like "the detail page's hero tag for the app bar". We need the same tag for both title bars on the page transitioning in and out to achieve the effect that it stays in place. With custom hero tags you can either disable the whole thing if it's not suitable for your app structure, or you can adapt it to more complex scenarios e.g. only applying the effect when transitioning between certain pages.

@Jupi007
Copy link
Member

Jupi007 commented Jan 20, 2023

Okay, thanks for the explanation :)
It is fine so, can I merge?

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 20, 2023

Now that I think of it, the dynamic hero-tag formatting is pointless. We could just as well have a constant string?

@Jupi007
Copy link
Member

Jupi007 commented Jan 20, 2023

As far as I understood, a constant would be enough, indeed :)

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 20, 2023

Yeah, seems to work fine. What was I even thinking 🤦‍♂️

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 20, 2023

how many attempts do i need to create a string constant

@jpnurmi jpnurmi merged commit abc8bec into ubuntu:main Jan 20, 2023
@jpnurmi jpnurmi deleted the title-bar-hero-tag branch January 20, 2023 11:46
@jpnurmi jpnurmi mentioned this pull request Jan 20, 2023
@jpnurmi

This comment was marked as resolved.

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

Successfully merging this pull request may close these issues.

Hero tags
2 participants