Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Zero-area artboards are confusing and impossible to deal with

Open Keavon opened this issue 2 years ago • 1 comments

If the user creates a zero-area artboard, such as by simply clicking with the Artboard tool in some empty space, there's no way to notice this exists and it causes confusion because deleting all apparent artboards fails to restore the white infinite canvas. There's no way to select them.

  • We should prevent artboards being less than a pixel in either dimension.
  • We should draw some kind of border around the outside of all artboards while using the tool which act as a click target.

And we should eventually have some way to view a list of artboards, give them names, and delete them from the list. (But this would probably be a separate issue that may be best implemented once the node system exists.)

Keavon avatar Jun 30 '22 05:06 Keavon

Mitigated by recently adding Document > Clear Artboards.

Keavon avatar Aug 13 '22 07:08 Keavon

Hi @Keavon, may I have a take on this issue?

I assume the followings should be implemented:

  1. When constructing an Artboard, cap smallest dimensions to 1x1.
  2. When updating the dimensions in the properties panel, cap smallest dimensions to 1x1.

Kit-p avatar Oct 08 '22 03:10 Kit-p

@Kit-p I believe that would be a good start, yeah! This issue also mentioned the idea of visualizing the borders of every artboard while the Artboard tool is active, but that's perhaps a bonus for later (perhaps even a different PR).

A few hints while testing that might help you out:

  • Document > Clear Artboards might help you reset things.
  • The File > Export menu can be used to list all the artboards in the Bounds dropdown menu.
  • Remember to check out https://graphite.rs/contribute for other tips and hints while you work

Thanks and cheers

Keavon avatar Oct 08 '22 03:10 Keavon

@Keavon Just want to confirm about the properties panel behaviors.

  1. Should we deny (auto correct) input of 0 in width and height?
  2. If auto correct, is 1 the value to replace?
  3. If user inputs something like 0.001, should it be auto corrected to 1 similar to resizing on UI?

Kit-p avatar Oct 21 '22 18:10 Kit-p

Since artboards should be integers, the widget should snap to the nearest valid value. So 1 would be the minimum and anything less gets converted to 1. The widget itself even allows you to set a min value and is_integer so that should be easy from a widget standpoint, but the interactive transformation in the viewport needs to respect those rules as well.

Keavon avatar Oct 21 '22 18:10 Keavon

@Keavon Thank you, that's very clear. Let me rework the PR!

Kit-p avatar Oct 22 '22 00:10 Kit-p