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

Snap to #228

Open
chrisgoringe opened this issue Oct 29, 2024 · 15 comments
Open

Snap to #228

chrisgoringe opened this issue Oct 29, 2024 · 15 comments
Milestone

Comments

@chrisgoringe
Copy link
Owner

Controller window snaps to edges of the window or other controller windows.

This is 'sticky' - repositioning due to changing window size should retain 'stick' wherever possible.

Think through whether 'stuck' controllers should move together.

@chrisgoringe
Copy link
Owner Author

See discussion #224 (comment)

@chrisgoringe chrisgoringe added this to the To be roadmapped milestone Oct 29, 2024
@JorgeR81
Copy link

1 - If a Controller border touches a canvas border, it will always do so, unless the user changes this ( by dragging it or resizing it )

2 - The position for the Controller will be changed, when needed, to to follow rule 1

3 - If changing the position is not enough to fulfill rule 1, dimensions will be changed.

This last one is in case the Controller has full height ( if 2 opposite canvas borders are touched by the controller ).
To fulfill rule 1, then you need to increase height.


To update this for multiple Controllers we need 2 extra rules:

4 - If controllers share borders, they will be considered as a single controller, in respect to the previous rules.

5 - If rules 3 and 4 are applied, the dimension change will be splitted across these controllers.

The practical example would be having Controllers stacked vertically in 2 rows, across the full height.
If I go fullscreen I would want both rows to increase proportionally.

Use case example:
( I would use this configuration to optimize space, because slider panels require less width )

panels

@chrisgoringe
Copy link
Owner Author

chrisgoringe commented Oct 29, 2024 via email

@JorgeR81
Copy link

Think through whether 'stuck' controllers should move together.

What about if I move a controller which has other controllers snapped to
it? I think they move together? But then there needs to be a way to
separate them...


  • To drag multiple windows snapped together, I would drag the window on the top / left.

  • To split them apart, I would drag one of the other windows.

@chrisgoringe
Copy link
Owner Author

chrisgoringe commented Oct 29, 2024 via email

@chrisgoringe
Copy link
Owner Author

What about size? I'm assuming that two controllers stuck together will be independantly resizable.

But I'm not sure if that's right for resizing perpendicular to the 'stick' direction (ie width of vertically stacked, height of horizontally stacked)

@JorgeR81
Copy link

JorgeR81 commented Oct 29, 2024

Snapped windows would only resize together, if the added shape is as rectangle.

Like this:

rs

@chrisgoringe chrisgoringe modified the milestones: To be roadmapped, 1.2 Oct 29, 2024
@JorgeR81
Copy link

JorgeR81 commented Oct 29, 2024

To resize Controllers independently, in an overall rectangle shape, you could change the interior's border position.
But the overall dimension remains the same.

rs1

@chrisgoringe
Copy link
Owner Author

I think this will need some clear visual hint that windows are snapped together!

@chrisgoringe chrisgoringe modified the milestones: 1.2, 1.3 Oct 29, 2024
@JorgeR81
Copy link

JorgeR81 commented Oct 29, 2024

In this case, if I drag an interior border ( red arrow ) what will happen ?
Will the blue border also be displaced automatically ( blue arrow ) ?

What would make more sense / be more usefull ?

panelsx

@LukeG89
Copy link

LukeG89 commented Oct 29, 2024

In this case, if I drag an interior border ( red arrow ) what will happen ? Will the blue border also be displaced automatically ( blue arrow ) ?

What would make more sense / be more usefull ?

The red internal resizing should not affect the blue one, but if you grab the blue border you should resize both sliders (proportionally?) and image preview at the same time.

@JorgeR81
Copy link

JorgeR81 commented Oct 29, 2024

I think this will need some clear visual hint that windows are snapped together!


If we make it clear, in the documentation, that we have a snapping feature, I think the users would just assume that adjacent windows forming rectangle, are snapped,

tabs17


While moving or resizing the whole rectangular shape, we could show a highlight around it.

tabs17h1


To resize internal borders ( while keeping the overall dimensions ), we have a highlight line in between the window borders.
Maybe in a different color ( here I have the blue accent color used by Comfy UI )

tabs17h2


  • To drag multiple windows snapped together, I would drag the window on the top / left.

  • To split them apart, I would drag one of the other windows.

When we click and drag to split windows appart, we just highlight the window we are moving.

tabs17h3

@JorgeR81
Copy link

I think this will need some clear visual hint that windows are snapped together!

When Controller windows are snapped together they could share the same border.

This is not a mockup.
We can get this effect, in version 1.2, moving the windows slightly on top of each other, and it looks good !


cn2

@chrisgoringe chrisgoringe modified the milestones: 1.3, 1.4 Nov 1, 2024
@LukeG89
Copy link

LukeG89 commented Nov 4, 2024

What about this effect when resizing windows?

@JorgeR81
Copy link

JorgeR81 commented Nov 4, 2024

What about this effect when resizing windows?

Looks good !

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

No branches or pull requests

3 participants