Skip to content

Add native queries and remove react-container-query#1504

Merged
abcampo-iry merged 1 commit into
mainfrom
issues/1500
Jun 19, 2026
Merged

Add native queries and remove react-container-query#1504
abcampo-iry merged 1 commit into
mainfrom
issues/1500

Conversation

@abcampo-iry

Copy link
Copy Markdown
Contributor

Summary

  • Replace react-container-query with a small internal ResizeObserver hook for the editor container breakpoint.
  • Keep existing native CSS container-query layout behavior unchanged.
  • Preserve the current 720px responsive behavior for editor/output resizing:
    • desktop: side-by-side layout, right resize handle, 50% width / 100% height
    • stacked: column layout, bottom resize handle, 100% width / 50% height
  • Remove the unused containerQueries.js helper and the react-container-query dependency.

@abcampo-iry abcampo-iry marked this pull request as ready for review June 18, 2026 16:11
Copilot AI review requested due to automatic review settings June 18, 2026 16:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Replaces the react-container-query dependency with an internal ResizeObserver-based hook to detect the editor container’s “desktop” breakpoint (720px) while keeping the existing CSS container-query layout behavior and editor/output resizing UX.

Changes:

  • Removed react-container-query (and related transitive packages) and deleted the now-unused containerQueries.js helper.
  • Added useContainerMinWidth hook to detect whether a container meets a minimum width threshold.
  • Updated Project to use the new hook and extended unit tests to cover the desktop vs stacked resize-handle behavior.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Removes react-container-query dependency.
yarn.lock Drops react-container-query and now-unused transitive dependencies.
src/utils/containerQueries.js Removes obsolete container-query config helper.
src/hooks/useContainerMinWidth.js Introduces internal container min-width detection hook using ResizeObserver.
src/hooks/useContainerMinWidth.test.js Adds unit tests for the new hook behavior and cleanup.
src/components/Editor/Project/Project.jsx Switches breakpoint logic from useContainerQuery to useContainerMinWidth(720).
src/components/Editor/Project/Project.test.js Mocks the new hook and adds assertions for the desktop resize handle/style behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/hooks/useContainerMinWidth.js
@abcampo-iry abcampo-iry changed the title add native queries and remove react-container-query Add native queries and remove react-container-query Jun 19, 2026

@DNR500 DNR500 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks for doing this!

@abcampo-iry abcampo-iry merged commit 3c97fa0 into main Jun 19, 2026
9 checks passed
@abcampo-iry abcampo-iry deleted the issues/1500 branch June 19, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants