Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Folder issues in example artwork

Open Tiger3018 opened this issue 1 year ago • 3 comments

In https://github.com/GraphiteEditor/Graphite/pull/1719#issuecomment-2029068825, two weird behavior appeared in Just a Potted Cactus and Valley of Spires:

  • [ ] the select status of copied empty folder(s) will be gone when pasting/moving and its parent changes.
  • [ ] when grouping layers, it will split items to two folders.

Other two example artwork, newly (master branch) saved document didn't affected.

Tiger3018 avatar Apr 01 '24 03:04 Tiger3018

This is just an issue with those two demo artwork files. For context, whenever we break the file format, we have to manually go through all the demo artwork files and edit the JSON to upgrade the format.

You'll need to format it to be readable, in VS Code do Ctrl+Shift+P > "Format Document With" > JSON Language Features. Then make your edits. Then when it's all fixed, open the formatted file in Graphite and re-save it from Graphite to get the condensed formatting back so it's all on one line again.

Keavon avatar Apr 01 '24 03:04 Keavon

For first issue (the select status of copied empty folder(s) will gone when pasting/moving and its parent changes): Can't reproduce.

For every document and every layer/folder pasting, two status:

  1. When the destination folder is not expanded, after expanding the destination, the select status is still there visible.
  2. When the destination folder is expanded, the select status is just there.

So the status 1 might be confusing and misleading the user, but not a bug. Shall we expanding the destination folder automatically?

Tiger3018 avatar Apr 04 '24 14:04 Tiger3018

For second issue (when grouping layers, it will split items to two folders): Not all layer affected in the mentioned demo artwork. Only folders with its input[0](children) as a artboard_layer, rather than the desired ordinary_layer are affected.

It means undefined behaviors occur and no error-catching here:

  1. Folders' input[0] as a artboard_layer. These problematic folders will become an empty layer once no ordinary_layer in it.
  2. When 1 appears and doing "group into folder" or doing "resorting", all siblings are placed into a problematic folder again.

(Update) Is there any ways to create Folders' input[0] as a artboard_layer?

I didn't figure out.

However, the demo artwork's not-desired artboard_layer are all Transform, and by accessing the corresponding folder in both the top-right node graph and the layers widget window, you can find the properties not found in other folder.

Maybe a legacy feature?

IMG_20240405_002914_271

Tiger3018 avatar Apr 04 '24 14:04 Tiger3018