-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add optional page navigation to top toc dropdown (for FWE) #12715
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 @schultek, 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 enhances the site's navigation capabilities by introducing an optional page navigation feature within the top table-of-contents dropdown. This is specifically tailored for First Week Experience (FWE) tutorials, allowing users to easily navigate between different pages and chapters while still retaining access to the current page's internal table of contents. The changes involve new layout definitions, updated styling, and a refactored data model to support this richer navigation experience. 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 introduces a new page navigation feature within the top table-of-contents dropdown, which is a great enhancement for tutorial-style content. The implementation is solid, involving a new TutorialLayout, a significant and well-executed refactoring of the table of contents components and data models, and corresponding style updates. The move to a unified PageNavigationData model is a good architectural improvement. I have a couple of minor suggestions to improve performance and code consistency.
|
Visit the preview URL for this PR (updated for commit 21fcef2): https://flutter-docs-prod--pr12715-feat-page-navigation-dropdo-fzy88dz5.web.app |
9716995 to
fb7857d
Compare
This refactors some parts of the code to have more idiomatic Jaspr components and reduce logic in `global_scripts.dart`. - Implement a new `ComponentRef` system that in some capacity works similar to server components (more limited and less elegant, but functionally working). This is to unblock some improvements (some of which are included in this PR) to the interactive components of the website, as we can already start architecting towards server components and write less manual dom logic. - Change the `Dropdown` component to accept direct `toggle` and `content` components, which simplifies it's implementation. Migrate existing uses of `Dropdown`. - Migrate the top TOC (renamed to `PageNav`) to use the `Dropdown` component, as well as the new `ComponentRef`s. Split into separate "site-subheader" and "pagenav" elements. Preparations for #12715 - Add a new `Tooltip` component and migrate the glossary tooltips to it using the new `ComponentRef`s. Can be reused for #12600 --------- Co-authored-by: Parker Lougheed <parlough@gmail.com>
fb7857d to
21fcef2
Compare
This extends the top floating table-of-contents dropdown by an optional page navigation list, for use inside FWE tutorials.
Differences to the current toc:
To test this, I also created a new
TutorialLayoutthat hides the sidebar and forces the floating toc bar on all screen sizes. This should be improved in the future.Presubmit checklist
of 80 characters or fewer.