Skip to content

restore crate prefixes to browser-tab titles #2074

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

Merged
merged 1 commit into from
Dec 28, 2019

Conversation

alsuren
Copy link
Contributor

@alsuren alsuren commented Dec 27, 2019

I'm not sure when it got broken, but all of the crates.io brower tabs I have open currently say crates.io: Rust Package Registry when they previously said things like mio - crates.io: Rust Package Registry or Search Results for 'mio' - crates.io: Rust Package Registry. This patch fixes this.

There is a bunch of code that sets the page title dynamically,
but it is all being overridden by a title tag in the main
app/index.html template (the DOM is only allowed to have
a single title tag in it, so subsequent title tags are
ignored by all browsers).

There is probably a better way to do this (using fastboot
to fill in the correct title on the backend would be ideal)
but this patch should be enough to restore the dynamic
titles for browsers with javascript enabled.

There is a bunch of code that sets the page title dynamically,
but it is all being overridden by a title tag in the main
app/index.html template (the DOM is only allowed to have
a single title tag in it, so subsequent title tags are
ignored by all browsers).

There is probably a better way to do this (using fastboot
to fill in the correct title on the backend would be ideal)
but this patch should be enough to restore the dynamic
titles for browsers with javascript enabled.
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @carols10cents (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@locks
Copy link
Contributor

locks commented Dec 28, 2019

Thanks for the help! I also think it's worth it to get this in and see about fastboot afterwards.
@bors r+

@bors
Copy link
Contributor

bors commented Dec 28, 2019

📌 Commit 3f14e8d has been approved by locks

@bors
Copy link
Contributor

bors commented Dec 28, 2019

⌛ Testing commit 3f14e8d with merge f0f7447...

bors added a commit that referenced this pull request Dec 28, 2019
restore crate prefixes to browser-tab titles

I'm not sure when it got broken, but all of the crates.io brower tabs I have open currently say `crates.io: Rust Package Registry` when they previously said things like `mio - crates.io: Rust Package Registry` or `Search Results for 'mio' - crates.io: Rust Package Registry`. This patch fixes this.

There is a bunch of code that sets the page title dynamically,
but it is all being overridden by a title tag in the main
app/index.html template (the DOM is only allowed to have
a single title tag in it, so subsequent title tags are
ignored by all browsers).

There is probably a better way to do this (using fastboot
to fill in the correct title on the backend would be ideal)
but this patch should be enough to restore the dynamic
titles for browsers with javascript enabled.
@bors
Copy link
Contributor

bors commented Dec 28, 2019

☀️ Test successful - checks-travis
Approved by: locks
Pushing f0f7447 to master...

@bors bors merged commit 3f14e8d into rust-lang:master Dec 28, 2019
@carols10cents
Copy link
Member

This PR fixes #1930! Thank you!

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.

5 participants