Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opposite edge resizing (left/right or top/bottom) #128

Open
Nantris opened this issue Sep 12, 2022 · 0 comments
Open

Opposite edge resizing (left/right or top/bottom) #128

Nantris opened this issue Sep 12, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@Nantris
Copy link

Nantris commented Sep 12, 2022

Is your feature request related to a problem? Please describe.
The problem this would solve is related to resizing a positioned space that's always centered. In that case, resizing only one edge would leave the space looking lopsided.

Describe the solution you'd like
It would be great if dragging the left side to increase the width could increase the right side an equal amount so that the space would stay visually centered. For example, the way the Goto Box or Command Box in Chrome's devtools is centered (but with resizability and vertical-only repositionability)

Related - I also mentioned in #19 the desire for per-edge controls for whether the opposite edge would also be resized. Honestly, this request comes from a bug in our current implementation which I actually rather prefer to the originally intended behavior. When expanding the box from the top, it expands the bottom downward - but when expanding from the bottom, it doesn't move the top. This ended up feeling more predictable and pleasant to me, despite actually being a bug - almost like a semi-anchored space for lack of a better descriptor.

Additional context
@aeagle you can see how we use another library now to achieve these ends, but I'd love to convert us over to react-spaces for more ergonomic, maintainable code. Our current solution is also not StrictMode compatible.

  1. Change layout from sidebar mode to floating space mode
    image

  2. Resize edges to see opposite edge resizing in action
    image

@aeagle aeagle added the enhancement New feature or request label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants