Building Custom Animations in the Workflow Builder
Slack's Workflow Builder added drag-and-drop from a new steps sidebar into workflows by moving react-beautiful-dnd's DragDropContext to wrap the whole builder page, with two draggable/droppable lists. A custom context provider holds drag state fed by the library's responders. On top of that the team built several workarounds: custom transforms to re-center differently sized steps, DOM-measured dynamic placeholders the library doesn't support, and a velocity-based tilt effect driven by requestAnimationFrame. A key lesson was hiding hint boxes in onBeforeCapture rather than onBeforeDragStart, because only the former runs before the library measures the DOM.
Related posts
- Fluid layout customization with Splits
Replit mediumAdeptReplit's Workspace now supports Splits, a tiling layout where tabs, panes and files from the filetree can be dragged onto five hit areas of any pane (header to merge, or four conical-section quadrants to split), plus maximize and float modes. The design favours predictability, learnability and fluidity: explicit state visualization, a visible 50px detach radius, continuous resizing during drag, and few special cases, such as always placing auto-created webviews in the top-right node. To get fluid drag behaviour in React, the team used jotai to skip rerenders during drag state updates and wrote custom low-level mouse handlers instead of using a tiling library. Layout is stored as a multi-node tree of Splits and PaneGroups, which drives resize behaviour and simple placement heuristics.
- Making Your React Native Gestures Feel Natural
Shopify Engineering mediumAdeptDraggable UI in React Native feels more natural when gesture end-handling accounts for release velocity, not just finger position. Using the Shop app's bottom Sheet as an example, adding a multiplied `velocityY` to the final position lets quick flicks open or close the sheet. Replacing a fixed 600 ms timing animation with `withSpring` makes the settle animation respect distance and momentum. Dividing drag distance when pulling past the open position adds rubber-band resistance that signals the sheet can't go further.
- Behind the feature: comments, contextually
Figma mediumAdept
Adding general and contextual (canvas-anchored) comments to Figma Community files turned out to be harder on interaction design than on code reuse. A bug bash surfaced UX problems that led to a lightbox-style modal replacing a fullscreen view that was easy to enter but hard to leave, plus pin icons, "See in context" hints and a scroll-back button for contextual comments in the feed. On the frontend, smooth panning between comment locations came from exposing animation parameters in Figma's Skew-based viewer. The hover expansion avoids canvas re-renders by keeping the viewer at full size and shrinking an overlaid border mask, and an intermediary state converts coordinates so CSS can animate the switch from absolute to fixed positioning.
- Version control: Three ways Figma explored horizontal scrolling
Figma mediumAdept
Adding horizontal scrolling to Figma's Layers panel was harder than expected because the list is virtualized (only visible rows render), rows are interactive (hide, lock, collapse, rename), and layer names vary in length. Three prototypes were rejected: sticky edge icons for out-of-view parents, which needed opaque backgrounds that clashed with the row structure; full auto-scroll to a selected layer, which disoriented users; and a rename text box that expanded while scrolling, which flickered because resizing was done in JavaScript. The shipped design leaves blank space above visible layers and resets an in-progress rename on scroll. It auto-scrolls only when a selected layer overflows the left edge by 50px or more, using an invisible render of unrendered rows to measure them for precise alignment.
- Rendering huge pull requests in the GitHub Copilot app
GitHub Engineering mediumAdeptThe GitHub Copilot app's pull request view stays responsive on a 2,200-file, million-line diff with 400+ review comments by splitting document height into two geometries: exact, precomputed prefix-summed code rows and lazily measured dynamic blocks for comments, drafts and composers. A single idle- and scroll-gated measurement pass scoped to about 2400px around the viewport replaces per-block ResizeObserver write-back, which caused feedback loops. Observers only flag blocks for re-measurement, except for user-caused resizes, which commit synchronously at most once per frame. Identity-based scroll anchoring keeps corrections small, and a cache of recent diffs prevents an instantly drawn shell from sitting around an empty diff. Bugs were found with permanent in-app probes asserted as CI budgets and an autonomous headless change→measure→improve loop.