Skip to content

feat: add a resizable panel group - #77

Merged
Shewart merged 4 commits into
mainfrom
feat/resizable-panels
Oct 23, 2026
Merged

Shewart merged 4 commits into
mainfrom
feat/resizable-panels

Conversation

@Shewart

@Shewart Shewart commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Fixes #67.

Neither copy of Resizable resized anything. This adds shadcn's ResizablePanelGroup, ResizablePanel and ResizableHandle:

  • Groups: horizontal or vertical, and they nest.
  • Panels: DefaultSize, MinSize and MaxSize in percent. Panels without a default share what's left.
  • Handles: role="separator" with aria-orientation and aria-valuenow. Drag with the pointer, or focus one and use the arrow keys (KeyboardStep, default 10%), Home and End. WithHandle shows a grip.
  • OnLayout gives every panel's size after a drag or key press, and Layout reads the current sizes.

Why it feels instant on Blazor Server: the new initResizeHandle in shellui.js (both the package and template copies) moves the panels in the browser during a drag or key press and reports the sizes to .NET once. A drag never waits on a round trip.

CLI: shellui add resizable now installs the panel group and its two hidden parts. The old Resizable (a plain flex container) stays in the package, marked deprecated, so nothing that uses it breaks. resizable is out of AllowedDrift. Registry: 254 entries (98 direct, 156 hidden).

Demo (/components/new): three panels with a nested vertical split and a live layout readout. The demo's shellui.js is refreshed from the template; it was an unmodified older copy.

Tests: 532 passing on net8.0 and net10.0, 0 warnings. Checked in the demo with real input:

  • Dragging stops at MaxSize (35%) and reports 35 / 40 / 25.
  • Two ArrowLeft presses move the handle 20%, and Home stops at the next panel's MinSize.
  • The vertical handle drags, and the cursor and dragging state reset on release.

ResizablePanelGroup, ResizablePanel and ResizableHandle follow shadcn:
horizontal or vertical groups, DefaultSize, MinSize and MaxSize per
panel in percent (panels without a default share what's left), and an
OnLayout callback with every panel's size. Handles are separators with
aria-valuenow; they drag with the pointer, and arrow keys, Home and End
move a focused handle by KeyboardStep.

The browser moves the panels during a drag or key press and reports
the sizes once, through initResizeHandle in both shellui.js copies, so
dragging never waits on a Blazor Server round trip.

shellui add resizable now installs the panel group. The old Resizable,
a plain flex container, stays in the package marked deprecated, and
resizable leaves AllowedDrift.

Fixes #67
Sync-checks the three parts and tests the initial sizes, the separator attributes and JS wiring, and applying a layout the browser reports.
The registry has 254 entries (98 direct, 156 hidden).
Three panels with a nested vertical split and a live layout readout. shellui.js is refreshed from the template and app.css rebuilt.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 04:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Shewart
Shewart merged commit b90755d into main Oct 23, 2026
1 check passed
@Shewart
Shewart deleted the feat/resizable-panels branch October 23, 2026 04:56
@Shewart Shewart mentioned this pull request Oct 30, 2026
Shewart added a commit that referenced this pull request Oct 30, 2026
Release notes and version references for 0.4.0, the 0.4 stable release.

It fixes a hang in `shellui add` on .NET 8 and 9 apps that this
release's smoke test found, and the 0.4.0 notes describe those fixes.

**In this release** (on main, plus #80)
- #76: PromptSuggestions, Reasoning, ToolCall, Field, JsonViewer
- #77: a real resizable panel group (`ResizablePanelGroup` / `Panel` /
`Handle`)
- #78: `shellui migrate`
- #74: .NET 8 support, `shellui add all`, `shellui doctor`,
`SonnerService.Clear`, destructive context menu items, safelist fix
- the whole 0.4 alpha line (alpha.1 to alpha.3), summed up for people
upgrading from 0.3.6
- #80: `add` no longer hangs on .NET 8/9, the CLI rolls forward to newer
runtimes, `doctor` stops calling a fresh `app.css` stale, `list` counts
fixed

Not in it: #79 (ShellCharts instead of ApexCharts) stays a draft for a
later release.

**This PR**
- `Directory.Build.props`: empty suffix, so both packages build as
`0.4.0`
- README, VERSIONING_STRATEGY, CLI_INSTALLATION, CLI_SYNTAX, FAQ,
QUICKSTART and the version fallbacks move to `0.4.0`. The latest stable
was still listed as 0.3.5, so 0.3.6 is now the previous stable. Installs
no longer need `--version`.
- `docs/RELEASE_NOTES.md`: the 0.4.0 section.
`scripts/extract-release-notes.sh 0.4.0` extracts it.

**Release checks.** Packed 0.4.0, with #80, installed from a local
folder into a private tool path, using a throwaway NuGet cache so
nothing local shadows the published packages.
- Release build: 0 warnings. 540 tests on net8.0 and net10.0 (542 with
#80).
- Every command in a fresh .NET 10 app: `init --yes`, `add all` (244
files), `list`, `remove`, `update`, `migrate --dry-run`, `theme apply`,
`theme update`, `doctor`. Builds 0/0.
- `init` and `add all` in fresh .NET 8 and .NET 9 apps build 0/0 and
`doctor` is clean. Before #80, `add all` hung on both.
- All 98 direct targets together, including the `dashboard-*` and
`auth-*` blocks, in `my-app` (.NET 10): 0/0, `doctor` clean.
- Upgrade from the published 0.4.0-alpha.3:
  - An app with a page using the old APIs builds on alpha.3.
- 0.4.0 `update` rewrites 55 components and replaces the targets file,
and the app builds 0/0.
- `migrate` rewrites the page (DatePicker, TimePicker, Pagination), it
builds 0/0, and `doctor` is clean.
- CLI templates in a browser:
- suggestion chips; Reasoning folds to "Thought for 2 seconds"; Field
shows the EditForm error; JSON tree folds
  - Resizable drags from 30/70 to 55/45
  - no console errors
- Packed `ShellUI.Components` in a .NET 8 app with `shellui-all.css`, in
light and dark mode:
- the new components render; the resizable drag and suggestion chips
work
  - Dialog focus trap: Tab stays inside, Escape closes and returns focus
- `shellui.js` loads through the package's JS initializer, with no
console errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resizable: implement a real resizable panel group

2 participants