Fluid layout customization with Splits
Replit'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.
Related posts
- Building Custom Animations in the Workflow Builder
Slack Engineering mediumAdeptSlack'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.
- 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.
- Managing Focus Transitions in Slack
Slack Engineering mediumAdeptSlack built FocusTransitionManager, a React Context-based coordinator that lets sender components request focus moves via transitionFocusTo({focusKey}) and receiver components claim them via shouldTransitionFocus, so keyboard and screen-reader users don't lose focus when React re-renders remove the focused element. Extensions include focusMetadata for targeting specific items, forceFocus for non-keyboard users, an additionalCondition callback to defer focus until data loads, timeouts to reset stale requests, and first-request-wins handling of concurrent requests. It was adopted across 100+ user flows within months, wired into the routing layer to focus the likely next action in each view, and built into Modal so all menus, popovers and modals restore focus reliably.
- The uphill climb of making diff lines performant
GitHub Engineering mediumAdeptGitHub rebuilt the React diff-line components in the pull request Files changed tab after large PRs pushed the JavaScript heap past 1 GB, DOM counts above 400,000 and INP to unusable levels. The v2 design cut per-line React components from eight to two, replaced per-line event handlers with a single top-level handler keyed on data attributes, and moved commenting and menu state into conditionally rendered children. It also confined useEffect to the file level and switched to O(1) Map-based lookups. On a 10,000-line split diff this cut rendered components by 74%, memory by about 50% and INP from ~450 ms to ~100 ms. For p95+ PRs, TanStack Virtual windowing gave a 10x heap and DOM reduction and 40–80 ms INP, supplemented by cheaper CSS selectors, GPU transforms, partial hydration and progressive diff loading.
- Introducing the Replit Desktop App
Replit mediumAdeptReplit now ships a native desktop app for macOS, Windows and Linux, centered on the IDE workspace, with multiple windows, editor shortcuts the browser would intercept (Cmd/Ctrl+T/W), deep linking and native Chromium devtools. It is built on Electron rather than React Native, which lacked Linux support, or Tauri, which was missing deep linking and native APIs for remotely loaded URLs and brought cross-platform rendering differences and Rust iteration costs. The app remotely loads part of the website, exposes Node APIs to the web client, and is packaged and signed per platform and architecture with Electron Forge in GitHub Actions. Auto-updates go through a Hazel-based release server deployed on Replit.