Skip to content

fix: docs page layout on v16 - #42

Merged
barredterra merged 5 commits into
version-16-hotfixfrom
fix-v16-desk-layout
Nov 19, 2026
Merged

barredterra merged 5 commits into
version-16-hotfixfrom
fix-v16-desk-layout

Conversation

@barredterra

Copy link
Copy Markdown
Member

Fixes the docs page on Frappe v16. Each commit fixes one problem.

  • Breadcrumbs and page title: the page head was empty. Frappe v16.50 keeps the breadcrumbs on each page and shows the page title as the last crumb. The docs page now uses page.set_breadcrumbs(). This removes the breadcrumbs polyfill, which only patched the old API.
  • Layout: the content column went past the right edge of the page, and the language picker was not at the bottom of the sidebar. The page now fits below the page head (v16 has no top navbar), and the content column takes the remaining width. Images fit the column.
  • Dark mode: the "Copy as Markdown" icon was black, and inline code was dark purple on a dark background. Both now use readable colors.
  • Table of contents: it stays in view while the content scrolls. A long table of contents scrolls by itself.
  • Wide tables: a table that is wider than the content column scrolls sideways.

Important

This requires Frappe v16.50.0 or later, because older versions do not have page.set_breadcrumbs(). The minimum version in pyproject.toml is changed to match.

Closes #26

Frappe v16.50 keeps the breadcrumbs on each page and shows the page
title as the last crumb. The docs page still used the old
frappe.breadcrumbs.add() call. Its compatibility layer ignores the
custom items, so the page head showed one empty crumb.

Set the trail with page.set_breadcrumbs() and remove the breadcrumbs
polyfill, which only patched the old API. Require Frappe v16.50.0 or
later, because older versions do not have page.set_breadcrumbs().
- Size the page to the viewport below the page head. v16 has no top
  navbar, so the old height left a gap under the sidebar and the
  language picker was not at the bottom.
- Let the content column shrink next to the sidebar. Desk gives it
  "flex: 1 0 80%", which pushed the page past the right edge.
- Limit images to the width of the content column.
- Fill the espresso "Copy as Markdown" icon with the button color.
  Espresso icons have no fill color, so they rendered black.
- Use a light purple for inline code in dark mode. Desk uses a dark
  purple that dark mode does not change.
Make the table of contents sticky in the content column. A table of
contents that is taller than the screen scrolls by itself.

The content area had a fixed height, so the sticky table of contents
scrolled away with it. The content area now grows with the content
and is at least as tall as the screen.

Closes #26
Long values, such as field names in code, cannot wrap. A table with such
values was wider than the content column and overflowed it.

Wrap each table in a container that scrolls sideways. Narrow tables
look the same as before.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge based on the code reviewed.

Reviews (1) · Last reviewed commit: "fix: scroll wide tables inside the conte..." · Reviewed by Greptile

@barredterra
barredterra merged commit 5583164 into version-16-hotfix Nov 19, 2026
9 checks passed
@barredterra
barredterra deleted the fix-v16-desk-layout branch November 19, 2026 16:04
barredterra added a commit that referenced this pull request Nov 19, 2026
* fix: scroll wide tables inside the content column

Long values, such as field names in code, cannot wrap. A table with such
values was wider than the content column and overflowed it.

Wrap each table in a container that scrolls sideways. Narrow tables
look the same as before.

* feat: keep the table of contents in view while the page scrolls

Make the table of contents sticky in the content column. A table of
contents that is taller than the screen scrolls by itself.

The content area had a fixed height, so the sticky table of contents
scrolled away with it. The content area now grows with the content
and is at least as tall as the screen.

Closes #26

* fix: fit images into the content column

Limit images to the width of the content column, so a wide image does
not overflow it.

* fix: readable inline code in dark mode

Use a light purple for inline code in dark mode. Desk uses a dark
purple that dark mode does not change.
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.

Set TOC position fixed

1 participant