bvaughn / react-resizable-panels

https://react-resizable-panels.vercel.app/
MIT License
3.87k stars 135 forks source link

Enter key keyboard interaction doesn't work according to Window Splitter Spec #213

Closed dawa-coursera closed 10 months ago

dawa-coursera commented 10 months ago

Hi, we're trying to use this library but the Enter key keyboard doesn't seem to work as specified by the Window Splitter spec. Any plans to support this?

Enter: If the primary pane is not collapsed, collapses the pane. If the pane is collapsed, restores the splitter to its previous position.

bvaughn commented 10 months ago

I have an e2e test verifying the "Enter" behavior here: https://github.com/bvaughn/react-resizable-panels/blob/main/packages/react-resizable-panels-website/tests/WindowSplitter.spec.ts

I was improperly collapsing between min size, not collapsed size. I'll fix that.

That being said, I don't think I will aim to support this part (for now):

If the pane is collapsed, restores the splitter to its previous position.

I think for now that collapsed panels will just restore to their minimum size.

bvaughn commented 10 months ago

Addressed with 4c01bf2; will publish shortly.

bvaughn commented 10 months ago

Fix published in @0.0.59

dawa-coursera commented 10 months ago

Thanks @bvaughn! Will test the fix.

dawa-coursera commented 10 months ago

Hi @bvaughn, is the issue here just bandwidth and prioritization, or is this something that would not be feasible with the library?

That being said, I don't think I will aim to support this part (for now): If the pane is collapsed, restores the splitter to its previous position.

bvaughn commented 10 months ago

Mostly the former.