Large artboards when duplicated sit on top of original artboard


#1

Mac OS X version 10.12.1

I'm using Subform 0.0.0 8afa768 on Darwin 16.1.0 and am having trouble when duplicating artboards. When I duplicate an artboard that's 1200px wide instead of it appearing next to the original artboard like it does at smaller sizes it appears directly over the top of the original.

Steps to repeat:
• New document
• Change artboard dimensions to 1200px wide
• In structure right click the artboard and click duplicate.

Results
It looks as if nothing has happened but if you drag the artboard you realise the original is directly below the new duplicated artboard.

Screen recording
Video link

UPDATE — 05/12/2016
Also noticed that if you have 2 artboards side by side and you increase the left hand artboards width, it overlaps the right hand artboard rather than pushing it further across to the right


#2

I've seen this happen as well but I was not able to track down a repro case, nice work.


#3

To further expand on the bug and turn it into more of a feature request:

Chalk this request up to “I wish Subform worked like Sketch”, but…

Anytime I duplicate an artboard, the new artboard should appear as the last (meaning right-most) artboard in the horizontal line of existing arboards.

Currently, this happens if I duplicate the right-most artboard. However, if I duplicate any non-last-artboard, the duplicate artboard is created and placed directly over the artboard adjacent to the original artboard.


#4

I just took a look at Sketch’s behavior, and it’s pretty fancy.
It adds to the right if space is available.
If there isn’t space available, it seems to look through all of the other artboards until it finds one for which there is space available directly to the right, and then add the new artboard there.
I can’t tell what order it’s checking those other artboards in — it isn’t checking the newest artboard first, which is what I would have expected.

When duplicating, it also changes your view to center on the new artboard.

Anyway, yeah.
I’m open to implementing this polish at some point.
Do you have any suggestions for an algorithm to determine the location of the next artboard?

When you want to duplicate a single artboard, we could do “sort all artboards by distance from the center of the current artboard, then place the duplicate next to the first artboard that has room to its right”.
A downside of this algorithm is that you might get a new artboard placed left of the original.

Also: Should this same algorithm apply to duplicating self-directed elements, or is okay for those to always just appear directly to the right of the selected element?


#5

I actually dislike how Sketch will sometimes put the artboard into a space between artboards, I’d rather it just put it at the end. If there is a limit to how far horizontally it can go then to create a new row of artboards below.


#6

Some testers have mentioned that they use the Sketch Mate plugins, which includes some artboard manipulation functionality. Most relevant to this topic:

Duplicate: Always duplicate an artboard to its immediate right and shift any other artboards to the right to compensate.

Removal: When an artboard is removed, all the artboards to its right will be shifted left to compensate.

Is this behavior preferable?