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
docs: Fix table of contents extra headings #6933
Conversation
594379a
to
e09bb4c
Compare
Hi @camsteffen, thanks for fixing this. This is a very good addition to our docs site. However, I'm seeing in your second screenshot that Examples are not being shown anymore (I also reproduced the issue locally). Could you please check the Angular docs and try to compare how this issue is solved there so we can fix both issues? |
Hi @jakovljevic-mladen. It was my intention to remove "Example". That heading is part of the docs for "subscribe()" but the position and indentation of "Example" makes it look like it is a top-level heading after "Methods". This confused me when I was reading the docs for Observable. The problem is that the heading levels of the markdown docs for methods don't respect the other heading levels of the page. For example, |
Hmm I was actually expecting the |
Aaah, I see. It took me a while to understand the real issue. Let me break it down for the record. On our official docs web site, what we have is this: Which looks like this:
What you wanted to achieve is to exclude this part (which is part of the
so that we have this:
However, this is different to what we currently have in the docs (when I say currently, I mean with the latest commit on the master branch - the latest docs site is unfortunately still not deployed to the official docs site). With the latest changes from master branch, this is what we have: This is still wrong as we've got two headers that have wrong indentation: the This is what I would suggest: to change
Many of the docs tests are wrong in many ways - they were never too important to us and over time (and many docs Angular app updates), many of them started failing without anyone ever noticing this because running the tests was never included in the pipelines. So, I guess we can ignore docs app tests for now. I'm not against doing changes in files in the I'm always much more in favor of fixing the issue in another place than diverging from the original docs app. Would you agree? p.s. To test the new changes, you can run the |
Markdown headings cannot be too high-level lest they render incorrectly in the docs app.
e09bb4c
to
d60a182
Compare
Okay, I have done this. It would be nice to have tests that will ensure this problem doesn't pop up again, but I don't mind doing this for now. I'm a little confused by the state of tests in this repo. |
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.
LGTM
As I said, this repo does not need to have up to date tests for the docs app - the docs app is written by the Angular team, thus almost every test in the docs app is written by them. Maintaining these tests would require quite some time which we don't have ATM. Thanks for fixing this, Ben will merge the changes. |
Fix docs table of contents issue where headings inside of a method's description are included. In the example below, it looks like
Observable
only has two methods.Before:
After: