Skip to content

Fix nested breadcrumbs#332

Merged
Dobrunia merged 1 commit intomainfrom
fix/nested-breadcrumbs
Apr 4, 2026
Merged

Fix nested breadcrumbs#332
Dobrunia merged 1 commit intomainfrom
fix/nested-breadcrumbs

Conversation

@Dobrunia
Copy link
Copy Markdown
Member

@Dobrunia Dobrunia commented Apr 4, 2026

Summary

  • Renders breadcrumbs for deeply nested pages as first ancestor → ellipsis → current page so the header stays readable.

Before

Снимок экрана 2026-04-04 в 14 28 55

After

Снимок экрана 2026-04-04 в 14 29 48 Снимок экрана 2026-04-04 в 14 30 02

@Dobrunia Dobrunia merged commit 5a92c72 into main Apr 4, 2026
3 checks passed
@Dobrunia Dobrunia deleted the fix/nested-breadcrumbs branch April 4, 2026 11:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves breadcrumb rendering for deeply nested documentation pages by collapsing long trails into a compact form to keep the header readable.

Changes:

  • Add backend breadcrumb generation (first ancestor → ellipsis → current) and pass it into the page template.
  • Update the page header Twig template to render breadcrumbs from a provided breadcrumbItems list.
  • Adjust page header CSS flex/overflow rules to prevent breadcrumb overflow and ensure truncation behaves well.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/frontend/styles/components/page.pcss Adds flex/overflow/ellipsis styling to keep long breadcrumb text from breaking the header layout.
src/backend/views/pages/page.twig Switches breadcrumb rendering to iterate over breadcrumbItems (supports ellipsis + current page styling).
src/backend/utils/breadcrumbs.ts Introduces breadcrumb-building helper and collapsing logic.
src/backend/routes/pages.ts Uses buildPageBreadcrumbs and passes breadcrumbItems to the page view.
src/backend/routes/aliases.ts Uses buildPageBreadcrumbs for alias-served pages and passes breadcrumbItems to the page view.
src/backend/models/page.ts Adds getAncestorChain() to retrieve ancestors for breadcrumb construction.
src/backend/build-static.ts Passes breadcrumbItems during static page rendering.
package.json Bumps package version to 2.3.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants