Skip to content

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

Open
@Nantris

Description

@Nantris

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions