Skip to content

Show self alignments and edit an item's associations in the item panel - #65

Open
stanbilliet wants to merge 4 commits into
1EdTech:task/CGE-165from
stanbilliet:feat/self-alignments-item-associations
Open

stanbilliet wants to merge 4 commits into
1EdTech:task/CGE-165from
stanbilliet:feat/self-alignments-item-associations

Conversation

@stanbilliet

Copy link
Copy Markdown
Contributor
  • Associations between two items of the same framework now show in the Tree View under "(this framework)". A drop there is stored inline when the framework stores its alignments inline.
  • The item panel gets an Associations section: outgoing (change type, remove), incoming, and a form to add one to an item in this framework, in another framework, or a non-CASE target (targetType: ext:…).
  • Association types follow CASE 1.1: replacedBy instead of isReplacedBy, plus exemplar, hasSkillLevel and isTranslationOf.
  • Builds on remove canvas and allow linking frameworks #64, so the base is its branch

Associations between two items of the same framework (e.g. precedes or
isRelatedTo within it) were never shown: externalAlignmentsOf skips them and
the Tree View only draws isChildOf/isPartOf from the editor graph.

- selfAlignmentsOf picks them, with the same rules as external alignments.
  The framework is listed as its own target when it has any.
- A drop onto "(this framework)" is stored inline when the framework stores
  its alignments inline, as CASE 1.1 keeps an association in the document of
  its origin. With alignment frameworks it still goes to one.
- Both helpers take the editor's live items, so items added in this session
  count as the framework's own.
- Inline associations are drawn in teal; the same isRelatedTo link isn't
  added twice.
- Association types follow the CASE 1.1 vocabulary: replacedBy instead of
  isReplacedBy, plus exemplar, hasSkillLevel and isTranslationOf.
Lists an item's outgoing associations (to an item of this framework, of
another framework, or a non-CASE target) with type and remove controls, and
the incoming ones from other items of the framework. A form adds one to any
of the three; a non-CASE target needs an identifier, a URI and a targetType
of the form ext:<name>. Edits go through the same inline alignment edits as
the Tree View, so they're saved with the framework.
With alignmentStorage "alignmentFramework", associations to items on this
server, the framework's own included, belong in alignment frameworks and are
authored in the Tree View. The item panel then only adds non-CASE targets
(always inline) and says where the rest is. Adds a test that saving keeps
self alignments in the framework while the others move.
An item with associations gets a grey marker with their count (whatever they
point to, inline or in alignment frameworks) when it has no badge for the
expanded target; clicking it opens the item. The item panel puts a space
between an item's code and its statement.
@stanbilliet
stanbilliet force-pushed the feat/self-alignments-item-associations branch from 3544317 to 8e280d7 Compare December 1, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant