Skip to content

Feat/remove persona filter#876

Open
klocke-io wants to merge 9 commits intomasterfrom
feat/remove-persona-filter
Open

Feat/remove persona filter#876
klocke-io wants to merge 9 commits intomasterfrom
feat/remove-persona-filter

Conversation

@klocke-io
Copy link
Member

@klocke-io klocke-io commented Feb 27, 2026

How to categorize this PR?

/kind cleanup

What this PR does / why we need it:

#867

To reduce technical complexity and provide an easier ground for reasoning about the content structure, the persona filter should be removed from the documentation landing page

Which issue(s) this PR fixes:
Fixes #
#691
#858
#758

Special notes for your reviewer:

Summary by CodeRabbit

  • New Features

    • Taxonomy index component added to show taxonomy children on index pages.
    • Page-data transform hook added to surface taxonomy children during build.
  • Refactor

    • Consolidated all sidebars into a centralized configuration and simplified navigation (Demo removed, Blog label updated).
    • Persona-based sidebar switching and related persona mappings removed.
  • Chores

    • Removed legacy theme helpers/components and debug utilities; updated build/preview workflow and tooling configs.
  • Style

    • Sidebar typography and spacing adjustments.

@klocke-io klocke-io requested a review from a team as a code owner February 27, 2026 10:34
@gardener-prow gardener-prow bot added the kind/cleanup Something that is not needed anymore and can be cleaned up label Feb 27, 2026
@netlify
Copy link

netlify bot commented Feb 27, 2026

Deploy Preview for soon-to-be-gardenercloud ready!

Name Link
🔨 Latest commit 48f90ad
🔍 Latest deploy log https://app.netlify.com/projects/soon-to-be-gardenercloud/deploys/69a7e5f842683500087713a6
😎 Deploy Preview https://deploy-preview-876--soon-to-be-gardenercloud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 67 (🟢 up 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (🟢 up 8 from production)
SEO: 97 (no change from production)
PWA: 90 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@gardener-prow
Copy link

gardener-prow bot commented Feb 27, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign marc1404 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 27, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Replaces persona-driven sidebar and menu infrastructure with taxonomy-driven sidebar support: adds a transformPageData hook to populate frontmatter.taxonomyChildren for index pages, introduces taxonomy helpers, removes persona mapping/components/debug utilities, and simplifies theme/layout and build configs.

Changes

Cohort / File(s) Summary
VitePress config & central sidebars
\.vitepress/config.mts
Added transformPageData that resolves index.md paths and assigns frontmatter.taxonomyChildren via getTaxonomyChildren; introduced allSidebars wiring, adjusted editLink typing and path resolution.
Sidebar utilities & taxonomy helpers
\.vitepress/theme/utils/sidebar.ts, \.vitepress/theme/docs-sidebar.ts, \.vitepress/theme/community-sidebar.ts
Removed persona/leaf-map utilities and debug flows; added generateWeightSortedSidebar, sortByWeight, getTaxonomyChildren, findSidebarChildren, normalizeSidebarPath, hasMarkdownContent and related helpers; simplified docs/community sidebar generation to weight-sorted calls.
Removed persona mapping & debug util
\.vitepress/theme/utils/personaMapping.json, \.vitepress/theme/utils/debug-json.ts, \.vitepress/data/sidebar.data.ts
Deleted static persona mapping, JSON debug writer, and the sidebar.data precompute module.
Removed custom menu & navbar components
\.vitepress/theme/components/CustomVPMenuLink.vue, \.vitepress/theme/components/VPMenu.vue, \.vitepress/theme/components/VPNavBarMenuLink.vue, \.vitepress/theme/components/VPNavbarMenuGroupWrapper.vue
Removed components that implemented persona/localStorage click tracking, custom events, and bespoke menu/navbar rendering.
Removed persona-aware sidebar group
\.vitepress/theme/components/VPSidebarGroup.vue
Deleted the persona-driven sidebar group component with lifecycle hooks, event listeners, localStorage handling, and persona UI controls.
Theme layout & taxonomy UI
\.vitepress/theme/index.ts, \.vitepress/theme/layouts/EmptyIndexLayout.vue, \.vitepress/theme/components/TaxonomyIndex.vue, \.vitepress/theme/style.css
Layout now composes DefaultTheme.Layout with TaxonomyIndex (doc-before) and VPFooter (layout-bottom); replaced complex EmptyIndexLayout logic with a simpler taxonomy-list renderer; added TaxonomyIndex.vue and sidebar style tweaks.
Build, post-processing, tests, deps
Makefile, post-processing/part-3.js, vitest.config.ts (deleted), package.json
Expanded local-preview workflow, removed --add-empty-metadata action and related code, deleted Vitest config, and reorganized dependencies (moved type packages to devDependencies, reinstated/adjusted some deps).
Documentation content
website/documentation/_index.md
Removed the "Understanding the Documentation Personas" section and its persona subsections.

Sequence Diagram(s)

sequenceDiagram
  participant Config as VitePress Config
  participant SidebarUtils as Sidebar Utils
  participant FS as File System
  participant Theme as TaxonomyIndex
  Config->>FS: resolve absolute path for index.md
  Config->>SidebarUtils: call getTaxonomyChildren(relPath, allSidebars)
  SidebarUtils->>SidebarUtils: normalize paths & search sidebars
  SidebarUtils->>FS: call hasMarkdownContent(filePath) (optional)
  SidebarUtils-->>Config: return taxonomy children array | null
  Config->>Config: set page.frontmatter.taxonomyChildren
  Theme->>Config: read frontmatter.taxonomyChildren
  Theme-->>Theme: render taxonomy list links
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

Poem

🐰 I hopped through code, trimmed paths and ties,
Taxonomy blooms where old personas died.
Children aligned in tidy rows,
Fewer hooks, clearer flows.
A soft thump — the docs now glide. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Feat/remove persona filter' clearly summarizes the main change: removing persona filtering functionality from the documentation system.
Description check ✅ Passed The description follows the template structure, includes proper categorization (/kind cleanup), explains the motivation (issue #867), and references related issues.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/remove-persona-filter

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Feb 27, 2026

Niklas Klocke left a comment:

The footer somehow vanished 🤦🏼‍♂️

Browser metadata
Path:      /
Browser:   Firefox 147.0 on Mac OS 10.15
Viewport:  1671 x 947 @2x
Language:  en
Cookies:   Enabled

Open in BrowserStack

Open Deploy Preview · Mark as Resolved

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 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:
- Line 25: The index-page check using pageData.relativePath.endsWith('index.md')
is too permissive and matches names like foo-index.md; update the conditional to
ensure the final path segment is exactly "index.md" (for example by testing
path.basename/pageData.relativePath.split('/').pop() === 'index.md' or by
checking endsWith('/index.md') depending on POSIX/Windows needs) so only true
index pages pass; modify the condition around pageData.relativePath in
.vitepress/config.mts accordingly.

In `@Makefile`:
- Around line 115-116: The log message and deletion differ: update the echo or
the rm command so they match; either change the echo line to say "Removing
existing hugo directory..." to reflect that rm -rf hugo removes the whole hugo
tree, or change the removal to rm -rf hugo/content if you only intend to delete
the content subdirectory—adjust the echo and the rm -rf hugo|hugo/content pair
accordingly (refer to the echo "Removing existing hugo/content directory..." and
the rm -rf hugo command).

In `@package.json`:
- Line 9: The package "ts-node" is listed as a runtime dependency but is only a
dev tool; remove it from the dependencies block in package.json and either add
it under devDependencies (e.g., "devDependencies": { "ts-node": "10.9.2" }) or
remove it entirely if unused; after editing package.json run your package
manager to update the lockfile (npm install / yarn install) and ensure no
scripts or source files reference ts-node before committing.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15cfe1c and 457233c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (19)
  • .vitepress/config.mts
  • .vitepress/data/sidebar.data.ts
  • .vitepress/theme/community-sidebar.ts
  • .vitepress/theme/components/CustomVPMenuLink.vue
  • .vitepress/theme/components/VPMenu.vue
  • .vitepress/theme/components/VPNavBarMenuLink.vue
  • .vitepress/theme/components/VPNavbarMenuGroupWrapper.vue
  • .vitepress/theme/components/VPSidebarGroup.vue
  • .vitepress/theme/docs-sidebar.ts
  • .vitepress/theme/index.ts
  • .vitepress/theme/layouts/EmptyIndexLayout.vue
  • .vitepress/theme/utils/debug-json.ts
  • .vitepress/theme/utils/personaMapping.json
  • .vitepress/theme/utils/sidebar.ts
  • Makefile
  • package.json
  • post-processing/part-3.js
  • vitest.config.ts
  • website/documentation/_index.md
💤 Files with no reviewable changes (13)
  • .vitepress/theme/community-sidebar.ts
  • website/documentation/_index.md
  • vitest.config.ts
  • .vitepress/data/sidebar.data.ts
  • .vitepress/theme/components/CustomVPMenuLink.vue
  • .vitepress/theme/index.ts
  • .vitepress/theme/utils/personaMapping.json
  • .vitepress/theme/components/VPNavBarMenuLink.vue
  • .vitepress/theme/docs-sidebar.ts
  • .vitepress/theme/utils/debug-json.ts
  • .vitepress/theme/components/VPMenu.vue
  • .vitepress/theme/components/VPSidebarGroup.vue
  • .vitepress/theme/components/VPNavbarMenuGroupWrapper.vue

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.vitepress/theme/index.ts (1)

10-15: ⚠️ Potential issue | 🟡 Minor

Remove the unused Window.plausible declaration.

This interface extension is dead code—plausible is not used anywhere in the codebase. Remove lines 10-15 entirely.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.vitepress/theme/index.ts around lines 10 - 15, Remove the unused global
extension that adds the plausible property to Window: delete the "declare global
{ interface Window { plausible?: (event: string, options?: { props?:
Record<string, any> }) => void; } }" block (the Window.plausible declaration) so
the dead code is gone; before committing, quickly grep for "plausible" to
confirm there are no remaining references.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.vitepress/theme/index.ts:
- Around line 10-15: Remove the unused global extension that adds the plausible
property to Window: delete the "declare global { interface Window { plausible?:
(event: string, options?: { props?: Record<string, any> }) => void; } }" block
(the Window.plausible declaration) so the dead code is gone; before committing,
quickly grep for "plausible" to confirm there are no remaining references.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 457233c and d0c1197.

📒 Files selected for processing (2)
  • .vitepress/theme/components/TaxonomyIndex.vue
  • .vitepress/theme/index.ts

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🤖 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/theme/utils/sidebar.ts:
- Around line 283-287: The current concatenation using "base + link" can produce
duplicate or missing slashes; update the join logic used where variables
p/base/link are combined (the block that sets let p = base + link and the
similar blocks at the other occurrences) to normalize slashes: trim trailing
slash from base, trim leading slash from link, then join with a single '/' (and
preserve a leading '/' only if required), then apply the existing logic to
append 'index.md' or '/index.md' and strip the leading slash for comparison.
Ensure you change the three places noted (the let p = base + link block and the
analogous blocks around the p construction at the other occurrences) so all path
joins behave consistently.
- Around line 19-20: Guard the lookup of cleaned[resolvePath] before passing its
items into addTrailingSlashToLinks: ensure cleaned[resolvePath] is defined and
has an items array (e.g., if (cleaned[resolvePath] &&
Array.isArray(cleaned[resolvePath].items)) {
addTrailingSlashToLinks(cleaned[resolvePath].items); }) and skip calling
addTrailingSlashToLinks when the section is missing so sidebar generation won't
throw.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c28141e and 32ddcb3.

📒 Files selected for processing (3)
  • .vitepress/theme/community-sidebar.ts
  • .vitepress/theme/docs-sidebar.ts
  • .vitepress/theme/utils/sidebar.ts

@gardener-prow gardener-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2026
@klocke-io klocke-io force-pushed the feat/remove-persona-filter branch from 32ddcb3 to 48f90ad Compare March 4, 2026 07:57
@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 4, 2026
@marc1404
Copy link
Member

marc1404 commented Mar 4, 2026

/assign

Copy link
Member

@marc1404 marc1404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work & good riddance! 🧹 ✨ Thanks for structuring the changes in multiple commits; it makes reviewing much easier.
It's indeed impressive to see how much complexity is removed by this simplification in many places. I'm looking forward to this change and in the future to a new structure that statically caters to different personas.

/lgtm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is totally subjective, but I don't know how I feel about the new sidebar design yet.
I think I understand the motivation for highlighting directories in bold text. However, it starts to feel a bit heavy once you open a few sections, a few levels deeper.

Image

I don't have a strong preference here, so we can also go with the change and see what others think :)

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2026
@gardener-prow
Copy link

gardener-prow bot commented Mar 4, 2026

LGTM label has been added.

DetailsGit tree hash: 03c174f09f03554da7642e0bd4aed0765a7bf135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/cleanup Something that is not needed anymore and can be cleaned up lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants