-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Input helpers docs for 2.18.0 has a link to a 2.16 doc page that give a "Whoops! Something went wrong" error when followed #16127
Comments
cc @emberjs/learning-team-managers |
It looks like the link has now been updated to point to https://www.emberjs.com/api/ember/release/classes/Component, which no longer gives the "whoops" error. However, it leaves the user at the top of the page rather than jumping down to the Event Names section. Is that something that is easy to add? If they don't know to scroll down to find the relevant content, it could be confusing. |
@BillyRayPreachersSon That's right! We should add a The root of this issue is that we're missing anchor links for all the titles on the generated API docs. |
@emberjs/learning-team-managers see above comment, looks like we need an anchor |
@locks , I'm looking for a good first issue to start with Ember, so please let me know if my contribution could be helpful here. Please, let me share some my findings. Incorrect LinkThe original issue with an incorrect link (navigating to Whoops! Something went wrong) is not reproducible anymore. Currently, the link works well in both Ember 2.x and 3.x. Missing Anchors in API ReferenceThe issue with missing anchors can be reproduced in all Ember versions.
It seems that this functionality has never been there (I've checked this in all 3 major releases). Moreover, I see only 2 places in Ember.js Guides that rely on anchors -- so, the impact of this issue is, likely, very low. Therefore, a good way forward could be closing this issue and creating a feature request in the ember-jsonapi-docs repository (if needed). Diving into technical details, API Reference is generated from JSDoc in emberjs/ember.js sources. For example, here is where the Handling Browser Events section lives:
Then, ember-jsonapi-docs compiles Markdown to HTML using Marked.js, which does not generate anchors by default: The good news is that Marked.js has extensibility points, which allow to integrate the anchor functionality. |
On the Ember 2.18.0 docs page for Input Helpers, there's a link in the Actions section that should link to a document on event names.
It currently points to https://www.emberjs.com/api/ember/2.16/classes/Component#toc_event-names.
When visited, it resolves to https://www.emberjs.com/api/ember/2.16/classes/Component?anchor=event-names&show=inherited,protected,private,deprecated&type=toc#, shows a "Whoops! Something went wrong" error on screen, and the following error in the console:
Error while processing route: project-version.classes.class.index There is no route named project-version.classes.class.tocs.toc Error: There is no route named project-version.classes.class.tocs.toc
The text was updated successfully, but these errors were encountered: