-
Notifications
You must be signed in to change notification settings - Fork 509
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
Remove broken-link flaws for self-links #4095
Comments
@schalkneethling Can this go on your list for consideration.
|
@hamishwillee Thank you for the ping. I will add this to my list. |
Yeah, this shouldn't be closed. |
I would like to confirm that this issue has annoying effects:
Note that we still want to report links to the same page that have an anchor (we want to keep only the anchor, not the file path): we want to fix these. This would be in my top-5 issues to fix. |
Thank you, @teoli2003! I am going to turn this into a discussion and bring it to the attention of engineering. I know there is a lot of work happening at the moment to refactor and improve Yari overall, so it would be good to have this input. |
@schalkneethling FWIW without wanting to distract from this conversation .... The problem with Learn module navigation links like this one: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Client-side_storage#in_this_module is actually different. Yes the bug shows up, but the root problem for these is that they should be in the sidebar rather than the page. Unfortunately they can't be because the sidebar is broken. Here is my proof: https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Document_and_website_structure - where is the document in the sidebar? If you have to scroll and there is nothing to catch the eye then you have lost context. The site is broken. Note, (a) has been fixed several times, last time since the rebrand, but is broken again: If I sound frustrated it's because I am. IMO this should have been done as a higher priority than the website refresh. |
IMO we should implement 1., but not necessarily implement 2., because it adds complexity to our document build, which we're actually trying to simplify. |
@hamishwillee I would suggest renaming this issue to "Remove broken-link flaws for self-links", and then we can finally tackle it. |
@caugner So you're saying this will just fix the flaws on self links, but not make the self-link non-clickable? Either way, I'm OK with this because we need to get the flaw fixed first. Note that a self link via a redirect would ideally still remain a flaw. Renamed now! |
Can we please
TLDR below
Originally we made links-to-self a flaw, because a doc should not link to itself. The case that triggered this was an originally valid link where the target page was replaced by a redirect back to the current page.
But there are a bunch of intentional links to self - for example:
We fixed these by making the links auto-render as black bold text. Works great - rather than having to manually make all the links into just text this happens by magic.
However this fix is not quite complete - the links are still links when you press them. It would be better if they were not clickable - they are simply not rendered as links.
Further, if they are not links then there is no flaw, and we should not report a flaw in most cases. The exception is the case where the self link happens due to a redirect. That essentially means that the link used to go to something valid and does not any more.
I guess we could keep it a flaw in all cases and change the rendering back to a link, but then we'd want to fix every single case in the docs. For the learn section we'd want to decide a better way to do the sidebar.
The text was updated successfully, but these errors were encountered: