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

Change the web site title according to the viewed org / product / repo #1573

Closed
sschuberth opened this issue Dec 5, 2024 · 4 comments · Fixed by #1714
Closed

Change the web site title according to the viewed org / product / repo #1573

sschuberth opened this issue Dec 5, 2024 · 4 comments · Fixed by #1714
Assignees
Labels
enhancement New feature or request. ui Issues related to the UI.

Comments

@sschuberth
Copy link
Contributor

With multiple browser tabs open, it's confusing that they all are called just "ORT Server". It would be great if there was a prefix added depending on the org / product / repo that's currently viewed.

@sschuberth sschuberth added enhancement New feature or request. ui Issues related to the UI. labels Dec 5, 2024
@sschuberth sschuberth changed the title Change the web site tiele accoring to the viewed org / product / repo Change the web site title accoring to the viewed org / product / repo Dec 5, 2024
@sschuberth sschuberth changed the title Change the web site title accoring to the viewed org / product / repo Change the web site title according to the viewed org / product / repo Dec 5, 2024
@Etsija
Copy link
Contributor

Etsija commented Dec 5, 2024

It's currently specified statically here. Need to inspect ways to change it dynamically; there are ways to do that.

@Etsija
Copy link
Contributor

Etsija commented Dec 5, 2024

Documenting a bit further for whoever will do this: there is probably a simple way to do this dynamically by a self-written hook and a document wrapper component. Probably the breadcrumb info could also be used.

@Etsija
Copy link
Contributor

Etsija commented Dec 9, 2024

@sschuberth Something like this? I'm wondering whether we actually need to show "ORT Server" in the title on those subpages, because there's already the server icon? Long titles are cut from the end, and leaving "ORT Server" out from the title would make it a bit more readable.

Anything more you'd like to see in the title, considering it should probably be kept quite tight?

Screenshot from 2024-12-09 07-34-08

@Etsija Etsija self-assigned this Dec 9, 2024
@sschuberth
Copy link
Contributor Author

Anything more you'd like to see in the title, considering it should probably be kept quite tight?

Let's do as discussed in the daily.

Etsija added a commit that referenced this issue Dec 9, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

As I am unsure whether this is the right way to do it, this is so far
a draft PR. There is at least one problem with this: Title is 
switched to the organization/product, when navigating to those pages,
but it is illogically changed into the repository URL just by hovering
the mouse over the repository URL in the product main page.

A proper way to do this would probably be that the title changes
to the repository URL for all subroutes of `...repositories/$repoId`,
but I am currently lacking information on how to match all these
sub-routes, and in which file/directory this change should reside. 

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 9, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

As I am unsure whether this is the right way to do it, this is so far
a draft PR. There is at least one problem with this: Title is 
switched to the organization/product, when navigating to those pages,
but it is illogically changed into the repository URL just by hovering
the mouse over the repository URL in the product main page.

A proper way to do this would probably be that the title changes
to the repository URL for all subroutes of `...repositories/$repoId`,
but I am currently lacking information on how to match all these
sub-routes, and in which file/directory this change should reside. 

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 9, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

As I am unsure whether this is the right way to do it, this is so far
a draft PR. There is at least one problem with this: Title is 
switched to the organization/product, when navigating to those pages,
but it is illogically changed into the repository URL just by hovering
the mouse over the repository URL in the product main page.

A proper way to do this would probably be that the title changes
to the repository URL for all subroutes of `...repositories/$repoId`,
but I am currently lacking information on how to match all these
sub-routes, and in which file/directory this change should reside. 

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 9, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

As I am unsure whether this is the right way to do it, this is so far
a draft PR. There is at least one problem with this: Title is 
switched to the organization/product, when navigating to those pages,
but it is illogically changed into the repository URL just by hovering
the mouse over the repository URL in the product main page.

A proper way to do this would probably be that the title changes
to the repository URL for all subroutes of `...repositories/$repoId`,
but I am currently lacking information on how to match all these
sub-routes, and in which file/directory this change should reside. 

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 9, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 9, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

Because in the router several routes may be active at the same time
(as in organization...product...repository), use a custom hook [1] to 
ensure the "newest" active route is being used when setting the 
title.

Resolves #1573.

[1]: https://www.30secondsofcode.org/react/s/use-title/

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 9, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

Because in the router several routes may be active at the same time
(as in organization...product...repository), use a custom hook [1] to 
ensure the "newest" active route is being used when setting the 
title.

Resolves #1573.

[1]: https://www.30secondsofcode.org/react/s/use-title/

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 10, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

Because in the router several routes may be active at the same time
(as in organization...product...repository), use a custom hook [1] to 
ensure the "newest" active route is being used when setting the 
title.

Resolves #1573.

[1]: https://www.30secondsofcode.org/react/s/use-title/

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 10, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

Because in the router several routes may be active at the same time
(as in organization...product...repository), use a custom hook [1] to 
ensure the "newest" active route is being used when setting the 
title.

Resolves #1573.

[1]: https://www.30secondsofcode.org/react/s/use-title/

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 10, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 10, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 11, 2024
Improve the UX when several tabs are running the UI, by showing in the 
title of the tab either
1) Name of the organization;
2) Name of the product; or
3) When "inside" the repository pages, URL of the repository

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Etsija added a commit that referenced this issue Dec 31, 2024
Set the page titles according to the "deepness" of the navigated route:
"ORT Server" / "Organization name - ORT Server" / 
"Product name - ORT Server" / "Repository URL - ORT Server".

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
@Etsija Etsija linked a pull request Dec 31, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Dec 31, 2024
Set the page titles according to the "deepness" of the navigated route:
"ORT Server" / "Organization name - ORT Server" / 
"Product name - ORT Server" / "Repository URL - ORT Server".

Resolves #1573.

Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request. ui Issues related to the UI.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants