Skip to content

feat: v2 - mini content for collapsed docked windows#2188

Open
maxy-shpfy wants to merge 1 commit into
masterfrom
05-01-feat_v2_-_mini_content_for_collapsed_docked_windows
Open

feat: v2 - mini content for collapsed docked windows#2188
maxy-shpfy wants to merge 1 commit into
masterfrom
05-01-feat_v2_-_mini_content_for_collapsed_docked_windows

Conversation

@maxy-shpfy
Copy link
Copy Markdown
Collaborator

@maxy-shpfy maxy-shpfy commented May 1, 2026

Description

Adds "mini content" support for docked windows that are in a collapsed dock area. When a dock panel is collapsed, each window that has registered mini content renders a compact icon button in the collapsed dock strip. Clicking the button opens a popover showing the full window content without expanding the dock.

  • ComponentLibraryWindowMiniContent renders a LayoutGrid icon button as the collapsed representation of the Component Library panel.
  • PipelineTreeWindowMiniContent renders a GitBranch icon button with a live validation badge overlay — a green check when the pipeline is valid, or an issue badge showing error/warning counts.
  • RunsAndSubmissionWindowMiniContent renders a Play icon button that triggers a quick run directly, with color variants reflecting validation state (green for valid, amber for warnings, red for errors). Click propagation is stopped to prevent the surrounding popover trigger from firing when the action is intended.
  • CollapsedDockWindowMini wraps each mini button in a Radix Popover that displays the full panel content (with a title header) when triggered, sized to match the panel's configured width and opening to the opposite side of the dock.
  • DockArea renders the list of CollapsedDockWindowMini components in the collapsed strip, filtered to only windows that have registered mini content.
  • WindowStoreImpl stores mini content in a separate miniContentMap (keeping React nodes out of observables), exposes getWindowMiniContent, and cleans up on window close.
  • useComponentLibraryWindow, usePipelineTreeWindow, and useRunsAndSubmissionWindow each pass miniContent when opening their respective windows.

Related Issue and Pull Requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Mini Content Demo.mov (uploaded via Graphite)

Test Instructions

  1. Open the editor and collapse the left dock area.
  2. Confirm that the Component Library, Pipeline Structure, and Runs & Submissions panels each show a compact icon button in the collapsed strip.
  3. Click the Component Library button and verify the full component library content appears in a popover.
  4. Click the Pipeline Structure button and verify the full pipeline tree appears in a popover.
  5. Click the Runs & Submissions play button and verify a quick run is triggered without opening a popover.
  6. Introduce a validation error in the pipeline and confirm the issue badge appears on the Pipeline Structure mini button and the play button is disabled and red while the dock is collapsed.
  7. Resolve all issues and confirm the green check badge appears on the Pipeline Structure mini button and the play button returns to green.
  8. Expand the dock and confirm normal panel behavior is unaffected.

Copy link
Copy Markdown
Collaborator Author

maxy-shpfy commented May 1, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🎩 Preview

A preview build has been created at: 05-01-feat_v2_-_mini_content_for_collapsed_docked_windows/b2a54a9

@maxy-shpfy maxy-shpfy force-pushed the 05-01-feat_v2_-_mini_content_for_collapsed_docked_windows branch 2 times, most recently from ea03178 to 15d654a Compare May 14, 2026 00:18
@maxy-shpfy maxy-shpfy marked this pull request as ready for review May 14, 2026 00:18
@maxy-shpfy maxy-shpfy requested a review from a team as a code owner May 14, 2026 00:18
@maxy-shpfy maxy-shpfy force-pushed the 05-01-feat_v2_-_mini_content_for_collapsed_docked_windows branch from 15d654a to 2e116a0 Compare May 14, 2026 04:24
Comment thread src/routes/v2/pages/Editor/components/ComponentLibraryWindowMiniContent.tsx Outdated
Comment thread src/routes/v2/pages/Editor/components/ComponentLibraryWindowMiniContent.tsx Outdated
element, so we wrap it in a div that receives the trigger props.
*/}
<PopoverTrigger asChild>
<div className="relative z-20 flex w-full shrink-0 justify-center outline-none">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 This is an AI-generated code review comment.

Accessibility: PopoverTrigger ARIA state lands on the wrapper <div>, not the visible button.

<PopoverTrigger asChild>
  <div className="relative z-20 flex w-full shrink-0 justify-center outline-none">
    {mini}
  </div>
</PopoverTrigger>

Radix attaches aria-haspopup, aria-expanded, aria-controls, role and event handlers to the child node it receives. With a non-focusable <div> in between, those land on the wrapper while the inner <Button> (what users actually focus and screen readers announce) has no signal that it triggers a popover. Click bubbling still opens the popover, so the symptom is invisible — but screen-reader users see "button: Components" with no popup affordance, and there's no aria-expanded state communicating open/closed.

Suggested fix — either:

  1. Add forwardRef to Button (small refactor in button.tsx), then <PopoverTrigger asChild><Button …> works without the wrapper div.
  2. Invert composition: have the mini-content components export just the icon/badge bits, then render <PopoverTrigger asChild><Button …>{miniIcon}</Button></PopoverTrigger> inside CollapsedDockWindowMini.

The QuickRun mini case is different (acts on click directly, doesn't open the popover) and can stay.

Comment thread src/routes/v2/shared/windows/DockArea.tsx
Copy link
Copy Markdown
Collaborator

@camielvs camielvs left a comment

Choose a reason for hiding this comment

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

I like the feature/idea but there's a couple of issues

docked-preview-issue.mov (uploaded via Graphite)

1. some windows have preview buttons, some (most?) don't. All of them should have something (or can come in later PRs)
2. if I drag a window into a collapsed dock the sidebar should stay collapsed
3. when I select a task and the properties window was previously docked in a collapsed sidebar it doesn't show. might be best to undock the window when the parent sidebar is collapsed
4. show the mini content on click or on hover? (click is probably okay)
5. [nice to have] I should be able to reorder items in the collapsed sidebar using click + drag
6. I should be able to collapse the sidebar / active collapsed mode by dragging the sidebar very small, or activating focus mode (or some other equivalent). double clicking the sidebar edge is not obvious or easy

@maxy-shpfy maxy-shpfy force-pushed the 05-01-feat_v2_-_mini_content_for_collapsed_docked_windows branch from 2e116a0 to b2a54a9 Compare May 14, 2026 21:56
Copy link
Copy Markdown
Collaborator

@camielvs camielvs left a comment

Choose a reason for hiding this comment

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

I understand the current system is intended (even if it feels a bit unfinished). I will give this another lookover in the morning

@camielvs camielvs dismissed their stale review May 14, 2026 23:57

clarification given

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.

2 participants