Skip to content

Add imperative resizing feature#17

Merged
giusdp merged 2 commits intogiusdp:mainfrom
kantum:main
Feb 8, 2026
Merged

Add imperative resizing feature#17
giusdp merged 2 commits intogiusdp:mainfrom
kantum:main

Conversation

@kantum
Copy link
Contributor

@kantum kantum commented Feb 7, 2026

I needed to implement double click to resize my panes to default.

I didn't find a way to do it, does this implementation follows your philosophy?

Copilot AI review requested due to automatic review settings February 7, 2026 23:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new server-pushed resize event to imperatively resize a pane (by percentage) and includes a Demo LiveView page showcasing the behavior.

Changes:

  • Documented server-side events (collapse, expand, resize) in LivePane module docs.
  • Added a new resize server event handler in the pane JS hook to resize a pane to a target percentage (with clamping).
  • Added a new demo route + LiveView/page to demonstrate imperative resizing.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/live_pane.ex Documents the new resize server event alongside existing server-driven events.
assets/js/live_pane/hooks/pane.ts Implements the client-side handler and layout adjustment logic for server-pushed resize.
demo/lib/demo_web/router.ex Adds a /resize LiveView route in the demo app.
demo/lib/demo_web/components/layouts.ex Adds navigation link to the new resize demo page.
demo/lib/demo_web/live/resize_live.ex Demo LiveView that pushes the resize event from the server.
demo/lib/demo_web/live/resize_live.html.heex Demo UI for selecting a size and triggering the server-side resize.

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

@giusdp
Copy link
Owner

giusdp commented Feb 8, 2026

Hey thanks a ton for the contribution!! Soon I'll review and merge 😄

btw I don't remember enabling any automatic copilot review wtf

@giusdp giusdp merged commit 42f451c into giusdp:main Feb 8, 2026
3 of 4 checks passed
@giusdp
Copy link
Owner

giusdp commented Feb 8, 2026

Awesome work, thank you!

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