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
WIP: docs(tutorial): fix url inconsistency in tutorial chapters #24628
Conversation
You can preview a9688e8 at https://pr24628-a9688e8.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also remove any file that is not used any more (e.g. tutorial/index.md
).
IIRC, /tutorial
is one of the urls that are eagerly cached by the service worker for offline access. This PR breaks that. Why not move tutorial/toh-pt0.md
to tutorial/index.md
(and redirect /tutorial/toh-pt0
to /tutorial
)?
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our first thought was to move toh-pt0.md into index.md, but that means we have to redo the example directory, which also affects stackblitz. So, we thought we'd first explore what happens if we have index.md redirect to toh-pt0.md.
My idea to prototype this was just to throw and http-equiv="refresh" content="0; url=http://example.com/" into the index.md, so we can see how everything feels if we make these changes (nav changes, filename changes, and content merge all have impact). @chembu knew more about how to do redirects for real in aio, so she tried playing with that. When/if we decide to go forward we'll clean up.
What are the implications of redirecting index.md? Doesn't /tutorial cause the browser to load /tutorial/index.html, so in theory if we change index.md (or remove it), then service workers will reload with the /tutorial bookmark? You advice greatly welcome.
Answer to #24628 (comment):
Not sure what this means. You could either rename a directory or add some
Not exactly, but close. Everything will work indeed when online. But when offline, the service worker will only be able to serve the files that it has cached for offline usage. According to our current config, We could fix this by tweaking our config (which needs to happen as part of this PR), but it much less straight forward than moving |
If we move toh-pt0 into index.md, can we keep toh-pt0 in the live example and download example file names? https://angular.io/tutorial/toh-pt0#final-code-review It would still make sense, because those files go with the first doc page which will be unnumbered or 0 in the nav. Is there any technical limitation or guideline/practice that requires us to rename those paths to https://angular.io/generated/live-examples/index/stackblitz.html |
You can keep the names, but you have to explicitly refer to them on the |
Simple fix migrated into PR #26099 |
Tutorial parts 1-6: PR #26099 resolves problem for these parts. Resolution:
Introduction: Recommend leaving this page as-is, separate from the numbered parts. There are lots of 3rd-party links to this page, and redirection is complicated by this being the primary/index page for the group and available as angular.io/tutorial The Application Shell: Three options:
Recommendation is #2. Perhaps do as part of my next navigation updates.
@chembu @gkalpak Comments welcome. |
Ideally, we wouldn't have part-0 (in URLs and guide names) to begin with. But since we have those, at this point I would prefer keeping the page title 1-base indexed and the guide names 0-based indexed (i.e. That said, I can live with options #1 and #2 from above. Another option:
|
Coming back to this: " the page title 1-base indexed and the guide names 0-based indexed " is exactly what users have complained about. They want the numbers to match. That said:
So I'm going with Option 1 for now: Do nothing. :-) @chembu : Go ahead and close this PR. Thanks! |
Fixed in a different PR. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
URL to tutorial chapters do not match the chapter sequencing.
Issue Number: N/A
#17645
What is the new behavior?
tutorial chapter numbers and URL pointing to them are matching.
Does this PR introduce a breaking change?
Other information