Commit 3fe8e5b
feat: multi toc (#629)
* feat: refactor version selection component and update import paths
- Introduced a new VersionSelect component to manage version selection in the navigation.
- Updated LeftNav to import VersionSelect from the correct relative path.
- Enhanced the version selection logic to improve user experience and maintainability.
* feat: update HeaderAction and Search components with new icons and layout adjustments
- Replaced TranslateIcon with a new globe SVG icon for improved visual representation.
- Adjusted spacing in HeaderAction component for better alignment of elements.
- Updated Search component to use a new search SVG icon and modified its width for a more compact design.
- Enhanced styling in SearchPopper for improved layout and responsiveness.
* feat: enhance Header component with conditional banners for auto-translation and archive builds
- Added conditional rendering for a banner in the Header component based on auto-translation status and build type.
- Improved the presentation of machine translation notices with updated styling and links.
- Integrated an ArchiveBanner for archive builds, ensuring appropriate messaging for different build types.
* feat: add outlined variant styling to theme
- Introduced new styles for the outlined variant in the theme, including color, border, and background adjustments.
- Enhanced hover effects for the outlined variant to improve user interaction and visual feedback.
* refactor: simplify Header component structure and enhance banner logic
- Introduced a HeaderProps interface for better type management in the Header component.
- Refactored the banner rendering logic into a separate HeaderBanner component for improved readability and maintainability.
- Streamlined the conditional rendering of banners based on auto-translation status and build type, ensuring clearer presentation of messages.
* refactor: consolidate banner logic in Header component and remove ArchiveBanner
- Merged the functionality of the ArchiveBanner into the Header component to streamline banner rendering.
- Enhanced the logic for displaying banners based on build type and auto-translation status.
- Removed the ArchiveBanner component to reduce complexity and improve maintainability.
* feat: implement cloud mode navigation and enhance page generation
- Added support for cloud mode navigation with starter and essential options, allowing users to switch between different cloud plans.
- Introduced new navigation generation functions for starter and essential paths.
- Enhanced the createDocs function to include starter and essential navigation URLs in the page creation process.
- Updated the MDXContent component to utilize cloud mode for rendering appropriate navigation based on user selection.
- Refactored various components to integrate cloud mode logic, improving user experience and maintainability.
* fix: update URL generation logic for cloud mode navigation
- Enhanced the createDocs function to generate URLs based on the presence of "starter" or "essential" in the file path, improving navigation structure.
- Adjusted the URL format in the CloudVersionSelect component to include the selected version in the path, ensuring accurate navigation links for users.
* refactor: enhance CloudVersionSelect and VersionSelect components for improved layout and styling
- Updated the CloudVersionSelect and VersionSelect components to use Box for better layout control and styling consistency.
- Increased padding in the menu list and adjusted item height for improved usability.
- Enhanced the Starter label to include additional context for clarity.
- Implemented sticky positioning for the version selection box to maintain visibility during scrolling.
* refactor: integrate essential navigation into documentation home and update version selection components
- Added essential navigation URL generation to the createDocHome function for improved documentation structure.
- Refactored CloudVersionSelect and VersionSelect components to utilize a shared VersionSelectMenu for consistency and enhanced styling.
- Adjusted layout properties in version selection components for better user experience and visual appeal.
* refactor: improve layout and functionality of CloudVersionSelect and VersionSelect components
- Integrated CheckIcon to visually indicate the selected cloud version in the CloudVersionSelect component.
- Enhanced layout using Box for better alignment and spacing in version items.
- Updated styling for FormLabel to improve clarity and visual consistency.
- Adjusted justifyContent in VersionSelectMenu for improved item layout.
* refactor: update useCloudMode hook and related components for improved functionality
- Refactored the useCloudMode hook to accept a repo parameter, enhancing its flexibility for different contexts.
- Updated Link and MDXComponents to remove unnecessary cloud mode logic, simplifying their implementation.
- Adjusted CloudVersionSelect and DocTemplate components to utilize the new useCloudMode signature, ensuring consistent behavior across the application.
* refactor: adjust layout of CloudVersionSelect for improved alignment
- Updated the Box component in CloudVersionSelect to use flexbox for center alignment of version items.
- Enhanced visual consistency by ensuring the CheckIcon is properly aligned with the version display.
* fix: update version rendering logic in VersionSelect component
- Modified the renderVersion function to return "Dev" for the "dev" version, improving clarity in version display.
- Adjusted the VersionItems component to call renderVersion with the correct casing for consistency.
* locale, src: update campaign banner for renaming serverless
Revised the campaign section in English, Japanese, and Chinese translation files to reflect the new TiDB Cloud Starter branding and updated the link to the quickstart page. Changed the banner icon in Header.tsx from a rocket to a megaphone for better alignment with the new campaign.
* locale: update link
* Update links to tidbcloud.com
* Apply suggestions from code review
Co-authored-by: Yasuo Honda <[email protected]>
* locale: update campaign banner translations and refactor Link component
Revised the campaign section in English, Japanese, and Chinese translation files to reflect the new TiDB Cloud Starter branding. Refactored the Link component to introduce a new BlueAnchorLink variant for consistent styling across the application, enhancing the header banner with updated links and improved layout.
* refactor: consolidate version selection components for improved reusability
- Introduced a new SharedSelect component to encapsulate the VersionSelectButton and VersionSelectMenu, enhancing code reusability.
- Updated CloudVersionSelect and VersionSelect components to utilize the new shared components, streamlining their implementation and improving layout consistency.
- Refactored state management in version selection components for better clarity and performance.
* locale: update translations and enhance Link component styling
Revised English, Japanese, and Chinese translation files to standardize the "Try it out" text to "end" for consistency. Introduced a new CSS file for the Link component to manage styles, specifically for the new BlueAnchorLink variant, ensuring consistent text decoration across the application.
* refactor: enhance layout of CloudVersionSelect to include version icon
- Updated CloudVersionSelect to wrap the version label and icon in a flexbox for improved alignment and visual consistency.
- This change enhances the user interface by displaying the version icon alongside the version label.
* style: enforce text decoration for Link component
- Updated Link component styles to ensure consistent text decoration by applying `text-decoration: none` to all link variants.
- Modified CSS for the BlueAnchorLink to use `text-decoration: underline !important` on hover for better visibility.
* feat: update HeaderAction and Search components for improved functionality and layout
- Added a Search component to the HeaderAction for enhanced document searching capabilities.
- Adjusted the Search component's width for better usability.
- Updated button labels in the TiDBCloudBtnGroup for clarity, changing "Start for Free" to "Sign In" and vice versa.
---------
Co-authored-by: lilin90 <[email protected]>
Co-authored-by: Yasuo Honda <[email protected]>1 parent 9303081 commit 3fe8e5b
File tree
30 files changed
+792
-335
lines changed- gatsby
- locale
- en
- ja
- zh
- src
- components
- Layout
- Banner
- VersionSelect
- Search
- media/icons
- templates
- theme
30 files changed
+792
-335
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
100 | 108 | | |
| 109 | + | |
| 110 | + | |
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
| |||
119 | 129 | | |
120 | 130 | | |
121 | 131 | | |
| 132 | + | |
| 133 | + | |
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
| |||
254 | 266 | | |
255 | 267 | | |
256 | 268 | | |
257 | | - | |
| 269 | + | |
| 270 | + | |
258 | 271 | | |
259 | 272 | | |
260 | 273 | | |
| |||
270 | 283 | | |
271 | 284 | | |
272 | 285 | | |
| 286 | + | |
| 287 | + | |
273 | 288 | | |
274 | 289 | | |
275 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
68 | 141 | | |
69 | 142 | | |
70 | 143 | | |
| 144 | + | |
| 145 | + | |
71 | 146 | | |
72 | 147 | | |
73 | 148 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
14 | 63 | | |
15 | 64 | | |
16 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
| |||
162 | 159 | | |
163 | 160 | | |
164 | 161 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 9 | + | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| |||
177 | 174 | | |
178 | 175 | | |
179 | 176 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| |||
This file was deleted.
0 commit comments