chore(docs): fix base url paths#130
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR systematically normalizes internal site URLs by introducing centralized URL utilities exported from a new ChangesSite URL Normalization Infrastructure and Implementation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
projects/site/src/_11ty/layouts/docs.11ty.js (1)
50-54: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueConsider simplifying the baseTabUrl construction.
The
baseTabUrlremoves the leading/on line 51 (.replace('/', '')), then lines 91, 94, and 99 add it back (href="/${baseTabUrl}"). This could be simplified by keeping the leading/inbaseTabUrl:const baseTabUrl = `${data.page.url - .replace('/', '') .replace('/api/', '/') .replace('/examples/', '/') .replace(/(.*\/data-grid\/).+/, '$1')}`;Then use it directly:
-<a href="/${baseTabUrl}">Overview</a> +<a href="${baseTabUrl}">Overview</a>This would be clearer and avoid the remove-then-add pattern.
Also applies to: 91-99
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/_11ty/layouts/docs.11ty.js` around lines 50 - 54, The code builds baseTabUrl by stripping the leading '/' from data.page.url then later prepends '/' again when creating hrefs; to simplify, stop removing the leading slash: remove the initial .replace('/', '') from the baseTabUrl expression (leave data.page.url as-is when applying the subsequent .replace('/api/', '/'), .replace('/examples/', '/'), and .replace(/(.*\/data-grid\/).+/, '$1')), and update all call sites that currently do href="/${baseTabUrl}" to use href="${baseTabUrl}" (references: the baseTabUrl variable and the href usages that add '/').
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@projects/site/package.json`:
- Around line 204-211: The current package.json test task watches all source
files via the "files" array which causes tests defined in the "command" (e.g.,
metadata.test.ts, links.test.ts, site-urls.test.ts, api.test.ts) to re-run on
any src change; update the "files" array to only match test files (for example
restrict to patterns like src/**/*.{test,spec}.ts or src/**/*.test.ts and
include matching .js/.md if you have test variants) so that vitest only reruns
when test files change, leaving the "command" unchanged.
In `@projects/site/src/_11ty/layouts/links.test.ts`:
- Around line 6-9: The four regex constants RELATIVE_INTERNAL_LINK_PATTERN,
BASE_PREFIXED_INTERNAL_LINK_PATTERN, JS_RELATIVE_INTERNAL_LINK_PATTERN, and
JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN only account for "./" relative paths;
update each pattern to also match one or more "../" segments so "../docs/...",
"../examples/...", and "../starters/..." are caught too — modify the group that
currently matches (?:\.\/)? to allow sequences like (?:\.\.\/|\.\/)+ or a more
concise (?:\.\.\/)*\.\/? depending on desired strictness so both single and
multi-level parent traversals are rejected for both HTML and JS forms.
In `@projects/site/src/docs/metrics/testing-and-performance.11ty.js`:
- Around line 29-32: Remove the duplicate selected attribute from the wrong tab:
the first <nve-tabs-item> that links to "/docs/metrics/" currently has selected
but the page's correct active tab is the <nve-tabs-item> for "Testing &
Performance" (the one linking to "/docs/metrics/testing-and-performance/");
remove the selected attribute from the Metrics tab so only the Testing &
Performance <nve-tabs-item> remains selected to prevent conflicting active-state
behavior.
In `@projects/site/src/docs/metrics/wireit.11ty.js`:
- Line 59: Duplicate selected attribute: remove the extra selected on the
Metrics tab so only the Wireit Explorer tab remains selected. Locate the
<nve-tabs-item> element that renders the "Metrics" tab (the tag containing "<a
href=\"/docs/metrics/\">Metrics</a>") and delete the selected attribute from
that element, leaving the selected attribute only on the "Wireit Explorer"
<nve-tabs-item>.
---
Outside diff comments:
In `@projects/site/src/_11ty/layouts/docs.11ty.js`:
- Around line 50-54: The code builds baseTabUrl by stripping the leading '/'
from data.page.url then later prepends '/' again when creating hrefs; to
simplify, stop removing the leading slash: remove the initial .replace('/', '')
from the baseTabUrl expression (leave data.page.url as-is when applying the
subsequent .replace('/api/', '/'), .replace('/examples/', '/'), and
.replace(/(.*\/data-grid\/).+/, '$1')), and update all call sites that currently
do href="/${baseTabUrl}" to use href="${baseTabUrl}" (references: the baseTabUrl
variable and the href usages that add '/').
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: ce99f9ec-a08b-4139-a9d2-571dfc979998
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (69)
projects/core/src/tabs/tabs.examples.tsprojects/site/eleventy.config.jsprojects/site/package.jsonprojects/site/src/_11ty/layouts/common.jsprojects/site/src/_11ty/layouts/docs.11ty.jsprojects/site/src/_11ty/layouts/links.test.tsprojects/site/src/_11ty/layouts/metadata.jsprojects/site/src/_11ty/layouts/page.11ty.jsprojects/site/src/_11ty/plugins/llms-txt.jsprojects/site/src/_11ty/plugins/sitemap-xml.jsprojects/site/src/_11ty/shortcodes/index.jsprojects/site/src/_11ty/templates/api.jsprojects/site/src/_11ty/transforms/anchor-generator.jsprojects/site/src/_11ty/transforms/site-urls.jsprojects/site/src/_11ty/transforms/site-urls.test.tsprojects/site/src/_11ty/utils/site-url.jsprojects/site/src/_internal/metrics-carousel/metrics-carousel.tsprojects/site/src/docs/about/contributions.mdprojects/site/src/docs/about/migration.mdprojects/site/src/docs/about/support.mdprojects/site/src/docs/api-design/logs.mdprojects/site/src/docs/api-design/packaging.mdprojects/site/src/docs/changelog/changelog.11ty.jsprojects/site/src/docs/changelog/index.11ty.jsprojects/site/src/docs/elements/dialog.mdprojects/site/src/docs/elements/drawer.mdprojects/site/src/docs/elements/dropdown.mdprojects/site/src/docs/elements/forms/index.mdprojects/site/src/docs/elements/icon.mdprojects/site/src/docs/elements/notification.mdprojects/site/src/docs/elements/page.mdprojects/site/src/docs/elements/toast.mdprojects/site/src/docs/elements/toggletip.mdprojects/site/src/docs/elements/tooltip.mdprojects/site/src/docs/foundations/iconography.mdprojects/site/src/docs/foundations/index.mdprojects/site/src/docs/foundations/layout/grid.mdprojects/site/src/docs/foundations/layout/horizontal.mdprojects/site/src/docs/foundations/layout/index.mdprojects/site/src/docs/foundations/layout/responsive/container.mdprojects/site/src/docs/foundations/layout/responsive/index.mdprojects/site/src/docs/foundations/layout/responsive/viewport.mdprojects/site/src/docs/foundations/layout/vertical.mdprojects/site/src/docs/foundations/popovers.mdprojects/site/src/docs/foundations/themes/index.11ty.jsprojects/site/src/docs/foundations/typography.mdprojects/site/src/docs/foundations/view-transitions.mdprojects/site/src/docs/integrations/angular.mdprojects/site/src/docs/integrations/index.11ty.jsprojects/site/src/docs/integrations/lit.mdprojects/site/src/docs/integrations/mcp-apps.mdprojects/site/src/docs/integrations/shortcodes.jsprojects/site/src/docs/internal/guidelines/component-creation.mdprojects/site/src/docs/internal/guidelines/testing.mdprojects/site/src/docs/metrics/api-status.11ty.jsprojects/site/src/docs/metrics/bundle-explorer.11ty.jsprojects/site/src/docs/metrics/index.11ty.jsprojects/site/src/docs/metrics/metadata.11ty.jsprojects/site/src/docs/metrics/testing-and-performance.11ty.jsprojects/site/src/docs/metrics/wireit.11ty.jsprojects/site/src/docs/monaco/diff-editor.mdprojects/site/src/docs/monaco/editor.mdprojects/site/src/docs/patterns/editor.mdprojects/site/src/docs/patterns/index.mdprojects/site/src/docs/patterns/panel.mdprojects/site/src/docs/skills/index.mdprojects/site/src/examples/examples.11ty.jsprojects/site/src/examples/index.11ty.jsprojects/site/src/index.md
| "command": "vitest run src/_11ty/layouts/metadata.test.ts src/_11ty/layouts/links.test.ts src/_11ty/transforms/site-urls.test.ts src/_11ty/shortcodes/api.test.ts", | ||
| "files": [ | ||
| "src/docs/**/*.md", | ||
| "src/_11ty/layouts/common.js", | ||
| "src/_11ty/layouts/metadata.js", | ||
| "src/_11ty/layouts/metadata.test.ts", | ||
| "src/_11ty/shortcodes/api.js", | ||
| "src/_11ty/shortcodes/api.test.ts", | ||
| "src/**/*.js", | ||
| "src/**/*.md", | ||
| "src/**/*.ts", | ||
| "vitest.config.ts" | ||
| ], | ||
| "output": [] |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial | ⚖️ Poor tradeoff
Consider narrowing the test watch patterns to test files only.
The files array now watches all source files (src/**/*.js, src/**/*.md, src/**/*.ts) rather than just test files. This means tests will re-run whenever any source file changes, not just when test files change. While this ensures tests stay fresh, it may cause unnecessary test runs during development.
If tests should only re-run when test files change, consider:
"files": [
- "src/**/*.js",
- "src/**/*.md",
- "src/**/*.ts",
+ "src/**/*.test.ts",
+ "src/**/*.test.js",
"vitest.config.ts"
],Otherwise, if the current behavior is intentional (to ensure tests run on any source change), this is fine.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "command": "vitest run src/_11ty/layouts/metadata.test.ts src/_11ty/layouts/links.test.ts src/_11ty/transforms/site-urls.test.ts src/_11ty/shortcodes/api.test.ts", | |
| "files": [ | |
| "src/docs/**/*.md", | |
| "src/_11ty/layouts/common.js", | |
| "src/_11ty/layouts/metadata.js", | |
| "src/_11ty/layouts/metadata.test.ts", | |
| "src/_11ty/shortcodes/api.js", | |
| "src/_11ty/shortcodes/api.test.ts", | |
| "src/**/*.js", | |
| "src/**/*.md", | |
| "src/**/*.ts", | |
| "vitest.config.ts" | |
| ], | |
| "output": [] | |
| "command": "vitest run src/_11ty/layouts/metadata.test.ts src/_11ty/layouts/links.test.ts src/_11ty/transforms/site-urls.test.ts src/_11ty/shortcodes/api.test.ts", | |
| "files": [ | |
| "src/**/*.test.ts", | |
| "src/**/*.test.js", | |
| "vitest.config.ts" | |
| ], | |
| "output": [] |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@projects/site/package.json` around lines 204 - 211, The current package.json
test task watches all source files via the "files" array which causes tests
defined in the "command" (e.g., metadata.test.ts, links.test.ts,
site-urls.test.ts, api.test.ts) to re-run on any src change; update the "files"
array to only match test files (for example restrict to patterns like
src/**/*.{test,spec}.ts or src/**/*.test.ts and include matching .js/.md if you
have test variants) so that vitest only reruns when test files change, leaving
the "command" unchanged.
| const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:\.\/)?(?:docs|examples|starters)\//; | ||
| const BASE_PREFIXED_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()\/elements\/(?:docs|examples|starters)\//; | ||
| const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:\.\/)?(?:docs|examples|starters)\//; | ||
| const JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN = /\bhref:\s*['"]\/elements\/(?:docs|examples|starters)\//; |
There was a problem hiding this comment.
Expand invalid-link regexes to catch ../ relative paths.
Line 6 and Line 8 only reject ./... relative links. ../docs/..., ../examples/..., and ../starters/... are still relative and currently bypass this test.
Suggested patch
-const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:\.\/)?(?:docs|examples|starters)\//;
+const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//;
...
-const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:\.\/)?(?:docs|examples|starters)\//;
+const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//;As per coding guidelines, “**/*.test.ts: Follow unit testing patterns ... including ... patterns” and this test should fully enforce the intended invalid-link patterns.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:\.\/)?(?:docs|examples|starters)\//; | |
| const BASE_PREFIXED_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()\/elements\/(?:docs|examples|starters)\//; | |
| const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:\.\/)?(?:docs|examples|starters)\//; | |
| const JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN = /\bhref:\s*['"]\/elements\/(?:docs|examples|starters)\//; | |
| const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//; | |
| const BASE_PREFIXED_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()\/elements\/(?:docs|examples|starters)\//; | |
| const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//; | |
| const JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN = /\bhref:\s*['"]\/elements\/(?:docs|examples|starters)\//; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@projects/site/src/_11ty/layouts/links.test.ts` around lines 6 - 9, The four
regex constants RELATIVE_INTERNAL_LINK_PATTERN,
BASE_PREFIXED_INTERNAL_LINK_PATTERN, JS_RELATIVE_INTERNAL_LINK_PATTERN, and
JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN only account for "./" relative paths;
update each pattern to also match one or more "../" segments so "../docs/...",
"../examples/...", and "../starters/..." are caught too — modify the group that
currently matches (?:\.\/)? to allow sequences like (?:\.\.\/|\.\/)+ or a more
concise (?:\.\.\/)*\.\/? depending on desired strictness so both single and
multi-level parent traversals are rejected for both HTML and JS forms.
Source: Coding guidelines
da90867 to
1339f0f
Compare
There was a problem hiding this comment.
Actionable comments posted: 6
♻️ Duplicate comments (1)
projects/site/src/docs/metrics/testing-and-performance.11ty.js (1)
29-34:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDuplicate
selectedattribute remains unresolved from prior review.This issue was already flagged in a previous review comment on this file: two
<nve-tabs-item>elements (lines 29 and 31) are both markedselected. Only the current page's tab (line 31, "Testing & Performance") should have theselectedattribute. Remove theselectedattribute from line 29 (Metrics tab).The URL path updates from relative to absolute root-relative are correct and properly applied.
Proposed fix
- <nve-tabs-item selected><a href="/docs/metrics/">Metrics</a></nve-tabs-item> + <nve-tabs-item><a href="/docs/metrics/">Metrics</a></nve-tabs-item> <nve-tabs-item><a href="/docs/metrics/api-status/">API Status</a></nve-tabs-item> <nve-tabs-item selected><a href="/docs/metrics/testing-and-performance/">Testing & Performance</a></nve-tabs-item>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/docs/metrics/testing-and-performance.11ty.js` around lines 29 - 34, The first nve-tabs-item element with href="/docs/metrics/" has a duplicate selected attribute that should not be there. Remove the selected attribute from the first nve-tabs-item element (Metrics tab) so that only the third nve-tabs-item element with href="/docs/metrics/testing-and-performance/" (Testing & Performance tab) retains the selected attribute, ensuring only the current page's tab is marked as selected.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@projects/site/src/_11ty/layouts/common.js`:
- Around line 132-396: In the renderDocsNav function, there are two issues to
fix. First, remove the dead code pattern in the first nve-tree-node where the
expanded attribute checks include a redundant `/./` pattern that never occurs
naturally in URLs. The check `data.page.url.includes('/./') || data.page.url ===
'/'` should be simplified to just `data.page.url === '/'` since the OR condition
with the root path already handles all necessary cases. Second, fix the path
inconsistency in the final nve-tree-node for the Internal Examples section where
the URL checks use `'examples/'` without a leading slash, but the href attribute
uses `'/examples/'` with a leading slash. Update all the URL check patterns in
this section to use `'/examples/'` with a leading slash to be consistent with
how all other navigation sections check their paths (e.g.,
`includes('/docs/...')`).
In `@projects/site/src/_11ty/transforms/site-urls.test.ts`:
- Around line 94-121: The test cases for siteUrlsTransform in the test file
currently only cover module scripts with type="module" attributes, leaving
non-module script URL rewriting behavior untested. Add test assertions within
one or both of the existing test cases (the production output test and the local
preview test) that verify the expected behavior when a regular non-module script
tag with a src attribute is processed by siteUrlsTransform. Include an assertion
that confirms the URL transformation for a non-module script follows the same
transformation rules as the other assets being tested.
In `@projects/site/src/docs/about/support.md`:
- Line 31: The Lit button on line 31 has a closing `</a>` tag without a
corresponding opening `<a>` tag, breaking the link functionality. Add an opening
`<a>` tag with href="/docs/integrations/lit/" before the svg-logo template tag
in the Lit button element to properly pair with the existing closing `</a>` tag
and match the structure of the other framework buttons (TypeScript, Angular,
Vue, Preact) which all have properly formed anchor links.
In `@projects/site/src/docs/foundations/layout/index.md`:
- Around line 102-104: The anchor reference in the link pointing to
`/docs/api-design/styles/#internal-host` is incorrect because the actual heading
in the styles documentation is `## **_REMOVED_** Host`, not `## Internal Host`.
Update the anchor portion of this link to match the actual heading structure in
the styles documentation so it resolves correctly. Verify what the actual anchor
should be based on the current heading in that document and correct the
reference accordingly.
In `@projects/site/src/docs/foundations/popovers.md`:
- Line 15: Fix the hyphenation in two compound adjectives in the popovers.md
documentation. In the tooltip link description, change "contextual text only
hints" to "contextual text-only hints" by adding a hyphen between "text" and
"only". Additionally, in the notification-related text, change "async non
contextual notification" to "async non-contextual notification" by adding a
hyphen between "non" and "contextual". These hyphens are necessary because the
adjectives modify the nouns that follow them as compound modifiers.
In `@projects/site/src/docs/internal/guidelines/testing.md`:
- Line 44: All the markdown links in the test type list (lines 41-45) are using
incorrect paths pointing to `/docs/internal/testing/*/` which doesn't exist.
Update all five links to use the correct path structure
`/docs/internal/guidelines/testing-*/` instead. Specifically, ensure line 44
updates the Visual Regression Tests link from `/docs/internal/testing/ssr/` to
`/docs/internal/guidelines/testing-visual/`, and apply similar corrections to
the other test type links on lines 41, 42, 43, and 45 by replacing the
`/docs/internal/testing/` portion with `/docs/internal/guidelines/testing-` in
each link.
---
Duplicate comments:
In `@projects/site/src/docs/metrics/testing-and-performance.11ty.js`:
- Around line 29-34: The first nve-tabs-item element with href="/docs/metrics/"
has a duplicate selected attribute that should not be there. Remove the selected
attribute from the first nve-tabs-item element (Metrics tab) so that only the
third nve-tabs-item element with href="/docs/metrics/testing-and-performance/"
(Testing & Performance tab) retains the selected attribute, ensuring only the
current page's tab is marked as selected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 457a32c4-6b74-4aa0-9cd2-6c2b9f78ef7d
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (69)
projects/core/src/tabs/tabs.examples.tsprojects/site/eleventy.config.jsprojects/site/package.jsonprojects/site/src/_11ty/layouts/common.jsprojects/site/src/_11ty/layouts/docs.11ty.jsprojects/site/src/_11ty/layouts/links.test.tsprojects/site/src/_11ty/layouts/metadata.jsprojects/site/src/_11ty/layouts/page.11ty.jsprojects/site/src/_11ty/plugins/llms-txt.jsprojects/site/src/_11ty/plugins/sitemap-xml.jsprojects/site/src/_11ty/shortcodes/index.jsprojects/site/src/_11ty/templates/api.jsprojects/site/src/_11ty/transforms/anchor-generator.jsprojects/site/src/_11ty/transforms/site-urls.jsprojects/site/src/_11ty/transforms/site-urls.test.tsprojects/site/src/_11ty/utils/site-url.jsprojects/site/src/_internal/metrics-carousel/metrics-carousel.tsprojects/site/src/docs/about/contributions.mdprojects/site/src/docs/about/migration.mdprojects/site/src/docs/about/support.mdprojects/site/src/docs/api-design/logs.mdprojects/site/src/docs/api-design/packaging.mdprojects/site/src/docs/changelog/changelog.11ty.jsprojects/site/src/docs/changelog/index.11ty.jsprojects/site/src/docs/elements/dialog.mdprojects/site/src/docs/elements/drawer.mdprojects/site/src/docs/elements/dropdown.mdprojects/site/src/docs/elements/forms/index.mdprojects/site/src/docs/elements/icon.mdprojects/site/src/docs/elements/notification.mdprojects/site/src/docs/elements/page.mdprojects/site/src/docs/elements/toast.mdprojects/site/src/docs/elements/toggletip.mdprojects/site/src/docs/elements/tooltip.mdprojects/site/src/docs/foundations/iconography.mdprojects/site/src/docs/foundations/index.mdprojects/site/src/docs/foundations/layout/grid.mdprojects/site/src/docs/foundations/layout/horizontal.mdprojects/site/src/docs/foundations/layout/index.mdprojects/site/src/docs/foundations/layout/responsive/container.mdprojects/site/src/docs/foundations/layout/responsive/index.mdprojects/site/src/docs/foundations/layout/responsive/viewport.mdprojects/site/src/docs/foundations/layout/vertical.mdprojects/site/src/docs/foundations/popovers.mdprojects/site/src/docs/foundations/themes/index.11ty.jsprojects/site/src/docs/foundations/typography.mdprojects/site/src/docs/foundations/view-transitions.mdprojects/site/src/docs/integrations/angular.mdprojects/site/src/docs/integrations/index.11ty.jsprojects/site/src/docs/integrations/lit.mdprojects/site/src/docs/integrations/mcp-apps.mdprojects/site/src/docs/integrations/shortcodes.jsprojects/site/src/docs/internal/guidelines/component-creation.mdprojects/site/src/docs/internal/guidelines/testing.mdprojects/site/src/docs/metrics/api-status.11ty.jsprojects/site/src/docs/metrics/bundle-explorer.11ty.jsprojects/site/src/docs/metrics/index.11ty.jsprojects/site/src/docs/metrics/metadata.11ty.jsprojects/site/src/docs/metrics/testing-and-performance.11ty.jsprojects/site/src/docs/metrics/wireit.11ty.jsprojects/site/src/docs/monaco/diff-editor.mdprojects/site/src/docs/monaco/editor.mdprojects/site/src/docs/patterns/editor.mdprojects/site/src/docs/patterns/index.mdprojects/site/src/docs/patterns/panel.mdprojects/site/src/docs/skills/index.mdprojects/site/src/examples/examples.11ty.jsprojects/site/src/examples/index.11ty.jsprojects/site/src/index.md
| it('should preserve source module urls when building production output', async () => { | ||
| const { siteUrlsTransform } = await importTransform('build'); | ||
| const html = ` | ||
| <script type="module" src="https://nvidia.github.io/elements/404/index.ts"></script> | ||
| <img src="/static/images/integrations/angular.svg" alt="Angular logo"> | ||
| `; | ||
|
|
||
| const result = await siteUrlsTransform.call(createContext(), html, 'index.html'); | ||
|
|
||
| expect(result).toContain('src="/404/index.ts"'); | ||
| expect(result).toContain('src="https://nvidia.github.io/elements/static/images/integrations/angular.svg"'); | ||
| }); | ||
|
|
||
| it('should preserve source module urls when building for local preview', async () => { | ||
| const { siteUrlsTransform } = await importTransform('build', { | ||
| localPreview: true, | ||
| pagesBaseUrl: '/elements/preview/' | ||
| }); | ||
| const html = ` | ||
| <script type="module" src="https://nvidia.github.io/elements/preview/404/index.ts"></script> | ||
| <img src="/static/images/integrations/angular.svg" alt="Angular logo"> | ||
| `; | ||
|
|
||
| const result = await siteUrlsTransform.call(createContext(), html, 'index.html'); | ||
|
|
||
| expect(result).toContain('src="/404/index.ts"'); | ||
| expect(result).toContain('src="/elements/preview/static/images/integrations/angular.svg"'); | ||
| }); |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial | ⚡ Quick win
Add an explicit non-module <script src> case.
Current assertions cover module scripts only. Add one non-module script test to lock expected behavior around script URL rewriting.
Suggested test addition
it('should preserve source module urls when building for local preview', async () => {
@@
expect(result).toContain('src="/404/index.ts"');
expect(result).toContain('src="/elements/preview/static/images/integrations/angular.svg"');
});
+
+ it('should define behavior for non-module script src urls', async () => {
+ const { siteUrlsTransform } = await importTransform('build');
+ const html = '<script src="/docs/runtime.js"></script>';
+ const result = await siteUrlsTransform.call(createContext(), html, 'index.html');
+ expect(result).toContain('<script src="/docs/runtime.js"></script>');
+ });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@projects/site/src/_11ty/transforms/site-urls.test.ts` around lines 94 - 121,
The test cases for siteUrlsTransform in the test file currently only cover
module scripts with type="module" attributes, leaving non-module script URL
rewriting behavior untested. Add test assertions within one or both of the
existing test cases (the production output test and the local preview test) that
verify the expected behavior when a regular non-module script tag with a src
attribute is processed by siteUrlsTransform. Include an assertion that confirms
the URL transformation for a non-module script follows the same transformation
rules as the other assets being tested.
| - [toast](./docs/elements/toast/): contextual notification | ||
| - [notification](./docs/elements/notification/): async non contextual notification | ||
| - [drawer](./docs/elements/drawer/): interactive navigation or extra contextual content | ||
| - [tooltip](/docs/elements/tooltip/): contextual text only hints |
There was a problem hiding this comment.
Fix hyphenation in compound adjectives.
Two lines contain compound adjectives that should be hyphenated:
- Line 15: "contextual text only hints" → "contextual text-only hints"
- Line 20: "async non contextual notification" → "async non-contextual notification"
When adjectives modify nouns, they should be hyphenated for clarity.
Grammar fixes
- [tooltip](/docs/elements/tooltip/): contextual text only hints
+ [tooltip](/docs/elements/tooltip/): contextual text-only hints
- [notification](/docs/elements/notification/): async non contextual notification
+ [notification](/docs/elements/notification/): async non-contextual notificationAlso applies to: 20-20
🧰 Tools
🪛 LanguageTool
[grammar] ~15-~15: Use a hyphen to join words.
Context: ...docs/elements/tooltip/): contextual text only hints - [toggletip](/docs/elements/...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@projects/site/src/docs/foundations/popovers.md` at line 15, Fix the
hyphenation in two compound adjectives in the popovers.md documentation. In the
tooltip link description, change "contextual text only hints" to "contextual
text-only hints" by adding a hyphen between "text" and "only". Additionally, in
the notification-related text, change "async non contextual notification" to
"async non-contextual notification" by adding a hyphen between "non" and
"contextual". These hyphens are necessary because the adjectives modify the
nouns that follow them as compound modifiers.
Source: Linters/SAST tools
1339f0f to
b908544
Compare
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
projects/site/src/docs/metrics/bundle-explorer.11ty.js (1)
26-26: 🎯 Functional Correctness | 🟡 MinorNormalize iframe
srcto absolute path for consistency with navigation updates.The navigation anchors on lines 17–22 use absolute paths (
/docs/metrics/...), but the iframesrcon line 26 remains relative (docs/metrics/bundle-explorer-report/). Given the PR's path normalization strategy, update the iframe path to/docs/metrics/bundle-explorer-report/for consistency.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/docs/metrics/bundle-explorer.11ty.js` at line 26, The iframe element with id="bundle" uses a relative path in its src attribute ("docs/metrics/bundle-explorer-report/") while the navigation anchors use absolute paths ("/docs/metrics/..."). Update the iframe's src attribute to use the absolute path "/docs/metrics/bundle-explorer-report/" instead of the relative path to maintain consistency with the navigation path normalization strategy used in the rest of the file.
♻️ Duplicate comments (5)
projects/site/src/_11ty/layouts/common.js (1)
138-138: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRemove dead root matcher and normalize examples path checks.
Line 138 has dead logic (
includes('/./')) and Lines 396-398 useexamples/predicates without a leading slash, which can miss matching/examples/for nav expanded/selected state.Suggested patch
- <nve-tree-node ${data.page.url.includes('/./') || data.page.url === '/' ? 'highlighted selected' : ''}><a href="/">Getting Started</a></nve-tree-node> + <nve-tree-node ${data.page.url === '/' ? 'highlighted selected' : ''}><a href="/">Getting Started</a></nve-tree-node> ... - <nve-tree-node ${data.page.url.includes('examples/') ? 'expanded' : ''} ${data.page.url === 'examples/' ? 'highlighted' : ''}> + <nve-tree-node ${data.page.url.includes('/examples/') ? 'expanded' : ''} ${data.page.url === '/examples/' ? 'highlighted' : ''}> <a href="/examples/">Internal Examples</a> - <nve-tree-node ${data.page.url.includes('examples/') ? 'highlighted selected' : ''}><a href="/examples/">All Examples</a></nve-tree-node> + <nve-tree-node ${data.page.url.includes('/examples/') ? 'highlighted selected' : ''}><a href="/examples/">All Examples</a></nve-tree-node> </nve-tree-node>Also applies to: 396-398
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/_11ty/layouts/common.js` at line 138, Remove the dead logic `includes('/./')` from the nve-tree-node condition on line 138 in the common.js file, as this pattern will never match valid URLs. Additionally, update the path predicates at lines 396-398 to include leading slashes when checking for `examples/` paths, changing them from `examples/` to `/examples/` to ensure the navigation expanded and selected states are properly matched for paths under the examples directory.projects/site/src/_11ty/layouts/links.test.ts (1)
6-9: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winExpand relative-link regexes to also reject
../paths.Line 6 and Line 8 currently catch only
./-style links, so../docs/...and similar paths bypass this test.Suggested patch
-const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:\.\/)?(?:docs|examples|starters)\//; +const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//; ... -const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:\.\/)?(?:docs|examples|starters)\//; +const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//;As per coding guidelines, "
**/*.test.ts: Follow unit testing patterns ... including ... patterns" and this guard should fully enforce invalid internal-link patterns.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/_11ty/layouts/links.test.ts` around lines 6 - 9, The regex patterns RELATIVE_INTERNAL_LINK_PATTERN and JS_RELATIVE_INTERNAL_LINK_PATTERN currently only match optional `./` paths using `(?:\.\/)?` but fail to catch parent directory `../` paths. Update both patterns to expand the relative path matching group to include both `./` and `../` patterns, ensuring all relative path variants that bypass the internal link validation are properly rejected.Source: Coding guidelines
projects/site/src/docs/about/support.md (1)
31-31: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win** Unresolved: Missing opening
<a>tag on Lit button.**This issue was flagged in a prior review but remains unfixed. Line 31 has a closing
</a>tag without a corresponding opening<a href="...">tag, which breaks HTML structure and removes link functionality. All other framework buttons (TypeScript, Angular, Vue, Preact, NextJS, React, SolidJS, JavaScript) have properly paired anchor tags.Add the opening anchor tag with href to
/docs/integrations/lit/to match the other framework button patterns.🔧 Proposed fix
<nve-button> - {% svg-logo 'lit' '20' %} Lit</a> + <a href="/docs/integrations/lit/">{% svg-logo 'lit' '20' %} Lit</a> </nve-button>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/docs/about/support.md` at line 31, The Lit button on line 31 of the support.md file is missing its opening anchor tag. Add an opening `<a>` tag with the href attribute pointing to `/docs/integrations/lit/` before the SVG logo element (before the svg-logo 'lit' reference) to properly pair with the existing closing `</a>` tag, matching the structure of the other framework buttons like TypeScript, Angular, Vue, Preact, NextJS, React, SolidJS, and JavaScript.projects/site/src/docs/foundations/layout/index.md (1)
102-104: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winVerify or fix the broken anchor reference from the prior review.
This comment duplicates a finding from a previous review: the link
/docs/api-design/styles/#internal-hostis broken because the styles documentation does not define an#internal-hostanchor. The actual heading in that document uses a different format.The PR converted the link to root-relative form (which is correct), but the underlying anchor reference issue was not resolved. Either correct the anchor to match the actual heading in the styles documentation, or change the link destination to reference a page that documents the internal-host pattern correctly.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/docs/foundations/layout/index.md` around lines 102 - 104, The anchor reference in the link `/docs/api-design/styles/#internal-host` is broken because the styles documentation does not contain a matching anchor with that exact name. Locate the correct anchor name for the internal-host pattern in the styles documentation file by checking the actual heading format used there, and update the link in the layout documentation to match the correct anchor. Alternatively, if the internal-host pattern is not documented in the styles file, identify the correct page that documents this pattern and update the link destination accordingly.projects/site/src/_11ty/transforms/site-urls.test.ts (1)
94-121: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd test coverage for non-module script
srcattributes.The current test cases only verify module script behavior (
type="module"). Consider adding a test case for regular<script src>tags without thetype="module"attribute to confirm they follow the standard URL transformation rules.Suggested test addition
it('should preserve source module urls when building for local preview', async () => { // ... existing test }); + + it('should transform non-module script src urls consistently', async () => { + const { siteUrlsTransform } = await importTransform('build'); + const html = '<script src="/docs/runtime.js"></script>'; + const result = await siteUrlsTransform.call(createContext(), html, 'index.html'); + expect(result).toContain('<script src="https://nvidia.github.io/elements/docs/runtime.js"></script>'); + });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/_11ty/transforms/site-urls.test.ts` around lines 94 - 121, The test cases for siteUrlsTransform only verify module script behavior with type="module" attributes but lack coverage for regular script tags without the module type. Add new test cases that include regular <script src> tags (without type="module") in the HTML input for both the production build test and the local preview test, and verify that these regular script src attributes are transformed correctly according to the standard URL transformation rules, similar to how img src attributes are currently being tested.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@projects/core/src/tabs/tabs.examples.ts`:
- Around line 148-154: The `@summary` documentation for this tabs example in
projects/core/src/tabs/tabs.examples.ts is inaccurate—it claims to demonstrate
routing-based tab switching and page navigation, but the code only uses
hash-only anchors (href="`#links`") which enable same-page fragment scrolling, not
routing or page navigation. Update the `@summary` tag that precedes this example
to correctly state "Tabs with hash-only anchor links for same-page navigation
and fragment scrolling within a single page" to accurately reflect the actual
functionality and prevent users from misapplying this pattern.
In `@projects/site/eleventy.config.js`:
- Around line 227-236: The `.filter(page => page.data.tag)` condition in the
componentDocs collection is filtering out all component documentation pages
since none of the files in the src/docs directories have a tag property in their
frontmatter, resulting in an empty collection that breaks API documentation
generation. Either remove the entire .filter(page => page.data.tag) filter from
the chain after getFilteredByGlob to restore all documentation files to the
collection, or systematically add a tag property to the frontmatter of all
component documentation files across the src/docs/elements/, src/docs/code/,
src/docs/monaco/, and src/docs/markdown/ directories.
In `@projects/site/src/_11ty/plugins/llms-txt.js`:
- Around line 52-69: In the createLlmsTxtContent function, the MCP entry on the
line containing [MCP] is incorrectly pointing to the CLI documentation path
instead of a dedicated MCP context file. Fix this by changing the link target
from `${base}/context/cli.md` to `${base}/context/mcp.md` to ensure the MCP
entry links to its own documentation. Alternatively, if a separate MCP
documentation file does not exist or is not planned, remove the separate MCP
entry line entirely and integrate MCP information as part of the CLI entry
description instead.
In `@projects/site/src/_11ty/transforms/site-urls.js`:
- Line 48: The URL.canParse method used in the site-urls.js file requires
Node.js 19.0.0+ but this minimum version requirement is not enforced in the
project. Either add an engines field to package.json specifying node version
19.0.0 or higher, or implement a fallback/polyfill that checks the Node.js
version and provides an alternative method to validate URLs for versions below
19.0.0 when calling URL.canParse.
In `@projects/site/src/docs/elements/index.11ty.js`:
- Around line 29-30: The docsByTag Map is overwriting multiple components that
share the same tag, keeping only the last one and making href/title selection
order-dependent. Instead of mapping each tag to a single component, modify the
Map creation to store an array of components for each tag. For each component in
the filter/map operation, check if the tag already exists in the docsByTag Map -
if it does, push the component to the existing array; if not, create a new array
with the component. Then update all references to docsByTag throughout the file
(including the logic around lines 34-43) to iterate over the component arrays
instead of expecting a single component per tag.
- Line 71: The createComponentCatalog function call on line 71 accesses
data.collections.componentDocs without validating that it exists or is defined.
Add a defensive check by using the nullish coalescing operator to provide an
empty array as a safe default fallback, ensuring the code is robust even if the
componentDocs collection is undefined or missing. Update the call to
createComponentCatalog to pass data.collections.componentDocs with the null
coalescing operator and an empty array as the fallback value.
In `@projects/site/src/docs/internal/guidelines/testing.md`:
- Around line 41-45: The Visual Regression Tests entry in the testing guidelines
list has an incorrect link destination. Locate the line that defines Visual
Regression Tests (`.test.visual.ts`) and change its link from
`/docs/internal/testing/ssr/` to `/docs/internal/testing/visual/` to correctly
point to the visual testing documentation. This will prevent the duplication
where both Visual Regression Tests and SSR Tests link to the same
`/docs/internal/testing/ssr/` path.
---
Outside diff comments:
In `@projects/site/src/docs/metrics/bundle-explorer.11ty.js`:
- Line 26: The iframe element with id="bundle" uses a relative path in its src
attribute ("docs/metrics/bundle-explorer-report/") while the navigation anchors
use absolute paths ("/docs/metrics/..."). Update the iframe's src attribute to
use the absolute path "/docs/metrics/bundle-explorer-report/" instead of the
relative path to maintain consistency with the navigation path normalization
strategy used in the rest of the file.
---
Duplicate comments:
In `@projects/site/src/_11ty/layouts/common.js`:
- Line 138: Remove the dead logic `includes('/./')` from the nve-tree-node
condition on line 138 in the common.js file, as this pattern will never match
valid URLs. Additionally, update the path predicates at lines 396-398 to include
leading slashes when checking for `examples/` paths, changing them from
`examples/` to `/examples/` to ensure the navigation expanded and selected
states are properly matched for paths under the examples directory.
In `@projects/site/src/_11ty/layouts/links.test.ts`:
- Around line 6-9: The regex patterns RELATIVE_INTERNAL_LINK_PATTERN and
JS_RELATIVE_INTERNAL_LINK_PATTERN currently only match optional `./` paths using
`(?:\.\/)?` but fail to catch parent directory `../` paths. Update both patterns
to expand the relative path matching group to include both `./` and `../`
patterns, ensuring all relative path variants that bypass the internal link
validation are properly rejected.
In `@projects/site/src/_11ty/transforms/site-urls.test.ts`:
- Around line 94-121: The test cases for siteUrlsTransform only verify module
script behavior with type="module" attributes but lack coverage for regular
script tags without the module type. Add new test cases that include regular
<script src> tags (without type="module") in the HTML input for both the
production build test and the local preview test, and verify that these regular
script src attributes are transformed correctly according to the standard URL
transformation rules, similar to how img src attributes are currently being
tested.
In `@projects/site/src/docs/about/support.md`:
- Line 31: The Lit button on line 31 of the support.md file is missing its
opening anchor tag. Add an opening `<a>` tag with the href attribute pointing to
`/docs/integrations/lit/` before the SVG logo element (before the svg-logo 'lit'
reference) to properly pair with the existing closing `</a>` tag, matching the
structure of the other framework buttons like TypeScript, Angular, Vue, Preact,
NextJS, React, SolidJS, and JavaScript.
In `@projects/site/src/docs/foundations/layout/index.md`:
- Around line 102-104: The anchor reference in the link
`/docs/api-design/styles/#internal-host` is broken because the styles
documentation does not contain a matching anchor with that exact name. Locate
the correct anchor name for the internal-host pattern in the styles
documentation file by checking the actual heading format used there, and update
the link in the layout documentation to match the correct anchor. Alternatively,
if the internal-host pattern is not documented in the styles file, identify the
correct page that documents this pattern and update the link destination
accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: bbb8e293-c137-4ddb-8b60-4a955b07f613
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (76)
pnpm-workspace.yamlprojects/core/src/tabs/tabs.examples.tsprojects/site/eleventy.config.jsprojects/site/package.jsonprojects/site/src/_11ty/layouts/common.jsprojects/site/src/_11ty/layouts/docs.11ty.jsprojects/site/src/_11ty/layouts/links.test.tsprojects/site/src/_11ty/layouts/metadata.jsprojects/site/src/_11ty/layouts/metadata.test.tsprojects/site/src/_11ty/layouts/page.11ty.jsprojects/site/src/_11ty/plugins/llms-txt.jsprojects/site/src/_11ty/plugins/llms-txt.test.tsprojects/site/src/_11ty/plugins/sitemap-xml.jsprojects/site/src/_11ty/plugins/sitemap-xml.test.tsprojects/site/src/_11ty/shortcodes/index.jsprojects/site/src/_11ty/templates/api.jsprojects/site/src/_11ty/transforms/anchor-generator.jsprojects/site/src/_11ty/transforms/site-urls.jsprojects/site/src/_11ty/transforms/site-urls.test.tsprojects/site/src/_11ty/utils/site-url.jsprojects/site/src/_internal/metrics-carousel/metrics-carousel.tsprojects/site/src/docs/about/contributions.mdprojects/site/src/docs/about/migration.mdprojects/site/src/docs/about/support.mdprojects/site/src/docs/api-design/logs.mdprojects/site/src/docs/api-design/packaging.mdprojects/site/src/docs/changelog/changelog.11ty.jsprojects/site/src/docs/changelog/index.11ty.jsprojects/site/src/docs/elements/dialog.mdprojects/site/src/docs/elements/drawer.mdprojects/site/src/docs/elements/dropdown.mdprojects/site/src/docs/elements/forms/index.mdprojects/site/src/docs/elements/icon.mdprojects/site/src/docs/elements/index.11ty.jsprojects/site/src/docs/elements/notification.mdprojects/site/src/docs/elements/page.mdprojects/site/src/docs/elements/toast.mdprojects/site/src/docs/elements/toggletip.mdprojects/site/src/docs/elements/tooltip.mdprojects/site/src/docs/foundations/iconography.mdprojects/site/src/docs/foundations/index.mdprojects/site/src/docs/foundations/layout/grid.mdprojects/site/src/docs/foundations/layout/horizontal.mdprojects/site/src/docs/foundations/layout/index.mdprojects/site/src/docs/foundations/layout/responsive/container.mdprojects/site/src/docs/foundations/layout/responsive/index.mdprojects/site/src/docs/foundations/layout/responsive/viewport.mdprojects/site/src/docs/foundations/layout/vertical.mdprojects/site/src/docs/foundations/popovers.mdprojects/site/src/docs/foundations/themes/index.11ty.jsprojects/site/src/docs/foundations/typography.mdprojects/site/src/docs/foundations/view-transitions.mdprojects/site/src/docs/integrations/angular.mdprojects/site/src/docs/integrations/index.11ty.jsprojects/site/src/docs/integrations/lit.mdprojects/site/src/docs/integrations/mcp-apps.mdprojects/site/src/docs/integrations/shortcodes.jsprojects/site/src/docs/internal/guidelines/agent-harness.mdprojects/site/src/docs/internal/guidelines/agent-ownership.mdprojects/site/src/docs/internal/guidelines/component-creation.mdprojects/site/src/docs/internal/guidelines/testing.mdprojects/site/src/docs/metrics/api-status.11ty.jsprojects/site/src/docs/metrics/bundle-explorer.11ty.jsprojects/site/src/docs/metrics/index.11ty.jsprojects/site/src/docs/metrics/metadata.11ty.jsprojects/site/src/docs/metrics/testing-and-performance.11ty.jsprojects/site/src/docs/metrics/wireit.11ty.jsprojects/site/src/docs/monaco/diff-editor.mdprojects/site/src/docs/monaco/editor.mdprojects/site/src/docs/patterns/editor.mdprojects/site/src/docs/patterns/index.mdprojects/site/src/docs/patterns/panel.mdprojects/site/src/docs/skills/index.mdprojects/site/src/examples/examples.11ty.jsprojects/site/src/examples/index.11ty.jsprojects/site/src/index.md
| return collection | ||
| .getFilteredByGlob([ | ||
| 'src/docs/elements/*.md', | ||
| 'src/docs/elements/data-grid/index.md', | ||
| 'src/docs/code/*.md', | ||
| 'src/docs/monaco/*.md', | ||
| 'src/docs/media/*.md', | ||
| 'src/docs/markdown/index.md' | ||
| ]) | ||
| .filter(page => page.data.tag); |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🔴 Critical
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Find component docs pages that might be missing the tag property
# Find all files matching the componentDocs glob patterns
fd -e md . projects/site/src/docs/elements projects/site/src/docs/data-grid projects/site/src/docs/code projects/site/src/docs/monaco projects/site/src/docs/media projects/site/src/docs/markdown -x sh -c '
# Extract frontmatter and check for tag property
file="$1"
if ! grep -q "^tag:" "$file"; then
echo "Missing tag: $file"
fi
' _ {}Repository: NVIDIA/elements
Length of output: 6414
🏁 Script executed:
# First, let's look at the eleventy.config.js file around the componentDocs collection
cat -n projects/site/eleventy.config.js | sed -n '220,245p'Repository: NVIDIA/elements
Length of output: 1460
🏁 Script executed:
# Check how many markdown files have tags vs don't have tags
echo "=== Files WITH tag property ==="
find projects/site/src/docs -name "*.md" -exec grep -l "^tag:" {} \; | wc -l
echo ""
echo "=== Files WITHOUT tag property ==="
find projects/site/src/docs -name "*.md" ! -exec grep -q "^tag:" {} \; -print | wc -l
echo ""
echo "=== Sample of files WITH tags ==="
find projects/site/src/docs -name "*.md" -exec grep -l "^tag:" {} \; | head -10Repository: NVIDIA/elements
Length of output: 262
🏁 Script executed:
# Let's check the git history for this change to understand the intent
cd projects/site && git log --oneline -n 30 -- eleventy.config.js 2>/dev/null || echo "Git history unavailable"Repository: NVIDIA/elements
Length of output: 1654
Remove the .filter(page => page.data.tag) filter or add tag properties to all component documentation files.
The filter on line 236 excludes all component documentation pages from the componentDocs collection. Currently, 0 out of 200 component documentation files have a tag property in their frontmatter, resulting in an empty collection. This breaks the API documentation generation that depends on this collection (as noted in the comment on line 223).
Either remove the filter to restore the original behavior, or systematically add the tag property to all component documentation files across src/docs/elements/, src/docs/code/, src/docs/monaco/, and src/docs/markdown/.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@projects/site/eleventy.config.js` around lines 227 - 236, The `.filter(page
=> page.data.tag)` condition in the componentDocs collection is filtering out
all component documentation pages since none of the files in the src/docs
directories have a tag property in their frontmatter, resulting in an empty
collection that breaks API documentation generation. Either remove the entire
.filter(page => page.data.tag) filter from the chain after getFilteredByGlob to
restore all documentation files to the collection, or systematically add a tag
property to the frontmatter of all component documentation files across the
src/docs/elements/, src/docs/code/, src/docs/monaco/, and src/docs/markdown/
directories.
| const docsByTag = new Map(componentDocs.filter(hasComponentTag).map(component => [component.data.tag, component])); | ||
|
|
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
docsByTag collapses multi-page docs and can point cards to the wrong page.
Using Map(component.data.tag -> component) keeps only one doc per tag. Since docs pages can share the same tag (overview/API/examples), the selected href/title becomes order-dependent and may resolve to /api/ or /examples/ instead of the component overview.
Suggested fix
const createComponentCatalog = componentDocs => {
- const docsByTag = new Map(componentDocs.filter(hasComponentTag).map(component => [component.data.tag, component]));
+ const docsByTag = componentDocs
+ .filter(hasComponentTag)
+ .reduce((map, component) => {
+ const tag = component.data.tag;
+ const existing = map.get(tag);
+ const isOverview = !/\/(api|examples)\/?$/.test(component.url ?? '');
+ const shouldReplace =
+ !existing ||
+ (isOverview && /\/(api|examples)\/?$/.test(existing.url ?? ''));
+
+ if (shouldReplace) map.set(tag, component);
+ return map;
+ }, new Map());Also applies to: 34-43
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@projects/site/src/docs/elements/index.11ty.js` around lines 29 - 30, The
docsByTag Map is overwriting multiple components that share the same tag,
keeping only the last one and making href/title selection order-dependent.
Instead of mapping each tag to a single component, modify the Map creation to
store an array of components for each tag. For each component in the filter/map
operation, check if the tag already exists in the docsByTag Map - if it does,
push the component to the existing array; if not, create a new array with the
component. Then update all references to docsByTag throughout the file
(including the logic around lines 34-43) to iterate over the component arrays
instead of expecting a single component per tag.
| </a>`; | ||
|
|
||
| export function render(data) { | ||
| const components = createComponentCatalog(data.collections.componentDocs); |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Locate where componentDocs collection is defined/registered and where this page is invoked.
fd -i 'eleventy.config.js|*.11tydata.js|*.11ty.js|*collections*' projects/site | sed -n '1,200p'
# Show collection registrations and references with context
rg -n -C3 'addCollection\(|componentDocs|collections\.' projects/site
# Inspect this file in context
nl -ba projects/site/src/docs/elements/index.11ty.js | sed -n '1,140p'Repository: NVIDIA/elements
Length of output: 3494
🏁 Script executed:
# Read the full collection registration in eleventy.config.js
cat -n projects/site/eleventy.config.js | sed -n '220,250p'Repository: NVIDIA/elements
Length of output: 1680
🏁 Script executed:
# Read the full render function and surrounding context in index.11ty.js
cat -n projects/site/src/docs/elements/index.11ty.js | sed -n '1,100p'Repository: NVIDIA/elements
Length of output: 4013
🏁 Script executed:
# Check if there's a data export or pagination config in index.11ty.js
rg -n 'export const data|export default' projects/site/src/docs/elements/index.11ty.jsRepository: NVIDIA/elements
Length of output: 177
Add defensive check for missing componentDocs collection.
The componentDocs collection is registered unconditionally in eleventy.config.js (line 225), but the code at line 71 accesses data.collections.componentDocs without validation. While the collection should exist during normal builds, the code should still include a safe default for robustness: use data.collections.componentDocs ?? [] to guard against the case where the collection is undefined or empty.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@projects/site/src/docs/elements/index.11ty.js` at line 71, The
createComponentCatalog function call on line 71 accesses
data.collections.componentDocs without validating that it exists or is defined.
Add a defensive check by using the nullish coalescing operator to provide an
empty array as a safe default fallback, ensuring the code is robust even if the
componentDocs collection is undefined or missing. Update the call to
createComponentCatalog to pass data.collections.componentDocs with the null
coalescing operator and an empty array as the fallback value.
b908544 to
4246c8c
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@projects/site/src/_11ty/layouts/page.11ty.js`:
- Line 25: The nve-button element with the "Starters" link in page.11ty.js has
an href of /starters/ which causes an unnecessary redirect to
/docs/integrations/. Change the href attribute from /starters/ to
/docs/integrations/ to match the consistent navigation target used in common.js
and eliminate the redirect overhead.
In `@projects/site/src/_11ty/transforms/site-urls.js`:
- Around line 27-29: The isSameSiteUrl function currently checks only the origin
of a URL, which is too broad and can incorrectly identify URLs from other
projects on shared origins as internal links. Modify the isSameSiteUrl function
to also validate that the URL pathname is within the same project path, not just
that the origin matches ELEMENTS_SITE_ORIGIN or DEPLOYED_SITE_ORIGIN. This will
prevent the link rewriting logic at lines 53 and 65 from incorrectly rewriting
links to other projects that share the same origin.
In `@projects/site/src/docs/elements/index.11ty.js`:
- Around line 15-17: The isLibraryComponentDoc function filter at line 16 is
incomplete and only checks for two paths in the array passed to some(), but the
componentDocs collection includes additional valid paths. Add the missing
'/docs/code/' and '/docs/media/' paths to the array of paths being checked by
the some() method in isLibraryComponentDoc to ensure all component documentation
routes are properly included in the catalog output.
In `@projects/site/src/docs/foundations/layout/responsive/container.md`:
- Line 42: The anchor fragment references in the container.md file are using
incorrect paths that don't match the actual anchor definitions in grid.md.
Update the three anchor links (at the specified line numbers) by removing the
"layout-" prefix from the fragment identifiers: change `#layout-gap-spacing` to
`#gap-spacing` and change `#layout-padding` to `#padding` so that the links correctly
target the actual anchor sections defined in the grid.md documentation file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 86485038-bef7-49b8-9f1f-c8f5aae75082
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (76)
pnpm-workspace.yamlprojects/core/src/tabs/tabs.examples.tsprojects/site/eleventy.config.jsprojects/site/package.jsonprojects/site/src/_11ty/layouts/common.jsprojects/site/src/_11ty/layouts/docs.11ty.jsprojects/site/src/_11ty/layouts/links.test.tsprojects/site/src/_11ty/layouts/metadata.jsprojects/site/src/_11ty/layouts/metadata.test.tsprojects/site/src/_11ty/layouts/page.11ty.jsprojects/site/src/_11ty/plugins/llms-txt.jsprojects/site/src/_11ty/plugins/llms-txt.test.tsprojects/site/src/_11ty/plugins/sitemap-xml.jsprojects/site/src/_11ty/plugins/sitemap-xml.test.tsprojects/site/src/_11ty/shortcodes/index.jsprojects/site/src/_11ty/templates/api.jsprojects/site/src/_11ty/transforms/anchor-generator.jsprojects/site/src/_11ty/transforms/site-urls.jsprojects/site/src/_11ty/transforms/site-urls.test.tsprojects/site/src/_11ty/utils/site-url.jsprojects/site/src/_internal/metrics-carousel/metrics-carousel.tsprojects/site/src/docs/about/contributions.mdprojects/site/src/docs/about/migration.mdprojects/site/src/docs/about/support.mdprojects/site/src/docs/api-design/logs.mdprojects/site/src/docs/api-design/packaging.mdprojects/site/src/docs/changelog/changelog.11ty.jsprojects/site/src/docs/changelog/index.11ty.jsprojects/site/src/docs/elements/dialog.mdprojects/site/src/docs/elements/drawer.mdprojects/site/src/docs/elements/dropdown.mdprojects/site/src/docs/elements/forms/index.mdprojects/site/src/docs/elements/icon.mdprojects/site/src/docs/elements/index.11ty.jsprojects/site/src/docs/elements/notification.mdprojects/site/src/docs/elements/page.mdprojects/site/src/docs/elements/toast.mdprojects/site/src/docs/elements/toggletip.mdprojects/site/src/docs/elements/tooltip.mdprojects/site/src/docs/foundations/iconography.mdprojects/site/src/docs/foundations/index.mdprojects/site/src/docs/foundations/layout/grid.mdprojects/site/src/docs/foundations/layout/horizontal.mdprojects/site/src/docs/foundations/layout/index.mdprojects/site/src/docs/foundations/layout/responsive/container.mdprojects/site/src/docs/foundations/layout/responsive/index.mdprojects/site/src/docs/foundations/layout/responsive/viewport.mdprojects/site/src/docs/foundations/layout/vertical.mdprojects/site/src/docs/foundations/popovers.mdprojects/site/src/docs/foundations/themes/index.11ty.jsprojects/site/src/docs/foundations/typography.mdprojects/site/src/docs/foundations/view-transitions.mdprojects/site/src/docs/integrations/angular.mdprojects/site/src/docs/integrations/index.11ty.jsprojects/site/src/docs/integrations/lit.mdprojects/site/src/docs/integrations/mcp-apps.mdprojects/site/src/docs/integrations/shortcodes.jsprojects/site/src/docs/internal/guidelines/agent-harness.mdprojects/site/src/docs/internal/guidelines/agent-ownership.mdprojects/site/src/docs/internal/guidelines/component-creation.mdprojects/site/src/docs/internal/guidelines/testing.mdprojects/site/src/docs/metrics/api-status.11ty.jsprojects/site/src/docs/metrics/bundle-explorer.11ty.jsprojects/site/src/docs/metrics/index.11ty.jsprojects/site/src/docs/metrics/metadata.11ty.jsprojects/site/src/docs/metrics/testing-and-performance.11ty.jsprojects/site/src/docs/metrics/wireit.11ty.jsprojects/site/src/docs/monaco/diff-editor.mdprojects/site/src/docs/monaco/editor.mdprojects/site/src/docs/patterns/editor.mdprojects/site/src/docs/patterns/index.mdprojects/site/src/docs/patterns/panel.mdprojects/site/src/docs/skills/index.mdprojects/site/src/examples/examples.11ty.jsprojects/site/src/examples/index.11ty.jsprojects/site/src/index.md
💤 Files with no reviewable changes (1)
- pnpm-workspace.yaml
4246c8c to
08d113d
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (3)
projects/site/src/_11ty/layouts/page.11ty.js (1)
25-25: 🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick winAlign the
Starterstarget with the docs layout to avoid redirect hops.Line 25 still points to
/starters/, while the shared docs header now points to/docs/integrations/. This keeps an unnecessary redirect in one layout and makes nav behavior inconsistent.Suggested fix
- <nve-button container="flat"><a href="/starters/">Starters</a></nve-button> + <nve-button container="flat"><a href="/docs/integrations/">Starters</a></nve-button>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/_11ty/layouts/page.11ty.js` at line 25, The nve-button element containing the "Starters" link currently points to "/starters/" which creates an unnecessary redirect. Update the href attribute on this nve-button from "/starters/" to "/docs/integrations/" to align with the navigation target used in the shared docs header, ensuring consistent navigation behavior across layouts and eliminating the redirect hop.projects/site/src/docs/elements/index.11ty.js (1)
29-30: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
docsByTagis order-dependent and can link cards to non-overview docs.Line 29 collapses multiple pages with the same
taginto a single entry, so whichever page is last wins (including/api/or/examples/). That can produce incorrect catalog cardhref/title.Suggested fix
- const docsByTag = new Map(componentDocs.filter(hasComponentTag).map(component => [component.data.tag, component])); + const docsByTag = componentDocs + .filter(hasComponentTag) + .reduce((map, component) => { + const tag = component.data.tag; + const existing = map.get(tag); + const isOverview = !/\/(api|examples)\/?$/.test(component.url ?? ''); + const existingIsOverview = existing ? !/\/(api|examples)\/?$/.test(existing.url ?? '') : false; + + if (!existing || (isOverview && !existingIsOverview)) { + map.set(tag, component); + } + + return map; + }, new Map());Also applies to: 34-47
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/docs/elements/index.11ty.js` around lines 29 - 30, The docsByTag Map on line 29 overwrites entries when multiple components share the same tag, causing the wrong document (such as API or examples pages) to be used for catalog card links instead of overview docs. Modify the Map creation logic to check if a tag already exists before adding it, and ensure that overview documentation takes priority over API or examples pages. When filtering components and creating the Map, add logic to skip adding a component to the Map if its tag is already present, or implement a prioritization check to keep overview docs and discard non-overview pages with the same tag. Apply the same fix to the similar code referenced in lines 34-47.projects/site/src/_11ty/layouts/links.test.ts (1)
6-9: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winExpand invalid-link patterns to catch
../relative paths too.Lines 6 and 8 only reject
./...(or baredocs/...) forms.../docs/...,../examples/..., and../starters/...currently bypass this test.As per coding guidelines, "`**/*.test.ts`: Follow unit testing patterns from `/projects/site/src/docs/internal/guidelines/testing-unit.md` including createFixture and elementIsStable patterns."Suggested fix
-const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:\.\/)?(?:docs|examples|starters)\//; +const RELATIVE_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()(?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//; const BASE_PREFIXED_INTERNAL_LINK_PATTERN = /(?:href=["']|]\()\/elements\/(?:docs|examples|starters)\//; -const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:\.\/)?(?:docs|examples|starters)\//; +const JS_RELATIVE_INTERNAL_LINK_PATTERN = /\bhref:\s*['"](?:(?:\.\.\/)+|\.\/)?(?:docs|examples|starters)\//; const JS_BASE_PREFIXED_INTERNAL_LINK_PATTERN = /\bhref:\s*['"]\/elements\/(?:docs|examples|starters)\//;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@projects/site/src/_11ty/layouts/links.test.ts` around lines 6 - 9, The regex patterns RELATIVE_INTERNAL_LINK_PATTERN on line 6 and JS_RELATIVE_INTERNAL_LINK_PATTERN on line 8 currently only match optional `./` prefixes using the pattern `(?:\.\/)?`, which allows `../` relative paths to bypass the test. Modify both patterns to also catch `../` paths by updating the prefix matching group from `(?:\.\/)?` to `(?:\.\.?\/)?`, which will match either `.` or `..` followed by a forward slash, ensuring that paths like `../docs/...`, `../examples/...`, and `../starters/...` are properly caught.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@projects/core/src/tabs/tabs.examples.ts`:
- Around line 148-154: The `@summary` description for the tabs example in the
examples file incorrectly states "routing-based tab switching and page
navigation" when the actual example code demonstrates hash-only anchor links for
same-page fragment navigation. Locate the `@summary` comment associated with this
example block that contains the nve-tabs-item elements with href="`#links`"
anchors and update the description to "Tabs with hash-only anchor links for
same-page navigation and fragment scrolling" to accurately reflect the
demonstrated behavior.
In `@projects/site/src/docs/metrics/bundle-explorer.11ty.js`:
- Around line 17-22: The tab navigation hrefs have been correctly updated to use
root-relative paths, but the iframe src attribute on line 26 remains as a
relative path (docs/metrics/bundle-explorer-report/) instead of a root-relative
path. Update the iframe src attribute to match the consistency of the navigation
links by converting it to a root-relative path format that starts with a forward
slash, similar to how the href attributes in the nve-tabs-item elements are
structured.
---
Duplicate comments:
In `@projects/site/src/_11ty/layouts/links.test.ts`:
- Around line 6-9: The regex patterns RELATIVE_INTERNAL_LINK_PATTERN on line 6
and JS_RELATIVE_INTERNAL_LINK_PATTERN on line 8 currently only match optional
`./` prefixes using the pattern `(?:\.\/)?`, which allows `../` relative paths
to bypass the test. Modify both patterns to also catch `../` paths by updating
the prefix matching group from `(?:\.\/)?` to `(?:\.\.?\/)?`, which will match
either `.` or `..` followed by a forward slash, ensuring that paths like
`../docs/...`, `../examples/...`, and `../starters/...` are properly caught.
In `@projects/site/src/_11ty/layouts/page.11ty.js`:
- Line 25: The nve-button element containing the "Starters" link currently
points to "/starters/" which creates an unnecessary redirect. Update the href
attribute on this nve-button from "/starters/" to "/docs/integrations/" to align
with the navigation target used in the shared docs header, ensuring consistent
navigation behavior across layouts and eliminating the redirect hop.
In `@projects/site/src/docs/elements/index.11ty.js`:
- Around line 29-30: The docsByTag Map on line 29 overwrites entries when
multiple components share the same tag, causing the wrong document (such as API
or examples pages) to be used for catalog card links instead of overview docs.
Modify the Map creation logic to check if a tag already exists before adding it,
and ensure that overview documentation takes priority over API or examples
pages. When filtering components and creating the Map, add logic to skip adding
a component to the Map if its tag is already present, or implement a
prioritization check to keep overview docs and discard non-overview pages with
the same tag. Apply the same fix to the similar code referenced in lines 34-47.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 0be14e9a-dd3e-44fd-8c26-2dcb707c951d
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (77)
pnpm-workspace.yamlprojects/core/src/tabs/tabs.examples.tsprojects/site/eleventy.config.jsprojects/site/package.jsonprojects/site/src/_11ty/layouts/common.jsprojects/site/src/_11ty/layouts/docs.11ty.jsprojects/site/src/_11ty/layouts/links.test.tsprojects/site/src/_11ty/layouts/metadata.jsprojects/site/src/_11ty/layouts/metadata.test.tsprojects/site/src/_11ty/layouts/page.11ty.jsprojects/site/src/_11ty/plugins/llms-txt.jsprojects/site/src/_11ty/plugins/llms-txt.test.tsprojects/site/src/_11ty/plugins/sitemap-xml.jsprojects/site/src/_11ty/plugins/sitemap-xml.test.tsprojects/site/src/_11ty/shortcodes/index.jsprojects/site/src/_11ty/templates/api.jsprojects/site/src/_11ty/transforms/anchor-generator.jsprojects/site/src/_11ty/transforms/site-urls.jsprojects/site/src/_11ty/transforms/site-urls.test.tsprojects/site/src/_11ty/utils/site-url.jsprojects/site/src/_internal/metrics-carousel/metrics-carousel.tsprojects/site/src/docs/about/contributions.mdprojects/site/src/docs/about/migration.mdprojects/site/src/docs/about/support.mdprojects/site/src/docs/api-design/logs.mdprojects/site/src/docs/api-design/packaging.mdprojects/site/src/docs/changelog/changelog.11ty.jsprojects/site/src/docs/changelog/index.11ty.jsprojects/site/src/docs/elements/dialog.mdprojects/site/src/docs/elements/drawer.mdprojects/site/src/docs/elements/dropdown.mdprojects/site/src/docs/elements/forms/index.mdprojects/site/src/docs/elements/icon.mdprojects/site/src/docs/elements/index.11ty.jsprojects/site/src/docs/elements/notification.mdprojects/site/src/docs/elements/page.mdprojects/site/src/docs/elements/toast.mdprojects/site/src/docs/elements/toggletip.mdprojects/site/src/docs/elements/tooltip.mdprojects/site/src/docs/foundations/iconography.mdprojects/site/src/docs/foundations/index.mdprojects/site/src/docs/foundations/layout/grid.mdprojects/site/src/docs/foundations/layout/horizontal.mdprojects/site/src/docs/foundations/layout/index.mdprojects/site/src/docs/foundations/layout/responsive/container.mdprojects/site/src/docs/foundations/layout/responsive/index.mdprojects/site/src/docs/foundations/layout/responsive/viewport.mdprojects/site/src/docs/foundations/layout/vertical.mdprojects/site/src/docs/foundations/popovers.mdprojects/site/src/docs/foundations/themes/index.11ty.jsprojects/site/src/docs/foundations/typography.mdprojects/site/src/docs/foundations/view-transitions.mdprojects/site/src/docs/integrations/angular.mdprojects/site/src/docs/integrations/index.11ty.jsprojects/site/src/docs/integrations/lit.mdprojects/site/src/docs/integrations/mcp-apps.mdprojects/site/src/docs/integrations/shortcodes.jsprojects/site/src/docs/internal/guidelines/agent-harness.mdprojects/site/src/docs/internal/guidelines/agent-ownership.mdprojects/site/src/docs/internal/guidelines/component-creation.mdprojects/site/src/docs/internal/guidelines/testing.mdprojects/site/src/docs/metrics/api-status.11ty.jsprojects/site/src/docs/metrics/bundle-explorer.11ty.jsprojects/site/src/docs/metrics/index.11ty.jsprojects/site/src/docs/metrics/metadata.11ty.jsprojects/site/src/docs/metrics/testing-and-performance.11ty.jsprojects/site/src/docs/metrics/wireit.11ty.jsprojects/site/src/docs/monaco/diff-editor.mdprojects/site/src/docs/monaco/editor.mdprojects/site/src/docs/patterns/editor.mdprojects/site/src/docs/patterns/index.mdprojects/site/src/docs/patterns/panel.mdprojects/site/src/docs/skills/index.mdprojects/site/src/examples/examples.11ty.jsprojects/site/src/examples/index.11ty.jsprojects/site/src/index.mdprojects/starters/nextjs/package.json
264380d to
d9f75d0
Compare
- Changed internal links in documentation to use root-relative paths for consistency. - Added a new transform for site URLs to ensure correct linking in different environments. - Updated various files to reflect these changes, including configuration and layout files. - Added tests to verify that all internal links are correctly formatted. Signed-off-by: Cory Rylan <crylan@nvidia.com>
d9f75d0 to
e01a711
Compare
Summary by CodeRabbit
llms.txt/context links, aligning with deployed/base URL behavior.href/src(and module script URLs) to ensure links point to the correct site location.llms.txtoutput, and internal-link pattern scanning.