Repository navigation
feat(api-spec): drag-to-resize split pane with persisted width - #7866
Conversation
Introduce a drag-to-resize split pane for the API Spec viewer and persist left pane width. Adds a new useDragResize hook to manage dragging state and clamping, plus UI: dragbar styles, a loading state for the Swagger preview (onComplete + loader), and memoization of the Swagger renderer. Wire up persisted widths via Redux: add updateApiSpecPanelLeftPaneWidth (apiSpec slice) and updateApiSpecTabLeftPaneWidth (tabs slice), and propagate leftPaneWidth / onLeftPaneWidthChange through ApiSpecPanel, OpenAPISpecTab, RequestTabPanel and SpecViewer. Misc: pass tab uid into OpenAPISpecTab and add .gstack/ to .gitignore.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughAdds a draggable, resizable left/right split for the API Spec viewer via a new ChangesApi Spec Panel: Resizable Split
Sequence DiagramsequenceDiagram
participant User
participant RequestTabPanel as RequestTabPanel
participant OpenAPISpecTab as OpenAPISpecTab
participant SpecViewer as SpecViewer
participant DragHook as useDragResize
participant Redux as Redux Store
participant Swagger as SwaggerUI
RequestTabPanel->>OpenAPISpecTab: render(collection, tabUid)
OpenAPISpecTab->>SpecViewer: render(content, leftPaneWidth, onLeftPaneWidthChange)
User->>SpecViewer: mousedown on dragbar
SpecViewer->>DragHook: onMouseDown()
DragHook->>DragHook: start dragging (dragWidth)
User->>DragHook: mousemove
DragHook->>SpecViewer: update dragWidth (visual feedback)
User->>DragHook: mouseup
DragHook->>Redux: onWidthChange(finalWidth)
Redux->>OpenAPISpecTab: state updated (apiSpecLeftPaneWidth)
OpenAPISpecTab->>SpecViewer: leftPaneWidth prop updated
SpecViewer->>Swagger: render with onComplete callback
Swagger->>SpecViewer: onComplete() -> set swaggerReady
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (4)
packages/bruno-app/src/components/OpenAPISpecTab/index.js (1)
42-50: Drop the no-depsuseEffectand assign the ref inline.The effect runs on every render anyway and just mirrors the latest
collectionenv fields into a ref. Assigning during render is the canonical "latest value" pattern, removes the effect schedule, and removes a per-render closure allocation.♻️ Proposed refactor
const envContextRef = useRef({}); - useEffect(() => { - envContextRef.current = { - activeEnvironmentUid: collection?.activeEnvironmentUid, - environments: collection?.environments, - runtimeVariables: collection?.runtimeVariables, - globalEnvironmentVariables: collection?.globalEnvironmentVariables - }; - }); + envContextRef.current = { + activeEnvironmentUid: collection?.activeEnvironmentUid, + environments: collection?.environments, + runtimeVariables: collection?.runtimeVariables, + globalEnvironmentVariables: collection?.globalEnvironmentVariables + };As per coding guidelines: "Avoid useEffect unless absolutely needed. Prefer derived state, event handlers."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-app/src/components/OpenAPISpecTab/index.js` around lines 42 - 50, Remove the no-deps useEffect that mirrors collection into the ref and instead assign envContextRef.current directly during render; replace the useEffect block that references envContextRef, useRef, and collection with a direct assignment to envContextRef.current = { activeEnvironmentUid: collection?.activeEnvironmentUid, environments: collection?.environments, runtimeVariables: collection?.runtimeVariables, globalEnvironmentVariables: collection?.globalEnvironmentVariables } so the ref always holds the latest collection values without scheduling an effect or allocating a per-render closure.packages/bruno-app/src/components/ApiSpecPanel/SpecViewer.js (1)
53-61: ResetswaggerReadysynchronously to avoid a brief flash of the previous preview.
useEffectfires after the newcontenthas already been committed to the Swagger child, so during the gap between commit and the effect re-render the user can briefly see the old (or transitioning) Swagger DOM before the overlay reappears. Tracking previous content with a ref and updating during render eliminates the gap.♻️ Proposed refactor
- const [swaggerReady, setSwaggerReady] = useState(false); - useEffect(() => { - setSwaggerReady(false); - }, [content]); + const [swaggerReady, setSwaggerReady] = useState(false); + const prevContentRef = useRef(content); + if (prevContentRef.current !== content) { + prevContentRef.current = content; + setSwaggerReady(false); + } const handleSwaggerComplete = useCallback(() => { requestAnimationFrame(() => { requestAnimationFrame(() => setSwaggerReady(true)); }); }, []);As per coding guidelines: "Avoid useEffect unless absolutely needed. Prefer derived state, event handlers."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-app/src/components/ApiSpecPanel/SpecViewer.js` around lines 53 - 61, Replace the post-paint useEffect that resets swaggerReady with a synchronous update: track previous content using a ref (prevContentRef) and call setSwaggerReady(false) inside a useLayoutEffect that watches content so the reset happens before the browser paints (eliminating the flash); keep handleSwaggerComplete as-is but ensure prevContentRef is updated to the new content within that layout-effect so the overlay is shown only after the new Swagger has signaled completion.packages/bruno-app/src/hooks/useDragResize/index.js (2)
80-87: Attachmousemove/mouseuponly while dragging.These listeners live on
documentfor the lifetime of the hook even when no drag is in progress, so every mouse motion in the app fireshandleMouseMovejust to early-return. They also re-register wheneveronWidthChange(and hencehandleMouseUp) changes identity in the parent. Bind them ononMouseDownand tear them down inhandleMouseUpinstead.♻️ Suggested wiring
- const onMouseDown = useCallback( - (e) => { - e.preventDefault(); - const rect = containerRef.current?.getBoundingClientRect(); - const seed = width != null ? width : rect ? rect.width / 2 : null; - dragWidthRef.current = seed; - setDragWidth(seed); - draggingRef.current = true; - setDragging(true); - }, - [containerRef, width] - ); + const onMouseDown = useCallback( + (e) => { + e.preventDefault(); + const rect = containerRef.current?.getBoundingClientRect(); + const seed = width != null ? width : rect ? rect.width / 2 : null; + dragWidthRef.current = seed; + setDragWidth(seed); + draggingRef.current = true; + setDragging(true); + document.addEventListener('mousemove', handleMouseMove); + document.addEventListener('mouseup', handleMouseUp); + }, + [containerRef, width, handleMouseMove, handleMouseUp] + ); @@ - useEffect(() => { - document.addEventListener('mousemove', handleMouseMove); - document.addEventListener('mouseup', handleMouseUp); - return () => { - document.removeEventListener('mousemove', handleMouseMove); - document.removeEventListener('mouseup', handleMouseUp); - }; - }, [handleMouseMove, handleMouseUp]); + // Detach on unmount in case the component disappears mid-drag. + useEffect(() => { + return () => { + document.removeEventListener('mousemove', handleMouseMove); + document.removeEventListener('mouseup', handleMouseUp); + }; + }, [handleMouseMove, handleMouseUp]);And inside
handleMouseUp, remove the listeners after a successful drag:draggingRef.current = false; + document.removeEventListener('mousemove', handleMouseMove); + document.removeEventListener('mouseup', handleMouseUp); const finalWidth = dragWidthRef.current;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-app/src/hooks/useDragResize/index.js` around lines 80 - 87, Remove the always-active document listeners in the useEffect and instead register 'mousemove' and 'mouseup' on document when a drag starts (in the function that handles mousedown / start dragging) and unregister them inside handleMouseUp (and also on component unmount). Specifically: stop adding listeners in the existing useEffect block, add document.addEventListener('mousemove', handleMouseMove) and document.addEventListener('mouseup', handleMouseUp) inside the mousedown/start-drag handler (e.g., handleMouseDown/startDrag), and remove them at the end of handleMouseUp; also ensure a cleanup in a useEffect that removes listeners on unmount (guarded by refs) so changing onWidthChange/handleMouseUp identity doesn't leak listeners.
91-102: Defer the re-clamp dispatch to avoid aResizeObserverloop warning.
onWidthChange(clamped)is invoked synchronously inside theResizeObservercallback. If the resulting state update changes the container's layout in the same frame, browsers emitResizeObserver loop completed with undelivered notifications. Wrapping the dispatch inrequestAnimationFrame(and cancelling on cleanup) sidesteps it cheaply.♻️ Sketch
useEffect(() => { if (width == null || !containerRef.current) return; const el = containerRef.current; + let rafId = 0; const ro = new ResizeObserver(() => { - const clamped = clamp(width); - if (clamped !== width && onWidthChange) { - onWidthChange(clamped); - } + cancelAnimationFrame(rafId); + rafId = requestAnimationFrame(() => { + const clamped = clamp(width); + if (clamped !== width && onWidthChange) { + onWidthChange(clamped); + } + }); }); ro.observe(el); - return () => ro.disconnect(); + return () => { + cancelAnimationFrame(rafId); + ro.disconnect(); + }; }, [width, clamp, onWidthChange, containerRef]);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-app/src/hooks/useDragResize/index.js` around lines 91 - 102, The ResizeObserver callback inside the useEffect in useDragResize currently calls onWidthChange(clamped) synchronously and can trigger a "ResizeObserver loop" warning; instead, schedule the dispatch inside requestAnimationFrame (store the frame id in a variable) when clamped !== width and onWidthChange exists, and on cleanup cancel the pending frame with cancelAnimationFrame in addition to ro.disconnect(); keep the existing clamp, containerRef, ro.observe and ro.disconnect logic but replace the direct onWidthChange call with an rAF-scheduled call and clear that rAF on effect cleanup.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/bruno-app/src/components/ApiSpecPanel/SpecViewer.js`:
- Around line 53-61: Replace the post-paint useEffect that resets swaggerReady
with a synchronous update: track previous content using a ref (prevContentRef)
and call setSwaggerReady(false) inside a useLayoutEffect that watches content so
the reset happens before the browser paints (eliminating the flash); keep
handleSwaggerComplete as-is but ensure prevContentRef is updated to the new
content within that layout-effect so the overlay is shown only after the new
Swagger has signaled completion.
In `@packages/bruno-app/src/components/OpenAPISpecTab/index.js`:
- Around line 42-50: Remove the no-deps useEffect that mirrors collection into
the ref and instead assign envContextRef.current directly during render; replace
the useEffect block that references envContextRef, useRef, and collection with a
direct assignment to envContextRef.current = { activeEnvironmentUid:
collection?.activeEnvironmentUid, environments: collection?.environments,
runtimeVariables: collection?.runtimeVariables, globalEnvironmentVariables:
collection?.globalEnvironmentVariables } so the ref always holds the latest
collection values without scheduling an effect or allocating a per-render
closure.
In `@packages/bruno-app/src/hooks/useDragResize/index.js`:
- Around line 80-87: Remove the always-active document listeners in the
useEffect and instead register 'mousemove' and 'mouseup' on document when a drag
starts (in the function that handles mousedown / start dragging) and unregister
them inside handleMouseUp (and also on component unmount). Specifically: stop
adding listeners in the existing useEffect block, add
document.addEventListener('mousemove', handleMouseMove) and
document.addEventListener('mouseup', handleMouseUp) inside the
mousedown/start-drag handler (e.g., handleMouseDown/startDrag), and remove them
at the end of handleMouseUp; also ensure a cleanup in a useEffect that removes
listeners on unmount (guarded by refs) so changing onWidthChange/handleMouseUp
identity doesn't leak listeners.
- Around line 91-102: The ResizeObserver callback inside the useEffect in
useDragResize currently calls onWidthChange(clamped) synchronously and can
trigger a "ResizeObserver loop" warning; instead, schedule the dispatch inside
requestAnimationFrame (store the frame id in a variable) when clamped !== width
and onWidthChange exists, and on cleanup cancel the pending frame with
cancelAnimationFrame in addition to ro.disconnect(); keep the existing clamp,
containerRef, ro.observe and ro.disconnect logic but replace the direct
onWidthChange call with an rAF-scheduled call and clear that rAF on effect
cleanup.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0e160176-fb7c-43c7-9790-77a8205a2a48
📒 Files selected for processing (10)
.gitignorepackages/bruno-app/src/components/ApiSpecPanel/Renderers/Swagger/index.jspackages/bruno-app/src/components/ApiSpecPanel/SpecViewer.jspackages/bruno-app/src/components/ApiSpecPanel/StyledWrapper.jspackages/bruno-app/src/components/ApiSpecPanel/index.jspackages/bruno-app/src/components/OpenAPISpecTab/index.jspackages/bruno-app/src/components/RequestTabPanel/index.jspackages/bruno-app/src/hooks/useDragResize/index.jspackages/bruno-app/src/providers/ReduxStore/slices/apiSpec.jspackages/bruno-app/src/providers/ReduxStore/slices/tabs.js
… management - Updated SpecViewer to enhance loading state handling for Swagger content, ensuring a smoother user experience by preventing flashes of unrendered content. - Refactored OpenAPISpecTab to streamline environment context management, optimizing the loading process for OpenAPI specifications. - Simplified the useDragResize hook by removing unnecessary references and improving the handling of drag events, ensuring better performance and responsiveness during resizing actions.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/bruno-app/src/hooks/useDragResize/index.spec.js (1)
116-129: ⚡ Quick winAdd a no-move drag commit regression test for out-of-range persisted widths.
Please add a case where
widthstarts out of bounds, thenonMouseDown→ immediatemouseup(nomousemove), and assert the committed value is clamped. This path isn’t covered today and would catch seed/commit edge regressions quickly.As per coding guidelines: "Cover both the 'happy path' and the realistically problematic paths."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-app/src/hooks/useDragResize/index.spec.js` around lines 116 - 129, Add a new unit test to cover the no-move commit when the initial width is out of allowed bounds: use renderDragResize with a starting width outside the allowed range, call result.current.dragbarProps.onMouseDown(...) and then immediately fireMouse('mouseup', <position>) without any mousemove, and assert onWidthChange was called once with the clamped value (not the raw out-of-range input) and that result.current.dragging is false and result.current.dragWidth is null; reference the existing test helpers renderDragResize, fireMouse and the dragbarProps.onMouseDown handler to implement this regression test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/bruno-app/src/hooks/useDragResize/index.js`:
- Around line 61-63: The seeded width assigned in useDragResize (seed computed
from width or rect) must be clamped to the current allowed range before
persisting; update the seed calculation in the onMouseDown/start logic to
compute seed = width != null ? width : rect ? rect.width / 2 : null, then
immediately clamp it to the pane bounds (use your existing min/max or compute
from container/resizer logic) before setting dragWidthRef.current and calling
setDragWidth(seedClamped) so an immediate mouseup cannot commit an out-of-bounds
width.
---
Nitpick comments:
In `@packages/bruno-app/src/hooks/useDragResize/index.spec.js`:
- Around line 116-129: Add a new unit test to cover the no-move commit when the
initial width is out of allowed bounds: use renderDragResize with a starting
width outside the allowed range, call
result.current.dragbarProps.onMouseDown(...) and then immediately
fireMouse('mouseup', <position>) without any mousemove, and assert onWidthChange
was called once with the clamped value (not the raw out-of-range input) and that
result.current.dragging is false and result.current.dragWidth is null; reference
the existing test helpers renderDragResize, fireMouse and the
dragbarProps.onMouseDown handler to implement this regression test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7dd13019-fd4e-43fc-9eae-6c8cbbf9923a
📒 Files selected for processing (4)
packages/bruno-app/src/components/ApiSpecPanel/SpecViewer.jspackages/bruno-app/src/components/OpenAPISpecTab/index.jspackages/bruno-app/src/hooks/useDragResize/index.jspackages/bruno-app/src/hooks/useDragResize/index.spec.js
✅ Files skipped from review due to trivial changes (1)
- packages/bruno-app/src/components/ApiSpecPanel/SpecViewer.js
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/bruno-app/src/components/OpenAPISpecTab/index.js
- Updated the useDragResize hook to clamp the width seed value, ensuring it stays within defined bounds during drag events. - Added a new test case to verify that an out-of-bounds width seed is correctly clamped and persisted on immediate mouseup, enhancing the robustness of the drag-resize functionality.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/bruno-app/src/hooks/useDragResize/index.js (1)
92-105: ⚡ Quick win
onWidthChangein deps can still cause observer rebuilds if callers don't memoize.The
widthRefpattern was introduced specifically to avoid observer teardown on every width change (line 90–91), butonWidthChangeis still a plain dep. A future caller that doesn't wrap its callback inuseCallbackwill rebuild the observer on every render. Applying the same ref trick here closes that gap consistently.♻️ Proposed refactor
const widthRef = useRef(width); widthRef.current = width; +const onWidthChangeRef = useRef(onWidthChange); +onWidthChangeRef.current = onWidthChange; const hasWidth = width != null; useEffect(() => { if (!hasWidth || !containerRef.current) return; const ro = new ResizeObserver(() => { const clamped = clamp(widthRef.current); - if (clamped !== widthRef.current && onWidthChange) { - onWidthChange(clamped); + if (clamped !== widthRef.current && onWidthChangeRef.current) { + onWidthChangeRef.current(clamped); } }); ro.observe(containerRef.current); return () => ro.disconnect(); - }, [hasWidth, clamp, onWidthChange, containerRef]); + }, [hasWidth, clamp, containerRef]);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-app/src/hooks/useDragResize/index.js` around lines 92 - 105, The ResizeObserver is still rebuilt when callers don't memoize onWidthChange; create an onWidthChangeRef (useRef) and assign onWidthChangeRef.current = onWidthChange inside the hook, then use onWidthChangeRef.current inside the ResizeObserver callback instead of the onWidthChange variable; update the effect dependencies to remove onWidthChange and include only hasWidth, clamp, containerRef (or an onWidthChangeRef if you prefer) so the observer won't tear down on every render while preserving correct calls to onWidthChange.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/bruno-app/src/hooks/useDragResize/index.js`:
- Around line 92-105: The ResizeObserver is still rebuilt when callers don't
memoize onWidthChange; create an onWidthChangeRef (useRef) and assign
onWidthChangeRef.current = onWidthChange inside the hook, then use
onWidthChangeRef.current inside the ResizeObserver callback instead of the
onWidthChange variable; update the effect dependencies to remove onWidthChange
and include only hasWidth, clamp, containerRef (or an onWidthChangeRef if you
prefer) so the observer won't tear down on every render while preserving correct
calls to onWidthChange.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7610c259-a880-4982-b3f3-61702f9cbc74
📒 Files selected for processing (2)
packages/bruno-app/src/hooks/useDragResize/index.jspackages/bruno-app/src/hooks/useDragResize/index.spec.js
Delete the .gstack/ ignore entry and normalize the packages/bruno-converters/dist entry in .gitignore (deduplicated). No code changes; just tidy up ignore rules.
…uno#7866) * Add drag-resize split pane for API Spec viewer Introduce a drag-to-resize split pane for the API Spec viewer and persist left pane width. Adds a new useDragResize hook to manage dragging state and clamping, plus UI: dragbar styles, a loading state for the Swagger preview (onComplete + loader), and memoization of the Swagger renderer. Wire up persisted widths via Redux: add updateApiSpecPanelLeftPaneWidth (apiSpec slice) and updateApiSpecTabLeftPaneWidth (tabs slice), and propagate leftPaneWidth / onLeftPaneWidthChange through ApiSpecPanel, OpenAPISpecTab, RequestTabPanel and SpecViewer. Misc: pass tab uid into OpenAPISpecTab and add .gstack/ to .gitignore. * Refactor SpecViewer and OpenAPISpecTab for improved loading and state management - Updated SpecViewer to enhance loading state handling for Swagger content, ensuring a smoother user experience by preventing flashes of unrendered content. - Refactored OpenAPISpecTab to streamline environment context management, optimizing the loading process for OpenAPI specifications. - Simplified the useDragResize hook by removing unnecessary references and improving the handling of drag events, ensuring better performance and responsiveness during resizing actions. * Enhance useDragResize hook to clamp width seed and improve test coverage - Updated the useDragResize hook to clamp the width seed value, ensuring it stays within defined bounds during drag events. - Added a new test case to verify that an out-of-bounds width seed is correctly clamped and persisted on immediate mouseup, enhancing the robustness of the drag-resize functionality. * Remove .gstack/ from .gitignore Delete the .gstack/ ignore entry and normalize the packages/bruno-converters/dist entry in .gitignore (deduplicated). No code changes; just tidy up ignore rules.
Description
JIRA
Adds a draggable divider between the spec source (CodeMirror) and the rendered preview (SwaggerUI) in both the API Designer (
ApiSpecPanel) and the read-only OpenAPI tab (OpenAPISpecTab). Width persists across opens — per-spec for the designer, per-tab for the OpenAPI tab. Double-click the divider to reset to the 50/50 default.Screen.Recording.2026-04-27.at.6.02.50.PM.mov
What changed
useDragResizehook (hooks/useDragResize) drives the dragbar interaction, clamping, andResizeObserver-based re-clamp on container size changes.updateApiSpecPanelLeftPaneWidth(per-spec, in theapiSpecslice) andupdateApiSpecTabLeftPaneWidth(per-tab, in thetabsslice). They're separate because the storage lifetimes differ —per-spec width survives close/reopen of the designer; per-tab width is bound to the tab.
SpecVieweris now controlled byleftPaneWidth+onLeftPaneWidthChangeprops; the parent component owns where the width is stored.Bonus fixes pulled into this PR
OpenAPISpecTabno longer re-fetches on unrelated re-renders. PreviouslyloadSpec'suseCallbackdeps includedcollection.environments,collection.runtimeVariables, andcollection.globalEnvironmentVariables— all of which are rebuilt as fresh references on everyRequestTabPanelrender viaproduce(...). The result:setIsLoading(true)would fire on every resize commit (and any other parent re-render), unmountingSpecViewerand causing both panes to flash. Env context now flows through a ref;loadSpeconly changes whenpathname,uid, orsourceUrlchanges.onComplete(plus a 2-RAF tail so the operation list has time to paint).Swaggerwrapped inReact.memoso the preview doesn't re-render on every parent state change during drag.Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit
New Features
Style
Tests
Chores