ui: make the sidebar rows compact again

Both the project band and the session rows are dense 56px list tiles now
(measured 54), down from 72. Session titles are 14 and project names 14.5,
so the list stays readable while the hierarchy keeps its tinted band. The
project + and the session ⋮ still share one vertical line.

0.3.21 (321).
This commit is contained in:
blumia committed 2026-11-22 12:53:45 +08:00
1 parent 73af9d851b
commit ff0dbf1b37
5 files changed
+23 -4

No files matched your search

+9
View File
@@ -5,6 +5,15 @@
---
## 0.3.21 侧栏行更紧凑(分支 `flutter`)
| 项 | 结果 |
| --- | --- |
| 行高 | 项目条和会话行都改为 `dense: true` + `minTileHeight: 56`,实测都是 54(此前是 72);标题 14 / 项目名 14.5,路径与副标题保持较小字号 |
| 对齐 | 仍然等高等宽;`+` 与会话 `⋮` 的 x 中心保持对齐(测试断言) |
| 版本 | **0.3.21(code 321)** |
---
## 0.3.20 侧栏项目/会话行等高与右对齐、活动条改为 dsh-Go 胶囊(分支 `flutter`)
| 项 | 结果 |
+1 -1
View File
@@ -5,7 +5,7 @@ Android first. This branch (`flutter`) is a framework evaluation: the same
feature set as the earlier Asuka/Go and MyGo attempts, reimplemented in
Flutter to compare mobile UI maturity.
Status: 0.3.20 — servers (passwordless / password login, HTTP/HTTPS and
Status: 0.3.21 — servers (passwordless / password login, HTTP/HTTPS and
SOCKS5/socks5h proxy, self-signed certificates and pinning), session list with search and live
events, chat with streaming Markdown and full history paging, tool steps
grouped per turn (icon, one-line summary, foldable run) with image previews, a
+8 -1
View File
@@ -307,6 +307,9 @@ class _SessionListPaneState extends State<SessionListPane> {
borderRadius: BorderRadius.circular(10),
clipBehavior: Clip.antiAlias,
child: ListTile(
// Compact like a session row: two dense lines in a 56px band.
dense: true,
minTileHeight: 56,
// The band already insets by 8. A Material 3 list tile ends at 24
// (start 16), so 16 here makes the + line up with the session
// rows' ⋮.
@@ -325,7 +328,7 @@ class _SessionListPaneState extends State<SessionListPane> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15,
fontSize: 14.5,
fontWeight: FontWeight.w700,
color: scheme.onSurface,
),
@@ -514,6 +517,9 @@ class _SessionListPaneState extends State<SessionListPane> {
],
),
child: ListTile(
// Compact: both the project band and a session row are 56 high.
dense: true,
minTileHeight: 56,
selected: selected,
selectedTileColor: scheme.primary.withValues(alpha: 0.10),
title: Text(
@@ -521,6 +527,7 @@ class _SessionListPaneState extends State<SessionListPane> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
fontWeight: selected ? FontWeight.w600 : FontWeight.w400,
),
),
+1 -1
View File
@@ -2,7 +2,7 @@ name: openchamber
description: "A lightweight OpenChamber client for phones."
publish_to: 'none'
version: 0.3.20+320
version: 0.3.21+321
environment:
sdk: ^3.14.0
+4 -1
View File
@@ -37,7 +37,10 @@ void main() {
of: find.text('标签页拖拽与分屏'),
matching: find.byType(ListTile),
);
expect(tester.getSize(header).height, tester.getSize(row).height);
final headerHeight = tester.getSize(header).height;
expect(tester.getSize(row).height, headerHeight);
// Compact, close to the old 56px project band.
expect(headerHeight, lessThanOrEqualTo(58));
// The project's + and the session's ⋮ share one vertical line.
final add = tester.getCenter(find.byTooltip('在此项目新会话'));