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: specify canonical URLs #7455

Merged
merged 4 commits into from
Oct 13, 2023
Merged

fix: specify canonical URLs #7455

merged 4 commits into from
Oct 13, 2023

Conversation

just-toby
Copy link
Contributor

Description

declares the canonical for each page/route in the app in a way that removes query parameters, to better inform google.

right now, google is selecting the canonical automatically which is causing us to have a bunch of "not indexed" URLs - if we specify the canonical then google will know that this isn't an error and should just prioritize the URL we tell it to.

Linear ticket: https://linear.app/uniswap/issue/WEB-2789/seo-improvements

QA (ie manual testing)

  • just logged the URL to make sure it's what we expect, and inspected the page content to make sure the tag appears

@vercel
Copy link

vercel bot commented Oct 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 13, 2023 3:56pm

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #7455 (ae3962f) into main (ad1e2c6) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Flag Coverage Δ
cloud-tests 83.60% <ø> (ø)
unit-tests 42.81% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@cypress
Copy link

cypress bot commented Oct 11, 2023

2 flaky tests on run #15009 ↗︎

0 118 0 0 Flakiness 2

Details:

fix: specify canonical URLs
Project: Uniswap Interface Commit: ae3962fadd
Status: Passed Duration: 04:47 💡
Started: Oct 13, 2023 3:58 PM Ended: Oct 13, 2023 4:03 PM
Flakiness  cypress/e2e/swap/uniswapx.test.ts • 2 flaky tests • e2e

View Output Video

Test Artifacts
UniswapX Orders > can swap exact-out trades using uniswapX Output Screenshots
UniswapX activity history > can view UniswapX order status progress in activity upon expiry Output Screenshots

Review all test suite changes for PR #7455 ↗︎

Copy link
Contributor

@mattbspector mattbspector left a comment

Choose a reason for hiding this comment

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

this should help a lot

@just-toby just-toby marked this pull request as ready for review October 12, 2023 17:08
@just-toby just-toby requested review from a team and cbachmeier October 12, 2023 17:08
@@ -35,8 +36,13 @@ if (window.ethereum) {
}

function Updaters() {
const location = useLocation()
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any issue with using a hook here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, <Updaters /> is a child of <Router>. but let's switch just in case someone moves this code in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry i spoke too soon ... when i tested without useLocation it breaks. because react-router handles navigations, window.location doesn't update the way we'd need it to

src/index.tsx Outdated Show resolved Hide resolved
@just-toby just-toby merged commit 749c9b4 into main Oct 13, 2023
@just-toby just-toby deleted the fix/swap-page-canonical branch October 13, 2023 16:27
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.

3 participants