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

Don't let Cubic payment URLs get indexed by Google during test phase #1758

Merged
merged 4 commits into from
Sep 27, 2023

Conversation

i0sea
Copy link
Contributor

@i0sea i0sea commented Sep 26, 2023

Summary of changes

Asana Ticket: Don't let Cubic payment URLs get indexed by Google during test phase


update robots.txt to stop urls from being indexed

General checks

  • Are the changes organized into self-contained commits with descriptive and well-formatted commit messages? This is a good practice that can facilitate easier reviews.
  • Testing. Do the changes include relevant passing updates to tests? This includes updating screenshots. Preferably tests are run locally to verify that there are no test failures created by these changes, before opening a PR.
  • Tech debt. Have you checked for tech debt you can address in the area you're working in? This can be a good time to address small issues, or create Asana tickets for larger issues.

New UI, or substantial UI changes

  • Cross-browser compatibility is less of an issue now that we're no longer supporting IE, but changes still need to work as expected in Safari, Chrome, and Firefox.
  • Are interactive elements accessible? This includes at minimum having relevant keyboard interactions and visible focus, but can also include verification with screen reader testing.
  • Other accessibility checks such as sufficient color constrast, or whether the layout holds up at 200% zoom level.

New endpoints, or non-trivial changes to current endpoints

  • Have we load-tested any new pages or internal API endpoints that will receive significant traffic? See load testing docs
  • If this change involves routes, does it work correctly with pertinent "unusual" routes such as the combined Green Line, Silver Line, Foxboro commuter rail, and single-direction bus routes like the 170?

@i0sea i0sea marked this pull request as ready for review September 26, 2023 15:46
@i0sea i0sea requested a review from a team as a code owner September 26, 2023 15:46
@i0sea i0sea requested a review from kotva006 September 26, 2023 15:46
Copy link
Contributor

@kotva006 kotva006 left a comment

Choose a reason for hiding this comment

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

Slice function logic needs reworking. Reach out if you need more clarity or to pair

Comment on lines 22 to 26
if @conn.request_path == "/charlie" || String.slice(@conn.request_path, 0..4) == "/charlie/" do %>
<meta name="robots" content="noindex, nofollow">
<% end %>
<%= # hide any page in /policies/terms-use-charlie directory from search engines
if @conn.request_path == "/policies/terms-use-charlie" || String.slice(@conn.request_path, 0..4) == "/policies/terms-use-charlie/" do %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Both of these slice calls need to be changed. The function as written will return String.slice("/charlie/", 0..4) -> /char and String.slice("/policies/terms-use-charlie/", 0..4) -> /poli. This will fail to match on the desired string

@@ -8,3 +8,7 @@ Disallow: /search?*
Disallow: /*?*preview*&vid=*
Disallow: /schedules/*/line?*date*
Disallow: /org/*
Disallow: /charlie/*
Disallow: /policies/terms-use-charlie/*
Copy link
Contributor

Choose a reason for hiding this comment

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

The urls we wish to not index with this pattern looks like there is no final slash. I believe it should be /policies/terms-use-charlie*
This might need to be double checked with the robots.txt documentation.
Also this needs to be updated in the app.html.eex file to not include the final slash

Copy link
Contributor

@kotva006 kotva006 left a comment

Choose a reason for hiding this comment

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

Since the slash got removed in the /policies/terms-use-charlie the count in slice needs to go down as well

@i0sea i0sea merged commit 52539ee into master Sep 27, 2023
20 checks passed
@i0sea i0sea deleted the ixc-block-indexing branch September 27, 2023 19:10
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.

2 participants