Skip to content

Thought-in-progress: better and finer-granularity layout assistance #338

Open
@forrestbao

Description

@forrestbao

Auto-layout covers two kinds of problems:

  1. Shape of scopes/pods: Auto-shrink and auto-expand a scope when a pod is moved out and into the scope.
  2. Placement of scopes/pods: Auto-shovel to push away pods/scopes when overlaps happen.

A bit history:

  1. Auto-shrink and auto-expand were added for Scopes should be like bubbles, automatically expanding as members are added  #151
  2. Auto-shovel (without auto-retract) was added for auto-shovel pods/scopes that will overlap due to width/height expansion #176

While 1 always makes life easier, 2 is not always as it sometimes breaks the manual placement of pods/scopes.

Idea 1: allowing users to enable and disable individual options under auto-layout. I feel life will very good with 1 enabled and 2 disabled and snapping enabled.

Idea 2: keeping the snapping relationship. For example, if two pods are snapped with their tops aligned, then the top of them should remained aligned in the future. If auto-shovel pushes one up, then both of them should be pushed up to remain top-aligned.

Idea 3: optional and needing additional thinking, is how to shovel pods/scopes to make space for a pod newly created or dragged that overlaps with existing pods. The force-based auto-layout is far from ideal. It could push aligned pods/scopes out of alignment. Alternatively, CodePod can ask the user what to do from 4 options: pushing the pods above/below/left/right away. This is like inserting cells into a spreadsheet.

Idea 4: allowing pods/scopes to be pinned at where they are. So the location of a pod/scope with respect to its scope is fixed. Auto-shovel shall not change the location of a fixed scope/pod. But this may make designing the auto-shovel algorithm difficult.

Idea 5: Tile or semi-tile based layout in a scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions