feat(apollo-react): add CanvasModeToolbar and CanvasZoomControls#724
feat(apollo-react): add CanvasModeToolbar and CanvasZoomControls#7241980computer wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
080c4b3 to
988eadc
Compare
cc835a4 to
baa5177
Compare
baa5177 to
1c807a1
Compare
|
Good feedback @BenGSchulz, all three addressed: ToolbarButton — extracted a shared ToolbarButton component (canvas/components/ToolbarButton.tsx) that wraps the Tooltip → Button pattern. Both CanvasModeToolbar and CanvasZoomControls now import it. Each file keeps its own icon-size class constant so the sizing stays context-specific. CountBadge — added a variant prop ('default' | 'destructive'). The upgrade node badge now uses instead of the inline span — same visual output, consistent with how undo/redo badges are handled. i18n — wired useSafeLingui into both components and wrapped all user-visible strings. Used the same pattern as Toolbox and StageNode. The hook falls back to the English message string when no provider is mounted so there's no risk of regression for consumers who haven't added ApI18nProvider yet. |
…onents Ports both components from the internal flow editor into apollo-react as standalone, reusable canvas primitives. All Flow-app-specific logic (Zustand store access, internal hooks, telemetry, i18n) is replaced with explicit props and inline defaults. Includes Storybook stories covering all key states. Also adds style-dictionary to minimumReleaseAgeExclude in pnpm-workspace.yaml to unblock install (package has no time field in npm metadata). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1c807a1 to
3b2115d
Compare
| </> | ||
| )} | ||
|
|
||
| {canModifyCanvas && upgradeNodeAction && upgradeCount > 0 && ( |
There was a problem hiding this comment.
Thanks for addressing my earlier comments. Sorry I missed raising this one earlier. I think we are moving away from the upgrade UX in this toolbar.
But want to confirm with @soomin-uipath first since he has more context on the upgrade UX.
There was a problem hiding this comment.
Yeah, confirmed with Soomin that it has been removed via https://github.com/UiPath/flow-workbench/pull/1697. So we can remove this I think.
It actually raises another point to consider though... These components lock the UI library into flow-implementation-specific behavior (i.e. Build vs Evaluate modes and having the add sticky/node actions, and debug status handling). I wonder if it might make sense to have these components act more as a standard formatter / shell for any XYZ actions/modes that a consumer might want to add. So rather than accepting explicit props like showEvaluateToggle or onAddNode, we just render children that the consumer provides like the mode toggle (which can be its own helper component) or ToolbarButtons. The consumer is responsible for figuring out how they want to expose and handle modes / actions while we handle the presentation.
Summary
vertical(default) andhorizontalorientations.forwardRefadded for external DOM access (e.g. overlap detection). RemovesuseTranslation/CANVAS_NAMESPACE.canvas/components/index.tswith Storybook stories covering all key states.useElementsOverlaphook added and exported fromcanvas/hooks— ResizeObserver-based detection of whether two DOM elements overlap, intended for wiringCanvasModeToolbar↔CanvasZoomControlsauto-orientation.isTerminalDebugStatusto use the correctDebugStatusvalues ('success' | 'error'); previous values ('completed' | 'failed' | 'cancelled') would have left the canvas locked after debug completion and broken the Restart button.initializingprop (was never referenced in the component body).Storybook stories
CanvasModeToolbarCanvasZoomControlsTest plan
pnpm --filter @uipath/apollo-react tsc --noEmitpasses@uipath/apollo-windpnpm --filter @uipath/apollo-react run format:checkpasses🤖 Generated with Claude Code