Skip to content

feat(apollo-react): expand Flow canvas templates - #1074

Open
dbacomputer wants to merge 17 commits into
mainfrom
codex/fix-templates-part-2
Open

feat(apollo-react): expand Flow canvas templates#1074
dbacomputer wants to merge 17 commits into
mainfrom
codex/fix-templates-part-2

Conversation

@dbacomputer

Copy link
Copy Markdown
Collaborator

Summary

  • organize canvas templates into a top-level Template Guide plus Flow Standalone and Flow VS Code sections
  • add reusable standalone canvas compositions for right, bottom, draggable, sidebar, takeover, and full Workbench layouts
  • align panel docking, drag previews, resize handles, trigger behavior, canvas controls, and theming across templates
  • add VS Code-oriented panel examples while keeping their host-specific visual treatment distinct
  • refine Node Property Panel examples used by the template compositions

Validation

  • pnpm exec tsc -p packages/apollo-react/tsconfig.json --noEmit
  • pnpm --filter @uipath/apollo-react lint (passes with existing repository warnings)
  • focused canvas component tests: 51/51 passed
  • pnpm --dir apps/storybook storybook:build
  • local Storybook interaction review across the Flow Standalone and Flow VS Code templates

Known baseline issue

The full Apollo React test run passes 2,577/2,578 tests. The remaining failure is unrelated to this PR: StageNode/formatDuration.test.ts expects German 3h, while the current formatter returns 3 Std.. Lingui also reports existing translated plural syntax warnings during catalog compilation.

Copilot AI lite review requested due to automatic review settings August 21, 2026 18:05
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Aug 21, 2026, 11:32:57 AM
apollo-docs Ready Preview · Logs Aug 21, 2026, 11:32:57 AM
apollo-landing Ready Preview · Logs Aug 21, 2026, 11:32:57 AM
apollo-vertex Ready Preview · Logs Aug 21, 2026, 11:32:57 AM

@github-actions github-actions Bot added the size:XXL 1,000+ changed lines. label Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1951 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1722
ISC 88
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.2 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the Apollo React canvas template Storybook experience by introducing a top-level Template Guide and richer Flow template compositions for both standalone and VS Code/Dockview-style hosts, while also extending a few canvas components to better support these layouts.

Changes:

  • Adds new Storybook “Templates” structure with a Template Guide page plus Flow Standalone and Flow VS Code template sections.
  • Introduces multiple reusable Flow canvas compositions (standalone floating panels, bottom panels, left sidebar, takeover modal, and Dockview-based workbench layout) and related styling.
  • Extends canvas components to better support host integrations (e.g., NodePropertyPanel drag-handle props, CanvasLeftSidebar header/width options) and adds dockview-react as a dev dependency.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pnpm-lock.yaml Locks new dependency graph changes, including Dockview packages.
packages/apollo-react/src/canvas/stories/templates/TemplateGuidelines.stories.tsx Adds the top-level “Template Guide” story under Templates.
packages/apollo-react/src/canvas/stories/templates/FlowVSCode.stories.tsx Adds VS Code/Dockview-oriented Flow template stories using DraggablePanelLayout.
packages/apollo-react/src/canvas/stories/templates/Flow.stories.tsx Reworks Flow templates into multiple standalone + workbench-aligned compositions; adds Dockview integration examples.
packages/apollo-react/src/canvas/stories/templates/Flow.stories.css Adds Dockview theming overrides for the template stories.
packages/apollo-react/src/canvas/components/NodePropertyPanel/NodePropertyPanel.types.ts Adds dragHandleProps to support host-controlled drag interactions.
packages/apollo-react/src/canvas/components/NodePropertyPanel/NodePropertyPanel.tsx Applies dragHandleProps to the title-bar drag handle and adds data-slot hooks.
packages/apollo-react/src/canvas/components/NodePropertyPanel/NodePropertyPanel.stories.tsx Refactors the Quick Form story into a reusable QuickFormPanel and updates Storybook exports.
packages/apollo-react/src/canvas/components/Flow.stories.tsx Renames the story title to “Templates/Canvas Performance”.
packages/apollo-react/src/canvas/components/CanvasTakeoverModal/CanvasTakeoverModal.tsx Updates backdrop styling for the takeover modal.
packages/apollo-react/src/canvas/components/CanvasLeftSidebar/CanvasLeftSidebar.tsx Adds showContentHeader and expandedContentWidth props and updates layout logic accordingly.
packages/apollo-react/package.json Adds dockview-react as a dev dependency to support Dockview template stories.
apps/storybook/.storybook/preview.tsx Updates the Storybook sidebar ordering for the new Templates structure.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Suppressed comments (1)

packages/apollo-react/src/canvas/components/NodePropertyPanel/NodePropertyPanel.stories.tsx:3445

  • If the QuickFormPanel tabs are renamed to branching / error-handling, the matching TabsContent values should be updated so the content IDs stay aligned with the triggers.
        <TabsContent value="error-handling" className="mt-0" />
        <TabsContent value="advanced" className="mt-0" />

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/apollo-react/src/canvas/stories/templates/Flow.stories.tsx Outdated
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 41.59 MB 49.70 MB ±0
@uipath/apollo-react 40.2% 0.2% (1/489) 7.55 MB 29.09 MB +1.8 KB
@uipath/apollo-ui-icons 2.85 MB 6.91 MB ±0
@uipath/apollo-wind 415.9 KB 2.66 MB +5 B
@uipath/ap-chat 85.8% 43.46 MB 56.09 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

Copilot AI review requested due to automatic review settings August 21, 2026 18:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 14 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Suppressed comments (3)

Previously missed (3) — in code that hasn't changed since the last review.

packages/apollo-react/src/canvas/components/NodePropertyPanel/NodePropertyPanel.tsx:87

  • The drag-handle always shows a grab cursor (cursor-grab / active:cursor-grabbing) even when no drag interaction is provided via dragHandleProps. This creates a misleading affordance in consumers that don’t make the panel draggable. Consider only applying the grab cursor styles when drag behavior is actually enabled (e.g. draggable or pointer/drag handlers are present).
            <div
              {...dragHandleProps}
              data-slot="node-property-panel-drag-handle"
              className="grid size-8 cursor-grab touch-none place-items-center text-foreground-subtle active:cursor-grabbing"
            >

packages/apollo-react/src/canvas/components/CanvasLeftSidebar/CanvasLeftSidebar.tsx:56

  • showContentHeader hides more than just the header chrome. It also removes the title, headerActions, and the primary collapse control. The prop doc should reflect that so consumers don’t accidentally ship an expanded sidebar with no obvious collapse affordance.
  /** Additional controls rendered before the collapse button in the panel header. */
  headerActions?: ReactNode;
  /** Whether to render the expanded content-panel header. Defaults to true. */
  showContentHeader?: boolean;
  /** Docked sidebars are square; floating sidebars use rounded, elevated chrome. */
  variant?: 'default' | 'floating';
  /** Width of the expanded content panel. Defaults to 288px. */
  expandedContentWidth?: number;

packages/apollo-react/src/canvas/components/CanvasLeftSidebar/CanvasLeftSidebar.tsx:149

  • New rendering branches introduced by showContentHeader and the width override via expandedContentWidth aren’t covered by the existing CanvasLeftSidebar unit tests. Adding a focused test for showContentHeader={false} (no header rendered) and a test that asserts the container width uses the custom expandedContentWidth would help prevent regressions.
      style={{
        width: isExpanded
          ? CANVAS_LEFT_SIDEBAR_RAIL_WIDTH + expandedContentWidth
          : CANVAS_LEFT_SIDEBAR_COLLAPSED_WIDTH,
      }}

@github-actions

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 13 changed, 16 added, 6 removed (of 350 compared, 315 unchanged). View report

Baseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs

Updated (PT): Aug 21, 2026, 11:47:09 AM

@dbacomputer
dbacomputer marked this pull request as ready for review August 21, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants