-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ZIP archive of Dart-SDK API missing details in the right navigation column (v3.1.0 to v.3.2.6) #54721
Comments
Thanks for reporting this @hoylen! I believe this is because these versions switched to a shared sidebar to reduce the size of generated documentation for large packages and SDKs. As a result, to view the docs with the sidebars, you'd need to serve the contents with an HTTP server. A quick way to do so would be to use
Then open the link it prints out in your browser of choice. As a note, you can also view the API docs for specific versions on api.dart.dev. For example you can find the API docs for Dart 3.1.1 at https://api.dart.dev/stable/3.1.1/index.html. If you're able to share, I am curious what you're using the downloaded version of the SDK docs for. Perhaps your workflow can be better supported :) \cc @srawlins This is due to the sidenav change. Do you think the solution for now is for us to document on dart.dev that it's required to serve the docs? |
Yes! Sorry I probably didn't do a good look-around to see what text should be updated. |
So that's why it behaves differently. Thanks for the quick reply. Definitely documenting the need for a Web server is necessary. But most people won't find the documentation when they come across the problem, or know where to look for it. Two possible solutions to that are:
My use case is pretty simple: to access the documentation without needing network access. Because a local copy is slightly faster and to avoid wasting bandwidth. Running a local Web server is not a huge problem, though it is less convenient than simply opening up files in a Web browser. It appears part of the problem is the browser's Cross-Origin Resource Sharing (CORS) mechanism blocking the page from loading the index.json and sidebar HTML files. I'm not familiar with how CORS works with "file:" URIs or what has changed from the JavaScript generated for the older documentation. Has anyone looked into that (as an alternative to running a Web server)? |
I now see why CORS is causing the problem. The new docs.dart.js file invokes The older version of docs.dart.js does not use XMLHttpRequest. However, it did use fetch. But I haven't looked into why the old invocation of fetch appears to work and the new one does not. Sounds like serving up the files with a local Web browser is the best approach... as long as the user downloading the ZIP file somehow knows that is how it must be used. |
Contributes to dart-lang/sdk#54721 and #4347 --------- Co-authored-by: Anthony Sansone <atsansone@users.noreply.github.com>
Contributes to dart-lang/sdk#54721 and dart-lang#4347 --------- Co-authored-by: Anthony Sansone <atsansone@users.noreply.github.com>
Contributes to dart-lang/sdk#54721 and dart-lang#4347 --------- Co-authored-by: Anthony Sansone <atsansone@users.noreply.github.com>
The ZIP archive download of the Dart-SDK API (downloaded from https://dart.dev/get-dart/archive) no longer shows navigation links for a library or class.
The documentation ZIP for v3.0.7 and earlier has three columns: a left navigation column listing the libraries, the main content, and a right navigation column listing the library's classes, constants, functions, etc.
The details in the third column is now missing from the recent ZIP files. The right column in ZIP for v3.1.0 and newer (v3.2.6 at the time of writing) does not have any links in the right navigation column. It just shows the name of the library.
The text was updated successfully, but these errors were encountered: