Slack

Building Custom Animations in the Workflow Builder

Dec 5, 2023
Building Custom Animations in the Workflow Builder
SummaryAI, from the source post

This post details the technical implementation of custom drag-and-drop animations for Slack's Workflow Builder. It addresses challenges with the react-beautiful-dnd library by re-architecting the drag-and-drop context to wrap the entire builder page and support two separate lists. Key technical contributions include: creating custom helper functions to translate dragged steps between lists with different sizes, implementing dynamic placeholders by rendering custom segments based on drag position, solving hint box spacing issues by using `onBeforeCapture` to hide hint boxes before dragging, and adding a tilt animation using `requestAnimationFrame` for a more engaging user experience.