gtoolkit icon indicating copy to clipboard operation
gtoolkit copied to clipboard

new snippet placement when snippet is collapsed (children hidden) is surprising

Open cminter opened this issue 7 months ago • 2 comments

In a hierarchical snippet that is collapsed, when I press Ctrl-Enter (or use snippet + button), where should the new snippets be created?

  1. inside the nested collapsed snippet? and if so... a. before the first child snippet? current behavior b. after the last child snippet?
  2. after the snippet, outside the hierarchy, at the same level?

Problem with current behavior

  • New snippet is hidden. Before I realized what was happening I thought nothing was happening and this is a bug in GT. Then a day later I found pages littered with empty text snippets in my pages :)
  • Cannot directly add a new snippet after a collapsed nested snippet. Workaround:
    1. un-collapse snippet to see children (potentially many levels)
    2. go to last snippet
    3. add a snippet
    4. un-nest up to intended level
    5. re-collapse as originally intended (for original reasons, takes up screen space, more rendering time, etc)

IMHO, 2 is least surprising behavior for collapsed snippet

Image

cminter avatar Jun 20 '25 23:06 cminter

+1. I’ve been repeatedly confused by this and agree that option number 2 seems the least surprising

seandenigris avatar Jun 21 '25 01:06 seandenigris

Yes, it is confusing.

girba avatar Jun 26 '25 05:06 girba