Skip to content

Display polish: legend wording, identifier hyphens, unused rejection.message #8

Description

@goloroden

Found while modeling a real domain in ESDM and browsing it with the visualizer. Three small things, collected into one issue.

The legend and the detail sheet disagree

The legend in the top bar calls the purple nodes views, while the detail sheet for the same node calls its kind read-model. ESDM itself uses read-model.

Identifiers lose their hyphens

Names are rendered with hyphens replaced by spaces, so the command remember-to-do appears as "remember to do" and the invariant intention-not-empty appears as "intention not empty", in the detail sheets as well as in the scenario panel.

It reads nicely, but the identifier is no longer copyable, and an aggregate named to-do becomes indistinguishable from the words "to do". Keeping the raw name somewhere, for instance in a tooltip or in a monospace subtitle, would let both work.

rejection.message cannot occur

GwtThen in src/lib/types.ts declares:

export interface GwtThen {
  events?: GwtEventRef[];
  rejection?: { invariant: string; message?: string };
}

schema.esdm.io/given-when-then/v1 defines rejection with additionalProperties: false and invariant as its only property, so a schema-valid model can never carry a message. Adding one makes esdm lint fail with esdm/structure/unknown-field. The field looks like it can be dropped.

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