Skip to content

Order nodes by a reserved order field #240

Open

Description

@mindsocket

Proposal

Treat a node field named order as an implicit convention: where nodes are listed as siblings, the ones with an order value sort by it, and anything able to order nodes follows this without configuration.

Decided so far

  • The name order is reserved by convention. A schema doesn't declare which field carries order.
  • Order resolves locally, among siblings. Nothing needs to state a global sequence.
  • The platform doesn't check that values are unique or form one sequence. A schema rule can ask for more.
  • Core is the home for the sorting, so that every consumer (sctx show, diagrams, map views) agrees.

To design

  • Where it applies: the order of graph.nodes, of each node's children, or both.
  • Nodes without an order among siblings that have one (before, after, or by today's order).
  • A node with several parents has one order value. An order on a link is out of scope until a case needs it.
  • Ties, and non-numeric values.

Context

structured-context-map-views layouts read sibling order from the space graph today (e.g. the landscape projection sorts by position in graph.nodes), and will pick this up when core applies it. Without it, each map view definition would have to name a sort field.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions