26bb583f10
Keep Settings navigation independent while preserving shell actions and destination-specific state. Add the reviewed chat, run-entry, layout, and regression-test updates needed by the destination behavior.
41 lines
2.5 KiB
Markdown
41 lines
2.5 KiB
Markdown
# Dim inactive chat panes
|
|
|
|
## Change
|
|
- `lib/features/chat/workspace/chat_pane_dim.dart` (new): `ChatPaneDim` lays an
|
|
`IgnorePointer` surface scrim over a pane's content. The scrim is the theme's
|
|
`colorScheme.surface` at `chatPaneDimOpacity` (0.35), so content reads at
|
|
about 65% emphasis in light and dark. Its colour fades over `Motion.standard`;
|
|
`Motion.of` returns zero under reduced motion, so the change is immediate.
|
|
- `lib/features/chat/workspace/chat_workspace.dart`: `_paneContent` wraps each
|
|
pane's built content in `ChatPaneDim(dimmed: paneCount > 1 && !active)`.
|
|
Pointer activation (the pane `Listener`), focus and the action bar's
|
|
existing tint (`ChatPaneActivity`) are unchanged. The scrim ignores pointers,
|
|
so a tap reaches the content beneath it and still activates the pane.
|
|
- The optional primary outline is not added. The active pane already has its
|
|
chat-coloured foreground border (`chat_screen_workspace.dart`).
|
|
|
|
## Tests
|
|
- `test/features/chat/workspace/chat_pane_dim_test.dart` (new, 7 tests):
|
|
two panes dim only the inactive one; three panes dim both inactive panes;
|
|
a single pane is never dimmed; a tap on an inactive input activates it and
|
|
focuses its editable text; a tap on bare space in an inactive pane activates
|
|
it; reduced motion gives a zero duration and an immediate switch; default
|
|
motion uses `Motion.standard`.
|
|
- Existing users of `ChatWorkspace` also run: `chat_workspace_test`,
|
|
`chat_pane_move_test`, `chat_center_stage_test`, `chat_switch_styles_test`,
|
|
`chat_mobile_panes_test`, `chat_peek_identity_test`, and
|
|
`test/features/settings/quick_switch_preview_test.dart`.
|
|
|
|
Command (from `app/`):
|
|
`tool/memwatch/full.sh 'test/features/chat/workspace/chat_pane_dim_test.dart test/features/chat/workspace/chat_workspace_test.dart test/features/chat/workspace/chat_pane_move_test.dart test/features/chat/workspace/chat_center_stage_test.dart test/features/chat/workspace/chat_switch_styles_test.dart test/features/chat/workspace/chat_mobile_panes_test.dart test/features/chat/workspace/chat_peek_identity_test.dart test/features/settings/quick_switch_preview_test.dart'`
|
|
|
|
Result: `PASS: 70 passed, 0 failed, 0 skipped; peak 1329 MB; 11s; exit 0`.
|
|
|
|
Analyzer (`tool/analyze.sh`): clean, exit 0.
|
|
|
|
## Not done here
|
|
- No captures. The 2- and 3-pane light and dark captures belong to ui-review
|
|
(`tool/capture/`), and no UI was built or run in this stage.
|
|
- No test or capture covers the chat screen's full path (`chat_screen_workspace.dart`).
|
|
The dim comes from `ChatWorkspace`, which that screen uses, so it applies there too.
|