web: bound the comment composer's width, sharpen the page header
commit b922433
web: bound the comment composer's width, sharpen the page header
The inline per-line comment composer stretched to match the code table’s
own width, which for a file with long lines meant a comment box far wider
than comfortable reading/writing width — cap it at 640px.
A tree/blob view’s page title duplicated the exact path its breadcrumb
trail already spelled out, in the ordinary heading font, competing with
the breadcrumbs for the same information instead of grounding it: give
layout_split a path_title flag so those titles render in the same
monospace the path-shaped breadcrumbs already use, tuck the breadcrumbs
snug under the title as its subtitle, and add a header-bottom divider
(after the breadcrumbs, when present) so every page’s header reads as a
distinct zone from the content below it.
crates/cli/ents-web/src/pages/mod.rs
@@ -366,11 +366,18 @@
/// page's own `.page-header` title and `pane` body) on the right. Every
/// selection in the sidebar is a real URL and the sidebar always renders,
/// so the split stays SSR-friendly (`docs/web-workbench-plan.adoc`).
+///
+/// `path_title` marks `title` itself as a repository-relative path
+/// (`super::files`'s tree/blob views, the only pages whose title is a path
+/// rather than a name) so the title renders in `.page-title.path`'s
+/// monospace, matching the `.crumbs` trail underneath it instead of
+/// clashing with it in the ordinary heading font.
pub(crate) fn layout_split(
repo: &RepoHeader,
identity: &str,
active: Tab,
title: &str,
+ path_title: bool,
sidebar: Markup,
pane: Markup,
) -> Markup {
@@ -383,7 +390,7 @@
div.split {
nav.tree { (sidebar) }
main.pane {
- div.page-header { h1.page-title { (title) } }
+ div.page-header { h1.page-title.path[path_title] { (title) } }
(pane)
}
}