Repository navigation
fix: docs page layout on v16 - #42
Merged
Merged
Conversation
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.
[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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the docs page on Frappe v16. Each commit fixes one problem.
page.set_breadcrumbs(). This removes the breadcrumbs polyfill, which only patched the old API.Important
This requires Frappe v16.50.0 or later, because older versions do not have
page.set_breadcrumbs(). The minimum version inpyproject.tomlis changed to match.Closes #26