Repository navigation
feat(flow): make designer cards resizable with a detail view - #1099
Open
zheng1114567 wants to merge 1 commit into
Open
zheng1114567 wants to merge 1 commit into
zheng1114567 wants to merge 1 commit into
Conversation
…rame Cards were fixed at 244px wide, so a 100% canvas only fit a handful of steps. Cards now default to 200px and a selected card shows the same resize frame MiniMax Design uses (React Flow's NodeResizer): four round corner handles plus four edge strips, sized in screen pixels so they stay constant while the canvas zooms. Corners move both edges, sides move one, clamping to 180-480px wide and 96-640px tall while pinning the opposite edge. Tall cards spend the extra room on the node's own detail (role brief, script body, nested steps, approval ask) instead of whitespace; untouched cards keep their content-driven height and the footprint persists with the workflow. Layout heuristics and drop/AI camera centering use the new default width.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cards were fixed at 244px wide with no way to resize them. At 100% zoom about five cards fit on screen, and the only way to see more was to zoom the whole canvas out.
Changes
NodeResizer): four round corner handles and four edge strips. Corners resize both axes, edges one axis, and when a size hits its limit the opposite edge stays put. Handle size is divided by the canvas zoom, so it keeps the same on-screen size when you zoom in.node.size {w,h}.domain.WorkflowNodegets an optionalsizefield so it survives a round trip through the API.How I checked
node --test tests/*.test.mjsinwebtest: 217 passed.Screenshots of the frame and the expanded detail view are available if useful.