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

DOP-4540: Simplify versioned prefix generation #1113

Merged
merged 11 commits into from
Jun 6, 2024
Merged

Conversation

rayangler
Copy link
Collaborator

@rayangler rayangler commented Jun 4, 2024

Stories/Links:

DOP-4540

Current Behavior:

Server docs prod
Atlas docs prod

Staging links to compare with for main branch:
Server docs staging - built with dotcomprd, without path prefix
Server docs staging - built with default dev

Staging Links:

Atlas docs - built with dotcomprd, without path prefix
Server docs - built with dotcomprd, without path prefix
Server docs - built with default dev

Notes:

  • Originally part of DOP-4540: Simplify versioned prefix generation regardless of build type #1078. Decided to stick closer to the original scope of the ticket and avoid changing staging prefixes as discussed in some of the comments.
  • Removes the need to define a path prefix or have the dev SNOOTY_ENV environment declared in order to see accurate version prefix generation for canonicals and version dropdown URLs. This should make the canonicals and version dropdowns more reflective of behavior on a deployed site.
  • Generalizes the version dropdown's generatePrefix util function to be generateVersionedPrefix to semantically decouple it from the version dropdown component. The function should be used specifically for URLs to other versions of the same site project, while withPrefix can continue to be used for URLs for the same/current version of the site.
  • Updates tests to reflect expected behavior, especially for canonicals.

README updates

    • This PR introduces changes that should be reflected in the README, and I have made those updates.
    • This PR does not introduce changes that should be reflected in the README

@rayangler rayangler marked this pull request as ready for review June 5, 2024 18:13
Copy link
Collaborator

@mmeigs mmeigs left a comment

Choose a reason for hiding this comment

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

Thank you for the comments!! Raymund, this is so clean. Looks great.

Copy link
Collaborator

@caesarbell caesarbell left a comment

Choose a reason for hiding this comment

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

LGTM

@rayangler rayangler merged commit 52b3a19 into main Jun 6, 2024
2 checks passed
@rayangler rayangler deleted the DOP-4540-attempt-2 branch June 6, 2024 17: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.

3 participants