feat: add controlled workbench sidebar resize
This commit is contained in:
@@ -40,6 +40,17 @@ The default workbench follows the #99 VS Code-style structure:
|
||||
Unavailable or future controls must be disabled with blocker context. The
|
||||
frontend must not imply generic direct hardware control.
|
||||
|
||||
The left resource explorer is a controlled resizable column on desktop-class
|
||||
viewports. Its width defaults to `292px`, clamps inside a bounded range
|
||||
(`220px` to `420px` before viewport-specific clamping), and is changed through
|
||||
the `#explorer-resize` separator. The separator has a Chinese accessible name,
|
||||
supports pointer drag plus Arrow/Page/Home/End keyboard adjustment, and stores
|
||||
only the clamped width in versioned `localStorage` key
|
||||
`hwlab.workbench.layout.v1`. Collapsing the resource tree hides the column but
|
||||
keeps the saved width so expanding restores it. At `<=860px`, the resize handle
|
||||
is removed from the focus/hit-target flow and the mobile drawer/collapse flow
|
||||
owns the layout.
|
||||
|
||||
The `panel-wiring` / `hwlab-patch-panel` view must use a two-column long table
|
||||
instead of an eight-column wide table. The first table row/header names the two
|
||||
connected devices, for example `res_boxsimu_1` and `res_boxsimu_2`; following
|
||||
@@ -121,6 +132,12 @@ runner 入口。它使用 Playwright 覆盖 `1366x768`、`1024x768` 和 `390x844
|
||||
点击与 `document.elementsFromPoint()`;不得使用 `force: true` 或纯 DOM
|
||||
dispatch 绕过用户命中。
|
||||
|
||||
Layout smoke also covers #278 resize behavior. Desktop and narrow desktop runs
|
||||
drag `#explorer-resize`, exercise Arrow/Home/End keyboard changes, assert
|
||||
min/max/clamp and versioned storage restore, then collapse and expand the
|
||||
resource tree to prove width state is retained. The mobile run asserts the
|
||||
handle is not displayed or focusable and that no horizontal overflow appears.
|
||||
|
||||
常用命令:
|
||||
|
||||
```sh
|
||||
@@ -171,6 +188,8 @@ blockers/failures:`viewport`、`selector`、`failureType`、summary 和 artifa
|
||||
Playwright layout and overlap guardrail.
|
||||
- [pikasTech/HWLAB#276](https://github.com/pikasTech/HWLAB/issues/276):
|
||||
patch-panel wiring panel two-column long-table feedback.
|
||||
- [pikasTech/HWLAB#278](https://github.com/pikasTech/HWLAB/issues/278):
|
||||
resource explorer collapse and controlled resize feedback.
|
||||
- [code-agent-chat-readiness.md](code-agent-chat-readiness.md): Code Agent
|
||||
chat 同源 readiness 和 provider credential blocker 边界。
|
||||
- [docs/cloud-web-workbench.md](../cloud-web-workbench.md): detailed frontend
|
||||
|
||||
Reference in New Issue
Block a user