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

Use 1-indexed and non-padded tutorial URLs #832

Merged
merged 1 commit into from
May 11, 2022
Merged

Conversation

aomarks
Copy link
Member

@aomarks aomarks commented May 11, 2022

Previously, we used 0-indexed and left-padded tutorial URLs. For example, the 2nd step of a tutorial had URL /tutorials/<name>/#01.

Now it is 1-indexed, and not padded. For example: /tutorials/<name>/#2.

I think 0-indexed is more intuitive, because it means the URLs are aligned with the "Step 2/8" text on the page.

I think left-padding was unnecessary in URLs, plus by removing it, we have a convenient way to detect people still on the 0-indexed scheme, and fix the URLs to be 1-indexed. This way nobody will get jumped ahead if they reload before/after the new scheme is deployed.

Also fixes a bug where we would set the URL to /tutorials/<name>#2 (no trailing slash), but then after reloading it would turn into /tutorials/<name>/#2. Now we always set the final form.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
chfast Paweł Bylica
@github-actions
Copy link

A live preview of this PR will be available at the URL(s) below.
The latest URL will be appended to this comment on each push.
Each build takes ~5-10 minutes, and will 404 until finished.

https://pr832-a23a0a4---lit-dev-5ftespv5na-uc.a.run.app/

Copy link
Contributor

@AndrewJakubowicz AndrewJakubowicz left a comment

Choose a reason for hiding this comment

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

Nice! Also tested manually in the preview url. Went over the word-viewer and async directive checking that solve and all the steps were working.

Nice!

@aomarks aomarks merged commit 41d23ea into main May 11, 2022
@aomarks aomarks deleted the tutorial-url-index branch May 11, 2022 14:32
@aomarks aomarks self-assigned this May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants