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: add titles for pages #632

Merged
merged 1 commit into from
Jan 9, 2025
Merged

fix: add titles for pages #632

merged 1 commit into from
Jan 9, 2025

Conversation

CK-7vn
Copy link
Member

@CK-7vn CK-7vn commented Jan 7, 2025

Description of the change

This PR adds dynamic title changes for pages. In the library viewer the TitleManager checks to see if we are in the library viewer, if we are it gives an explicit 5 second timeout to wait for the iFrame to load the content, after that pulls the title tag from inside of the document and then renders it as the Title for the parent DOM.

Screenshot(s)

1'st layer
image

2'nd nested layer inside of the library viewer
image

5 layers deep
image

image

Additional context

There is an issue in which if the user clicks on a link inside of the iFrame that is cross-site, the title will not change, and there will be errors in the console, but, this does not effect any of the functionality outside of that.

Copy link
Contributor

@calisio calisio left a comment

Choose a reason for hiding this comment

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

This PR looks good to me, but I am a little confused on the "additional context" comment. Is there anything we need to do to fix these errors?
Also, just wanted to confirm we are just updating the page titles and not adding in the extra page titles in the top breadcrumbs nav. If we are just sticking to the tab page titles, I can go ahead and merge!

@CK-7vn
Copy link
Member Author

CK-7vn commented Jan 8, 2025

This PR looks good to me, but I am a little confused on the "additional context" comment. Is there anything we need to do to fix these errors? Also, just wanted to confirm we are just updating the page titles and not adding in the extra page titles in the top breadcrumbs nav. If we are just sticking to the tab page titles, I can go ahead and merge!

Not updating breadcrumbs as to my knowledge, Preston said to ignore the errors for now, they don't cause any issues, and it's only once the links lead somewhere external, only thing that will happen, is at that point the title will stop updating, that's the worst thing that happens!

@calisio calisio merged commit 2948b37 into UnlockedLabs:main Jan 9, 2025
5 checks passed
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.

UX: Update Page Titles so that it includes the name of the page.
2 participants