Skip to content

Edit a model's configuration sets in the table as a dictionary's - #98

Merged
ww-mw merged 3 commits into
mainfrom
model/config-set-edits
Nov 4, 2026
Merged

ww-mw merged 3 commits into
mainfrom
model/config-set-edits

Conversation

@ww-mw

@ww-mw ww-mw commented Nov 4, 2026

Copy link
Copy Markdown
Member

A .slx model's table now offers its configuration sets the editing a dictionary's get, on core v1.57.0 (mathworks/data-explorer-core#266):

  • Add: the gallery shows the Configurations tiles (Config Set, Config Reference) beside the Model Workspace's classes, each tile naming its section (Add Config Set to Configurations). EngineFile.addSections says which sections beside the variables the gallery adds to (config, where core says the model's sets take a new one); TableView.addSections and the new setRows field of the same name carry it; MatView.addEntry adds a tile's entry into its section.
  • Delete: a set's row keeps core's Delete where the model's sets take an edit; core refuses the active set, saying why. Cut is off for a set (_canCut: false, which the menu and its chord read): a move into another document takes its original out of this file by variable name.
  • Rename / Description: core's row flags, as before.
  • The engine's observer also asks the container a deleted node left, so a set deleted (or an Add undone) repaints the table.

addSections is a new wire field rather than a member of add: check:api treats any change to an existing wire field's type as breaking. The core peer range stays ^1.56.0: with an older core the gallery offers no Configurations tile and a set no Delete, as before. The dev pin is v1.57.0.

Tests

  • test/modelEngine/model.test.ts: tiles offered; a set and a reference added (one edit each, name editor opened, saved, undone); rename + Description; a name MATLAB refuses; delete and the active set refused; a package core cannot write offers neither.
  • Gallery (addGalleryGrid), wire (connectTableTasks), menu (menuItems). npm run verify: 4,720 tests pass.

Downstream: vscode branch model/config-set-edits (posts addSections from its MAT-file editor).

Known gap, pre-existing: a row drag of a configuration set defaults to a move, which cannot take the set out of the model (the paste lands, and the source says it could not remove the original).

ww-mw added 3 commits November 4, 2026 10:13
A model's table is to offer its configuration sets the editing a
dictionary's get. The gallery shows the Configurations tiles beside the
Model Workspace's classes, each tile naming its section. A set added
from a tile lands in Configurations, one edit, with its name editor
open. A set is renamed and given a Description, one edit each. A name
MATLAB does not give a set is refused in MATLAB's words. A set is
deleted, and the active one refused, saying why. Delete is offered on
every set and Cut on none, since a move takes its original out by
variable name. A package whose sets are not laid out as MATLAB writes
them offers neither tiles nor Delete.
The model engine (MODEL_FILE) offers its configuration sets the
editing core now takes:

- Add: EngineFile.addSections names the sections beside the variables
  the gallery adds to ('config', where core says the model's sets take
  a new one). TableView.addSections and the setRows field of the same
  name carry them; the gallery shows those sections' tiles beside the
  classes, each naming its section; MatView.addEntry adds into it.
- Delete: a set's row keeps core's Delete where the model's sets take
  an edit; core refuses the active one, saying why. Cut is off
  (_canCut: false, which the menu and its chord read): a move takes
  its original out of this file by variable name.
- Rename and Description: core's row flags, as before.

The engine's observer now also asks the container a deleted node
left, so a set deleted (or an Add undone) repaints the table: a node
out of the tree has no parent to find its file by.
Its configuration sets are what a model's table now edits. The peer
range stays ^1.56.0: with an older core the gallery offers no
Configurations tile and a set no Delete, as before.
@ww-mw
ww-mw merged commit 272f040 into main Nov 4, 2026
6 checks passed
@ww-mw
ww-mw deleted the model/config-set-edits branch November 4, 2026 16:37
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