-
Notifications
You must be signed in to change notification settings - Fork 754
Generate the diagnostic pages from data files #7061
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @parlough, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the site's diagnostic documentation system. It transitions from static Markdown files to a dynamic generation approach, where diagnostic details are sourced from a structured data file. This change aims to centralize diagnostic information, simplify updates, and enhance the overall efficiency of content management. The implementation involves new data parsing logic, updates to the page rendering pipeline, and the removal of redundant static content. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request is a great refactoring that migrates the diagnostic documentation pages to be generated from a data file. This will improve site build times and make maintenance easier. The changes are well-structured, introducing a new model for diagnostic information and updating the page generation logic accordingly.
I've found one area for improvement in site/lib/src/pages/custom_pages.dart regarding the construction of the markdown content for diagnostic pages. The current implementation could lead to rendering "null" for diagnostics without documentation and might produce extra newlines. I've suggested a more robust way to build the content string that handles these cases gracefully.
Overall, this is a solid contribution.
|
Visit the preview URL for this PR (updated for commit 3936563): https://dart-dev--pr7061-misc-generate-diagnostic-pages-gr1n2k31.web.app |
antfitch
left a comment
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.
Love this! Let's look at the data serialization patterns we are using on the site and pick one to focus on moving forward. I'm specifically thinking about formats we are currently using (YML, JSON). We have a meeting coming up and that will be a good time for all of us to discuss.
antfitch
left a comment
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.
Let's choose a data serialization strategy for Dash sites before committing this.
antfitch
left a comment
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.
I'm on board! @ericwindmill have any change requests?
dart run dash_site generate-diagnosticsto generate asrc/data/diagnostics.jsonfile from data in the SDK. This file is not meant to be read or manually edited. It's mostly just a mechanism to cache the results calculated from the SDK data./tools/diagnostics/<diagnostic_name>. Instead use the data from the intermediatesrc/data/diagnostics.jsonfile to generate each page from code. The content of the generated files remains the same with this PR.These changes reduce site cloning and full build time, make updates easier to implement and review, and help avoid confusion about those files being the source of the docs.
Staged example page to show they remain functional and the same content wise: https://dart-dev--pr7061-misc-generate-diagnostic-pages-gr1n2k31.web.app/tools/diagnostics/abstract_super_member_reference