-
Notifications
You must be signed in to change notification settings - Fork 35
Premium preview merge master #655
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
Conversation
- Modified the condition for accessing TOC items to ensure it handles undefined cases correctly. - Updated the dependency array in the useMemo hook to include the entire toc object for better stability in TOC data generation.
* feat: add support for premium slug in generateConfig function - Introduced a new condition to handle slugs that include "premium/", allowing for better categorization in the configuration generation process. * refactor: update CloudPlan import paths across components - Replaced imports of CloudPlan from "shared/useCloudPlan" to "shared/interface" for consistency and clarity. - Adjusted related components to ensure proper usage of the updated CloudPlan type definition. * feat: extend EXTENDS_FOLDERS to include premium plan - Updated the EXTENDS_FOLDERS constant to include "premium" as a valid CloudPlan option, enhancing the flexibility of the table of contents generation. - Adjusted the type definition to ensure consistency with the new CloudPlan import. * feat: add CloudPlan type to path.ts for enhanced configuration - Imported CloudPlan into path.ts to support additional configuration options. - Updated the prefix variable type to CloudPlan | undefined for improved type safety in the generateConfig function. * feat: restructure page creation logic by modularizing create-pages functionality - Removed the existing create-pages.ts file and replaced it with modular files for creating specific pages: create-docs, create-doc-home, create-cloud-api, create-search, and create-404. - Introduced an interface file to define common types and constants, enhancing code organization and maintainability. - Each new file encapsulates the logic for creating its respective page, improving clarity and separation of concerns in the page generation process. * refactor: simplify prefix determination in generateConfig function - Replaced multiple conditional checks for slug prefixes with a more concise approach using an array and the find method. - Maintained the existing logic for handling the dedicated prefix based on the presence of a name, improving code readability and maintainability. * fix: update template import paths in page creation files - Adjusted the import paths for template files in create-404, create-cloud-api, create-doc-home, create-docs, and create-search to ensure correct resolution. - Enhanced consistency across page creation logic by standardizing the path structure.
- Introduced disk usage checks at various stages of the production workflow to monitor system resource usage. - Added checks after Docker image cleanup, node setup, dependency installation, cache restoration, and before/after deployment steps for better resource management.
- Added a step to maximize build space using the easimon/maximize-build-space action, allowing for better resource management during builds. - Included additional disk usage checks to monitor space before and after the build process, improving overall workflow efficiency.
- Consolidated multiple run commands into single block executions for installing dependencies and purging CDN cache, enhancing readability and maintainability of the workflow script.
- Updated the name of the markdown source from `markdown-pages1` to `markdown-pages` for improved clarity and consistency in the configuration.
- Removed redundant disk usage checks and consolidated cleanup commands into a single run step to streamline the production workflow. - Enhanced disk space management by directly removing unnecessary directories and pruning Docker images, improving build efficiency.
* chore: adjust tracesSampleRate in Sentry configuration for improved performance * fix: improve node removal safety in useTotalContributors hook * fix: correct dependency array in TabContentDetector to ensure proper rendering behavior * fix: enhance TabContentDetector to prevent duplicate rendering of tabs - Added renderedTabs prop to SimpleTab and TabContentDetector components. - Updated useEffect in TabContentDetector to check if the tab has already been rendered, ensuring proper rendering behavior and preventing duplicate calls to onRendered. * feat: update HeaderNav to conditionally render cloud plan links - Integrated useCloudPlan hook to retrieve the current cloud plan. - Modified navigation links in HeaderNavStack and HeaderNavStackMobile to dynamically adjust the URL based on the cloud plan, enhancing user experience. * fix: correct optional chaining in filterRightToc function - Removed optional chaining for item.items to ensure proper filtering of nested items in the filterRightToc function, enhancing functionality.
- Modified the navigation links in HeaderNavStack and HeaderNavStackMobile to include a condition that allows for rendering the default URL when the cloud plan is undefined, improving user experience and navigation reliability.
#653) * feat: enhance navigation state management with session storage - Updated the LeftNavTree component to support saving and retrieving navigation item IDs from session storage, improving user experience by maintaining state across sessions. - Modified the calcExpandedIds function to accept an optional targetId for more precise matching. - Implemented helper functions to handle session storage interactions for navigation items. * refactor: simplify navigation state management in LeftNavTree component - Removed session storage interactions for expanded and selected navigation items, streamlining state management. - Updated the calcExpandedIds function calls to eliminate unnecessary parameters, enhancing clarity and performance. * refactor: simplify scroll behavior in scrollToElementIfInView function - Updated the scrollToElementIfInView function to directly call scrollIntoView with a "center" block option, removing unnecessary viewport checks and improving code clarity.
- Updated import paths for clarity and consistency. - Removed unused navigation URL generation functions to simplify the createDocs logic. - Introduced a default value for inDefaultPlan to enhance code readability.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello @shhdgit, 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 documentation site's build and display logic to focus solely on a 'Premium' cloud offering. It removes all code paths and UI elements associated with other cloud plans, ensuring that the site's content and navigation are tailored exclusively for the 'Premium' experience. This change impacts how pages are generated, how navigation is structured, and how the site interacts with search engine crawlers. Highlights
Ignored Files
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 focuses on setting up a 'Premium preview' by removing the 'starter' and 'essential' plans and consolidating them into a single 'premium' plan. It also adjusts the site configuration for a preview environment, notably by disallowing search engine indexing via robots.txt and a noindex meta tag. The changes are consistent and well-aligned with the PR's goal. I've identified a potential build-breaking path issue and a minor code cleanup opportunity. My feedback includes ready-to-commit suggestions for these points, as requested by the style guide.
- Removed cloud plan checks from navigation links in HeaderNavStack and HeaderNavStackMobile, streamlining the URL generation for the TiDB Cloud link. - Cleaned up unused imports related to cloud plan management for improved code clarity.
- Changed the regex filter in createDocHome to point to the updated documentation file path for TiDB Cloud. - Removed unused navigation URL generation functions to streamline the code and improve clarity.
No description provided.