Move "Edit this page" link to the right-hand side#929
Move "Edit this page" link to the right-hand side#929BoHristova wants to merge 6 commits intogardener:masterfrom
Conversation
✅ Deploy Preview for gardener-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.vitepress/theme/components/PageActions.vue (1)
51-51: Consider handlingindex.mdfor cleaner URLs.For index pages, the
pageUrlwill be/docs/getting-started/indexinstead of/docs/getting-started/. While functional, this may look inconsistent in issue reports.♻️ Suggested improvement
- const pageUrl = `${siteHostname}/${page.value.relativePath.replace(/\.md$/, '')}` + const pageUrl = `${siteHostname}/${page.value.relativePath.replace(/\.md$/, '').replace(/\/index$/, '/')}`🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.vitepress/theme/components/PageActions.vue at line 51, The constructed pageUrl uses page.value.relativePath directly, which yields URLs like /docs/getting-started/index for index.md; update the logic that builds pageUrl (using siteHostname and page.value.relativePath) to strip any trailing '/index' segment after removing the .md extension and ensure a trailing slash for index pages (so '/.../index' becomes '/.../' and a top-level 'index' becomes '/'), keeping other pages unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.vitepress/config.mts:
- Around line 238-241: The URL builder function url({filePath, frontmatter}) is
emitting malformed links when required frontmatter fields are missing; update
the function (the url arrow function that computes fileName from
frontmatter?.path_base_for_github_subdir and builds
`${frontmatter['github_repo']}/tree/master/${frontmatter['github_subdir']}/${fileName}`)
to first validate that frontmatter.github_repo and frontmatter.github_subdir are
present and non-empty (and compute fileName as before), and if either is missing
return undefined instead of constructing the string; ensure you use the existing
frontmatter fields (path_base_for_github_subdir, github_repo, github_subdir) to
gate the return value.
In @.vitepress/theme/components/PageActions.vue:
- Around line 104-108: The .vpi-report-issue rule defines --icon but never
applies it; update the .vpi-report-issue CSS to use the --icon as a mask and
fill it by setting -webkit-mask-image: var(--icon) and mask-image: var(--icon)
and set background-color: currentColor (and ensure width/height remain), so the
SVG data URL stored in --icon is actually rendered as an icon.
---
Nitpick comments:
In @.vitepress/theme/components/PageActions.vue:
- Line 51: The constructed pageUrl uses page.value.relativePath directly, which
yields URLs like /docs/getting-started/index for index.md; update the logic that
builds pageUrl (using siteHostname and page.value.relativePath) to strip any
trailing '/index' segment after removing the .md extension and ensure a trailing
slash for index pages (so '/.../index' becomes '/.../' and a top-level 'index'
becomes '/'), keeping other pages unchanged.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6830cbbf-0e30-412b-b041-9bf27c40d2fe
📒 Files selected for processing (4)
.vitepress/config.mts.vitepress/theme/components/PageActions.vue.vitepress/theme/index.ts.vitepress/theme/style.css
|
Niklas Klocke left a comment: on firefox there is a linebreak 👀 Browser metadata |
klocke-io
left a comment
There was a problem hiding this comment.
Nice, I really love where we are going here.
- check if we can integrate the
report an issuebutton with Netlify Forms - if we can package this new component into a reusable component.
The editLink config was removed in PR gardener#929, so the .VPDocFooter .edit-link rule was hiding an element that no longer renders.

How to categorize this PR?
/kind enhancement
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #692
Special notes for your reviewer:
/cc @n-boshnakov @marc1404
Summary by CodeRabbit
Release Notes