-
Notifications
You must be signed in to change notification settings - Fork 2
chore: bump rspress to v2.0.0-rc.2 #219
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
🦋 Changeset detectedLatest commit: 0673734 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughCoordinated changes: Node.js bump, multiple dependency/version upgrades, removal of "Attribute Extensions" docs, migration of many theme imports from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-05-26T09:09:21.339ZApplied to files:
📚 Learning: 2025-05-26T09:09:21.339ZApplied to files:
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
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.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx (1)
10-28: Remove unused compact prop from the interface.The
compactproperty is declared inNavMenuSingleItemProps(line 12) but is no longer destructured or used in the component. This creates an inconsistency in the public API.Apply this diff to remove the unused property:
export interface NavMenuSingleItemProps extends Omit<NavItemWithLink, 'text'> { base?: string - compact?: boolean download?: string | boolean pathname?: string rightIcon?: ReactNode text?: ReactNode }
🧹 Nitpick comments (5)
packages/doom/src/global/SiteOverrides/index.tsx (1)
6-18: Confirm new nav selector matches rspress v2 DOM; consider a small fallback.The only behavioral change here is the selector (
.rp-nav__title__link). If this ever drifts from the actual DOM structure,setNavBarSpanswill silently no-op and logo text won’t show.Two suggestions:
- Double‑check in the running v2.0.0‑rc.2 docs that the nav title anchor indeed uses
.rp-nav__title__link.- Optionally keep a backward‑compat fallback (old selector or a more resilient selector) if you expect mixing themes or future DOM tweaks.
packages/doom/src/plugins/replace/types.ts (1)
24-27: Add JSDoc documentation for the newanchorproperty.The new
anchoroptional property is correctly typed and doesn't break the interface contract. However, other properties in similar interfaces (e.g.,ReferenceItemSource) include JSDoc comments explaining their purpose. For consistency and clarity, consider documenting what theanchorproperty represents.Apply this diff to add documentation:
export interface NormalizedReferenceSource extends ReferenceItemRemote, ReferenceItemSource { + /** + * Anchor link identifier for the reference source + */ anchor?: string }packages/doom/src/cli/load-config.ts (1)
326-330: Reasonable warning suppression for third-party module.Suppressing build warnings from
flexsearchis acceptable if these are known, non-actionable warnings from the library. Consider adding a brief comment explaining why this suppression is needed for future maintainers.packages/doom/package.json (1)
66-77: Review mermaid 11.12.2 major upgrade and additional dependency bumps.Multiple significant dependency updates occur in this range, including:
- mermaid: 11.12.2 (major bump, likely from 10.x)
- openai: 6.10.0 (major bump)
- type-fest: 5.3.1 (major bump)
- typescript-eslint: 8.49.0 (major bump)
- yaml: 2.8.2 (major bump)
While these appear to be intentional updates supporting rspress 2.0.0-rc.2, verify that documentation generation with mermaid diagrams still renders correctly, and that llms plugin (which uses openai) works as expected with the new major version.
Would you like me to generate a test script to verify that the mermaid diagram rendering and LLMs plugin integration still work correctly with these new major versions?
packages/doom/styles/versions-nav.module.scss (1)
1-118: Consider centralizing sharedrp-*utilities outside versions-nav moduleThe new
:globalblock introduces a broad set of generic layout/typography utility classes (.rp-flex,.rp-text-sm, etc.), which are then consumed by VersionsNav components. This works, but it makes a versions-nav–specific stylesheet responsible for global utilities and may duplicate or override similar classes from the core theme.If these utilities are or become widely reused, consider moving them into a more central stylesheet (e.g. a global theme utilities file) or clearly documenting that this module intentionally redefines them to avoid surprises.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (36)
.nvmrc(1 hunks)docs/en/usage/markdown.md(0 hunks)docs/zh/usage/markdown.md(0 hunks)package.json(1 hunks)packages/doom/package.json(2 hunks)packages/doom/src/cli/load-config.ts(5 hunks)packages/doom/src/global/AuthCheck/index.tsx(1 hunks)packages/doom/src/global/SiteOverrides/index.tsx(1 hunks)packages/doom/src/login/Button/index.tsx(1 hunks)packages/doom/src/login/index.tsx(1 hunks)packages/doom/src/plugins/directives/remark-directives.ts(2 hunks)packages/doom/src/plugins/replace/types.ts(1 hunks)packages/doom/src/runtime/components/Badge.ts(1 hunks)packages/doom/src/runtime/components/ExternalSiteLink.tsx(1 hunks)packages/doom/src/runtime/components/JsonViewer.tsx(1 hunks)packages/doom/src/runtime/components/K8sCrd.tsx(1 hunks)packages/doom/src/runtime/components/OpenAPIPath.tsx(1 hunks)packages/doom/src/runtime/components/Overview.tsx(2 hunks)packages/doom/src/runtime/components/PackageManagerTabs.ts(1 hunks)packages/doom/src/runtime/components/Steps.ts(1 hunks)packages/doom/src/runtime/components/Tab.ts(1 hunks)packages/doom/src/runtime/components/Tabs.tsx(1 hunks)packages/doom/src/runtime/components/Toc.ts(1 hunks)packages/doom/src/runtime/components/_HeadingTitle.tsx(1 hunks)packages/doom/src/runtime/components/_X.tsx(1 hunks)packages/doom/src/theme/Layout.tsx(3 hunks)packages/doom/src/theme/Search.tsx(1 hunks)packages/doom/src/theme/VersionsNav/NavMenuGroup.tsx(2 hunks)packages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx(2 hunks)packages/doom/src/theme/VersionsNav/index.tsx(2 hunks)packages/doom/src/theme/index.ts(1 hunks)packages/doom/src/theme/useEditLink.ts(2 hunks)packages/doom/styles/global.scss(1 hunks)packages/doom/styles/link.module.scss(1 hunks)packages/doom/styles/versions-nav.module.scss(1 hunks)packages/export/package.json(1 hunks)
💤 Files with no reviewable changes (2)
- docs/en/usage/markdown.md
- docs/zh/usage/markdown.md
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.
📚 Learning: 2025-05-26T08:59:41.491Z
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T08:59:41.491Z
Learning: In rspress/core v2.0.0-beta.7, the '/theme' export is available in the package exports field as `"./theme": { "default": "./theme.ts" }`, so imports like `import { Badge, Button } from 'rspress/core/theme'` are valid even if ESLint shows resolution errors.
Applied to files:
packages/doom/src/theme/VersionsNav/NavMenuGroup.tsxpackages/doom/src/runtime/components/_X.tsxpackages/doom/src/theme/index.tspackages/doom/src/runtime/components/Badge.tspackages/doom/src/runtime/components/JsonViewer.tsxpackages/doom/src/runtime/components/OpenAPIPath.tsxpackages/doom/src/runtime/components/Tab.tspackages/doom/src/runtime/components/PackageManagerTabs.tspackages/doom/src/theme/Search.tsxpackages/doom/src/runtime/components/K8sCrd.tsxpackages/doom/package.jsonpackages/doom/src/runtime/components/Tabs.tsxpackages/doom/src/runtime/components/Steps.tspackages/doom/src/runtime/components/Toc.tspackages/doom/src/theme/Layout.tsxpackages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx
📚 Learning: 2025-05-26T09:09:21.339Z
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.
Applied to files:
packages/doom/src/theme/VersionsNav/NavMenuGroup.tsxpackages/doom/src/runtime/components/_X.tsxpackages/doom/src/theme/index.tspackages/doom/src/runtime/components/JsonViewer.tsxpackages/doom/src/runtime/components/OpenAPIPath.tsxpackages/doom/src/runtime/components/Tab.tspackages/doom/src/runtime/components/PackageManagerTabs.tspackages/doom/src/theme/Search.tsxpackages/doom/package.jsonpackages/doom/src/runtime/components/Tabs.tsxpackages/doom/src/runtime/components/Steps.tspackages/doom/src/runtime/components/Toc.tspackages/doom/src/theme/Layout.tsx
📚 Learning: 2025-07-09T02:33:05.638Z
Learnt from: JounQin
Repo: alauda/doom PR: 117
File: src/remark-lint/no-heading-punctuation.ts:4-4
Timestamp: 2025-07-09T02:33:05.638Z
Learning: In the alauda/doom project, JounQin prefers to keep the `toString` import from `mdast-util-to-string` as is, even though it shadows the global toString property. Variable shadowing warnings for this specific case should not be flagged as issues.
Applied to files:
packages/doom/src/runtime/components/_X.tsxpackages/doom/src/theme/index.tspackages/doom/src/runtime/components/Toc.ts
📚 Learning: 2025-05-29T16:25:28.086Z
Learnt from: JounQin
Repo: alauda/doom PR: 40
File: src/plugins/sitemap/index.ts:7-7
Timestamp: 2025-05-29T16:25:28.086Z
Learning: In rspress/shared v2.0.0-beta.8, the '/logger' export is available in the package exports field, so imports like `import { logger } from 'rspress/shared/logger'` are valid even if ESLint shows resolution errors. This is used throughout the codebase in files like src/cli/translate.ts, src/cli/load-config.ts, src/utils/git.ts, and src/plugins/sitemap/index.ts.
Applied to files:
packages/doom/src/theme/index.tspackages/doom/src/runtime/components/Badge.tspackages/doom/src/runtime/components/Tab.tspackages/doom/src/theme/Search.tsxpackages/doom/package.jsonpackages/doom/src/cli/load-config.tspackages/doom/src/runtime/components/Steps.tspackages/doom/src/runtime/components/Toc.ts
📚 Learning: 2025-05-26T09:09:21.339Z
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: JounQin has mentioned multiple times that the alauda/doom project uses yarn v4, and there are no ESLint import resolution errors for rspress/core subpath imports.
Applied to files:
packages/doom/src/runtime/components/JsonViewer.tsxpackages/doom/package.json
📚 Learning: 2025-10-30T06:51:00.220Z
Learnt from: JounQin
Repo: alauda/doom PR: 202
File: packages/doom/styles/login.module.scss:1-14
Timestamp: 2025-10-30T06:51:00.220Z
Learning: In CSS Modules (files with .module.css or .module.scss extension), class selectors are locally scoped by default unless explicitly wrapped in :global(). When reviewing selectors like body:has(.someClass) in CSS Module files, remember that .someClass will be transformed to a unique hashed class name, preventing conflicts with other files.
Applied to files:
packages/doom/styles/link.module.scsspackages/doom/styles/versions-nav.module.scss
📚 Learning: 2025-06-06T07:08:55.881Z
Learnt from: JounQin
Repo: alauda/doom PR: 69
File: package.json:101-101
Timestamp: 2025-06-06T07:08:55.881Z
Learning: When a package has peer dependencies that require TypeScript (like `eslint-react/eslint-plugin`), TypeScript should be moved from devDependencies to dependencies to satisfy the peer dependency requirement.
Applied to files:
package.jsonpackages/doom/package.json
📚 Learning: 2025-06-09T03:10:41.010Z
Learnt from: JounQin
Repo: alauda/doom PR: 75
File: src/cli/load-config.ts:4-7
Timestamp: 2025-06-09T03:10:41.010Z
Learning: The alauda/doom project uses yarn v4 as the package manager, not npm. Always reference yarn commands when suggesting package management operations.
Applied to files:
packages/doom/package.json
🔇 Additional comments (40)
packages/doom/src/runtime/components/ExternalSiteLink.tsx (1)
20-20: Formatting improvement approved.The interface declaration has been consolidated to a single-line extends clause, which aligns with modern style practices. No functional changes to the component or its public API.
packages/doom/src/runtime/components/OpenAPIPath.tsx (1)
2-2: Badge import swap looks correct and consistent with rspress migrationSwitching
Badgeto@rspress/core/theme-originalkeeps usage unchanged and matches the broader theme import migration in this PR. No issues spotted here.packages/doom/src/runtime/components/K8sCrd.tsx (1)
5-5: Import migration to@rspress/core/theme-originallooks consistent with the rspress v2 bumpThis redirect of
BadgeandButtonto@rspress/core/theme-originalmatches the PR’s goal and keeps the rest of the component unchanged. Please just confirm that this module exists inv2.0.0-rc.2and thatBadge/Buttonprops remain compatible so build and type‑checks pass.packages/doom/src/runtime/components/PackageManagerTabs.ts (1)
1-4: Re-export path change keeps the API stableNamed and default exports for
PackageManagerTabsare preserved while only the source module switches to@rspress/core/theme-original, which aligns with the rest of the PR’s theme migration. This looks good; just ensure the new subpath is exported by@rspress/coreinv2.0.0-rc.2(build/tests should confirm).packages/doom/src/global/AuthCheck/index.tsx (1)
31-40: Explicitly marking navigation as fire-and-forget looks goodUsing
void navigate(...)makes it clear that this redirect is intentionally non-awaited and keeps the callback synchronous, matching the existingvoid authCheck()pattern elsewhere in this file. No behavioral change, just clearer intent and avoids stray promise warnings.packages/doom/src/plugins/replace/types.ts (1)
24-27: Theanchorproperty in theNormalizedReferenceSourceinterface is actively consumed inresolve-reference.ts(lines 98, 111–112, 116), where it is used to find matching table of contents entries by ID or text. The implementation includes proper existence checks and error handling when an anchor is not found.packages/doom/src/plugins/directives/remark-directives.ts (1)
14-15: Callout container inclusion and simplified filter look correct; confirm AST shape and fallback behaviorAdding
$$$callout$$$toCONTAINER_DIRECTIVE_TYPESand usingCONTAINER_DIRECTIVE_TYPES.has(node.name)for the early-return makes sense: callout containers will now be left to the upstream Rspress/remark pipeline, consistent with the existing admonition types.Two things worth double‑checking:
- Verify that in Rspress 2.0 the callout container nodes really come through with
node.type === 'containerDirective'andnode.name === '$$$callout$$$'; any mismatch here would cause them to fall through to the defaulttoMarkdown→ text replacement path.- Given the removal of the previous unnamed
containerDirectivefallback (per the PR summary), ensure there are no remaining docs that still rely on unnamedcontainerDirectivenodes with Rspress-specific classes — those will now be rendered back as literal directive syntax text via the default branch.If both assumptions hold, the change looks good and keeps this plugin narrowly scoped to Doom-specific directives.
Also applies to: 30-33
packages/doom/src/cli/load-config.ts (3)
65-77: LGTM! Locale config type simplification is well-designed.The
Omit<LocaleConfig, 'lang'>type correctly reflects thatlangis added separately when building locale entries (line 196), and removing embedded editLink/text fields aligns with the migration to i18n-driven text retrieval.
208-208: LGTM!The non-null assertion is safe since
zhis statically defined inKNOWN_LOCALE_CONFIGS.
268-276: LGTM! Clean conditional configuration.The editLink is now conditionally included only when both
editRepoEnabledandeditRepoBaseUrlare truthy, which properly guards against incomplete configurations. The locale fallback logic is straightforward.packages/doom/src/runtime/components/Overview.tsx (2)
7-11: Import source@rspress/core/theme-originalis not documented in rspress v2.0.0-rc.2 official exportsThe rspress v2.0.0-rc.2 package.json only documents
@rspress/core/theme(nottheme-original), and the official API docs do not listFallbackHeading,Link, orrenderInlineMarkdownas available exports. However, this codebase uses@rspress/core/theme-originalthroughout—including inpackages/doom/src/theme/index.tswhich re-exports from it. Verify whethertheme-originalis an internal/stable path supported by your rspress version, or check if a public export should be used instead.
220-225:FallbackHeadingtreatstitleas plain text — verify no markdown loss ingroup.name
FallbackHeading'stitleprop does not support inline markdown; it renders content as plain text only. This change replaces<h2> + renderInlineMarkdown(group.name)with<FallbackHeading level={2} title={group.name} />, which means any inline markdown formatting ingroup.namewill no longer be processed. If sidebar group labels in this project should support markdown (e.g., bold, italics, links), this substitution will silently break that formatting. Confirm that group names are plain strings or that markdown support was not intended..nvmrc (1)
1-1: LGTM!Node.js patch version bump is straightforward and compatible with all engine requirements (>=20.19.0) specified across the monorepo.
packages/export/package.json (1)
25-25: LGTM!Playwright 1.57.0 upgrade should have no functional impact—tests are expected to continue passing with no breaking changes. The bump aligns the browser package with the main playwright package.
Also applies to: 30-30
package.json (1)
34-62: LGTM!All development dependency updates are minor or patch version bumps with no known breaking changes. ESLint, SWC, and tooling versions stay well-aligned. TypeScript definitions and core tools updated consistently.
packages/doom/package.json (3)
44-50: LGTM—Rsbuild plugins aligned correctly.The Rsbuild plugin versions are appropriately updated (1.2.x → 1.4.x) and should be compatible with rspress 2.0.0-rc.2. Ensure that any new Rsbuild plugin APIs introduced in these minor versions are leveraged where applicable.
As per learnings, the alauda/doom project uses yarn v4 for dependency management, which should handle all the module resolutions correctly. Confirm yarn installation completes without errors after these bumps.
52-56: Theme migration to rspress 2.0.0-rc.2 is complete.All imports from
@rspress/core/themehave been successfully migrated to@rspress/core/theme-originalthroughout the codebase. No stale imports remain.
61-61: No compatibility issues found with chokidar 5.0.0.The package.json already satisfies all chokidar v5 requirements: the project is configured as an ESM module (
"type": "module") and requires Node.js ≥ 20.19.0. The file watcher implementation inpackages/doom/src/cli/index.tsuses only standard, stable APIs (watch paths with standard options likeignoreInitial,ignored, andcwd), with no reliance on deprecated glob expansion patterns. The watch API signature and event handling remain unchanged and compatible with v5.0.0.packages/doom/src/runtime/components/_X.tsx (1)
1-1: Verify that@rspress/core/theme-originalis the correct import path for rspress v2.0.0-rc.2.Official rspress documentation shows imports should use
@rspress/core/theme(nottheme-original), and published versions (v1.x) only export./theme. The codebase consistently uses@rspress/core/theme-originalacross all files, but this path is not documented in available sources and does not appear in published package exports. Confirm with the rspress team or release notes whethertheme-originalis valid in v2.0.0-rc.2, or if the imports should be@rspress/core/themeinstead.packages/doom/src/runtime/components/_HeadingTitle.tsx (1)
41-47: Anchor class rename and ordering look consistentRenaming to
rp-header-anchorand rendering the anchor before the heading text aligns with the updated link styles and should be fine givenaria-hiddenon the anchor. No functional issues spotted.packages/doom/src/theme/VersionsNav/NavMenuGroup.tsx (1)
2-2: Nav menu theme-original import and text sizing look correctSwitching
Tagto@rspress/core/theme-originaland addingrp-text-smon the wrapper are consistent with the theme-original migration and the new utility classes; behavior should remain the same apart from intended typography tweaks. Please just confirm the build/TS types are clean with the new rspress version.Based on learnings, Yarn v4 should resolve these subpath imports correctly.
Also applies to: 135-135
packages/doom/src/runtime/components/JsonViewer.tsx (1)
1-1: JsonViewer theme-original import matches the migrationUpdating
CodeBlockRuntime,Tab, andTabsto import from@rspress/core/theme-originalkeeps behavior intact while aligning with the rest of the theme changes.Please confirm the new rc.2 exposes these exports under
theme-originalas expected.
Based on learnings, Yarn v4 should handle the subpath resolution correctly.packages/doom/src/runtime/components/Steps.ts (1)
1-1: Steps re-export source update is straightforwardRe-exporting
Steps(and default) from@rspress/core/theme-originalpreserves the public surface and matches the rest of the theme-original migration.Please confirm
Stepsis actually exported fromtheme-originalin rspress v2.0.0-rc.2.packages/doom/src/theme/Search.tsx (1)
2-2: Search fallback to theme-original looks goodPointing
OriginalSearchat@rspress/core/theme-originalkeeps the existing “Algolia if envs set, otherwise default search” behavior the same.Please double-check that
Searchis exported fromtheme-originalin rspress v2.0.0-rc.2 and that bundling/env handling still behaves as expected.
Based on learnings, Yarn v4 should resolve this subpath without issues.packages/doom/styles/link.module.scss (1)
25-31: Header anchor exclusion correctly updatedSwitching the exclusion to
:not(:global(.rp-header-anchor))matches the new class used in_HeadingTitleand keeps the global header anchors from inheriting the generic.linkstyling inside this CSS module.Based on learnings, the :global usage is appropriate in this CSS Modules context.
packages/doom/src/login/index.tsx (1)
19-19: onLoggedIn callback refactor is a no-op behaviorallyInlining the
navigatecall into a single-expressionuseCallbackis a clean style improvement with identical behavior.packages/doom/src/runtime/components/Tab.ts (1)
1-1: LGTM!The re-export path migration to
@rspress/core/theme-originalaligns with the rspress v2.0.0-rc.2 upgrade pattern. Based on learnings, yarn v4 handles package exports correctly.packages/doom/styles/global.scss (1)
112-126: LGTM!The TOC styling improvements provide good visual feedback on hover with consistent use of CSS variables. The
:not(.rp-toc-item--active)selector correctly preserves active item styling while updating inactive items.packages/doom/src/runtime/components/Badge.ts (1)
1-1: LGTM!Consistent re-export path migration to
@rspress/core/theme-original.packages/doom/src/runtime/components/Toc.ts (1)
1-1: LGTM!Consistent re-export path migration to
@rspress/core/theme-original.packages/doom/src/runtime/components/Tabs.tsx (1)
1-1: LGTM!Import path migration to
@rspress/core/theme-originalis consistent with the PR-wide upgrade pattern. The component logic remains unchanged.packages/doom/src/theme/useEditLink.ts (1)
1-32: i18n migration looks good overall.The shift from
useLocaleSiteDatatouseI18nwitht('editLinkText')centralizes translation handling. The validation logic on line 10 correctly guards against missingeditLinkTexttranslations.packages/doom/src/login/Button/index.tsx (1)
4-7: LGTM!Formatting change only. The multi-line
extendsclause improves readability without altering type semantics.packages/doom/src/theme/Layout.tsx (3)
143-143: LGTM!The inline style addition for consistent spacing is appropriate.
19-20: I need the review comment to rewrite. Please provide the original review comment (within<review_comment>tags) along with any necessary context about the code under review.
2-5: Incorrect import path: should be'rspress/theme'not'@rspress/core/theme-original'.The import source should be
'rspress/theme'according to rspress official documentation for theme customization. The export path@rspress/core/theme-originaldoes not exist in published rspress versions. Update the import to:import { Layout as OriginalLayout, getCustomMDXComponent, } from 'rspress/theme'Likely an incorrect or invalid review comment.
packages/doom/src/theme/index.ts (1)
3-3: LGTM!The barrel export update is consistent with the theme migration across the codebase.
packages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx (2)
2-2: LGTM!Tag import source updated consistently with the theme migration.
46-48: LGTM!The className simplification removes compact-dependent styling and the redundant
rspress-nav-menu-item-activeclass, resulting in cleaner code.packages/doom/src/theme/VersionsNav/index.tsx (1)
109-127: Excellent refactoring!Removing the portal-based rendering and DOM manipulation logic significantly improves maintainability. The component now renders inline via the
afterNavMenuprop in Layout, eliminating brittle DOM queries and MutationObserver usage.
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.
Pull request overview
This PR upgrades rspress from v2.0.0-beta.34 to v2.0.0-rc.2 along with related dependency updates. The upgrade includes breaking API changes requiring code modifications to adapt to the new version.
- Updated rspress packages from beta.34 to rc.2
- Migrated from
@rspress/core/themeto@rspress/core/theme-originalimport path - Updated API usage (useLocaleSiteData → useI18n, editLink text retrieval)
- Refactored VersionsNav component (removed React portal pattern)
Reviewed changes
Copilot reviewed 36 out of 39 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/export/package.json | Updated Playwright dependencies from 1.56.1 to 1.57.0 |
| packages/doom/package.json | Updated rspress packages to 2.0.0-rc.2 and numerous other dependency updates |
| package.json | Updated devDependencies including @changesets, @swc/core, @types/node, prettier, etc. |
| packages/doom/src/theme/index.ts | Changed export from '@rspress/core/theme' to '@rspress/core/theme-original' |
| packages/doom/src/theme/useEditLink.ts | Migrated from useLocaleSiteData to useI18n for retrieving edit link text |
| packages/doom/src/theme/VersionsNav/index.tsx | Removed React portal usage and MutationObserver for nav menu detection |
| packages/doom/src/theme/VersionsNav/SvgWrapper.tsx | Added new component for handling SVG icons (string or React component) |
| packages/doom/src/theme/VersionsNav/Down.tsx | Added Down arrow SVG component |
| packages/doom/src/theme/VersionsNav/NavMenuSingleItem.tsx | Updated class names, removed rspress-nav-menu-item-active class |
| packages/doom/src/theme/VersionsNav/NavMenuGroup.tsx | Changed import path and added rp-text-sm class |
| packages/doom/src/theme/Search.tsx | Changed import from '@rspress/core/theme' to '@rspress/core/theme-original' |
| packages/doom/src/theme/Layout.tsx | Changed imports and added afterNavMenu prop with inline style for PDF link |
| packages/doom/src/runtime/components/_HeadingTitle.tsx | Updated class name and reordered anchor link before children |
| packages/doom/src/runtime/components/*.ts | Updated all imports from '@rspress/core/theme' to '@rspress/core/theme-original' |
| packages/doom/src/runtime/components/Overview.tsx | Added FallbackHeading import and replaced renderInlineMarkdown usage |
| packages/doom/src/plugins/directives/remark-directives.ts | Added '$$$callout$$$' directive and removed rspress issue workaround |
| packages/doom/src/login/index.tsx | Simplified onLoggedIn callback to inline arrow function |
| packages/doom/src/global/SiteOverrides/index.tsx | Updated selector from attribute selector to class selector for nav links |
| packages/doom/src/global/AuthCheck/index.tsx | Added void operator to navigate call |
| packages/doom/src/cli/load-config.ts | Removed locale-specific config defaults, updated editLink configuration, added rspack ignoreWarnings |
| packages/doom/styles/versions-nav.module.scss | Added extensive utility classes (rp-* prefixed) |
| packages/doom/styles/global.scss | Added styles for rp-link hover and rp-toc-item__text |
| packages/doom/styles/link.module.scss | Updated class name from .header-anchor to .rp-header-anchor |
| docs/*/usage/markdown.md | Removed "Attribute Extensions" section |
| .nvmrc | Updated Node.js version from 24.11.0 to 24.11.1 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: JounQin <admin@1stg.me>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores
Style
✏️ Tip: You can customize this high-level summary in your review settings.