Repository navigation
Group E vscode halves: Signal dropdowns, Alignment editing, mpt paste and shared-name ids, on core v1.40.0 - #73
Merged
Merged
Conversation
…s it
Core now offers a Simulink.Signal's Complexity and DimensionsMode as dropdowns
over MATLAB's own sets: auto, real, complex and auto, Fixed, Variable. This
reverses the old "safe as read-only" label. The table's generic select cell
already renders and edits such a cell, and the host already routes the edit to
node.setProperty by column id, so no source change is needed here.
test/dimensionsMode.test.ts pinned exactly the label the ruling removes. It now
expects the real codegen.sldd Signal's dimensionsMode to be a select, with the
cell { text: 'Fixed', editable: true, editor: 'select', options: ['auto',
'Fixed', 'Variable'] }, and is retitled "editable". Against the pinned core it
fails with "expected 'label' to be 'select'".
Two comments that described the label are brought up to date. One is in
elementProps.test.ts. The other is in rowBuilder.ts's column-group note, which
now names ValueType and Signal beside BusElement.
data-explorer-core now lets Alignment (CoderInfo.Alignment) be edited by MATLAB's rule wherever MATLAB takes an edit, which is any StorageClass but 'Auto' (group E ruling, C-086). The vscode side needs no code for it: the generic schema cell renders the text editor, and the text editor provider hands the column to node.setProperty. test-integration/suite/alignmentEdit.test.ts locks the behaviour through the real SlddTextEditorProvider, over core's MATLAB-written classes_r2027a_text.sldd, copied into test-integration/fixtures/classes beside the workspace folder: - The alignment cell is an editable text cell on an ExportedGlobal Parameter or Signal, and plain text under 'Auto'. - 8 on pSC saves pAl8's CoderInfo: a typed int32, first in CoderInfo. Nothing else changes. - -1 removes the key, so pSC is back to what MATLAB wrote. pAl8 set to -1 saves pAlM1's CoderInfo. - 3 is refused in MATLAB's words, and the document is unchanged. So is an Alignment under 'Auto'. - StorageClass set to 'Auto' on pAl8 saves pNo's CoderInfo. All six fail against the pinned core v1.39.0, where the cell is plain text and the edit is accepted and then lost. They pass against core main. A comment in rowBuilder.ts now names alignment among the columns that can be edited.
…w admits Core now admits a paste or a drop of an mpt.Parameter or mpt.Signal entry into Design Data (SectionNode.allowsType), while creating one stays refused (getAllowedTypes). The section rules the host posts to the table held the creation list, so the drop cursor and the Paste item refused an mpt entry the host would have accepted, and Ctrl+V, which goes through the menu's decision, never reached the host. sectionRules now posts getAdmittedTypes, and falls back to getAllowedTypes on a core that does not have it. The Add gallery keeps the creation list. Tests: the posted rules agree with allowsType for every class, the cursor and the Paste item admit an mpt entry into Design Data and refuse it elsewhere, and both paste paths keep the class. A new integration test runs the paste and the drop through both real providers.
Core now refuses to resolve a node id that names two nodes: two entries with one name in one section, and every row inside them (F1-50, group E ruling of 2026-10-16). SlddModel.findNode fell back to its cached tree whenever the session answered null, and for the text editor that tree is the session's own, so an edit on either twin's row edited the first one. findNode now takes the session's null as final for a source the session holds. It still falls back to the cache for a core without findNodeById and for a source the session no longer holds. The parse-warning banner no longer counts core's new duplicate-id warning as a part that could not be read. When shared names are all there is, the headline says so; core's messages are listed below it as before. The forward-order undo test in binaryEntryScopedEdit now expects the refusal: the remove after the insert throws, rather than removing whichever twin was indexed last, and both entries are left standing. Tests: findNodeSharedName (findNode on a text dictionary with two K Parameters and two S structs), three banner cases in parseWarnings, and sharedNameEntries through the real SlddTextEditorProvider.
v1.40.0 (f9acdf9) carries mathworks/data-explorer-core#124 (Signal Complexity and DimensionsMode options; Alignment editing), #125 (mpt entries admitted by paste and drop) and #127 (findNodeById and the duplicate-id warning), the core halves of C-030, C-086, C-180 and F1-50. It also carries #128 (MCOS numeric classes, per-element object classes). The lockfile changes only data-explorer-core: its root spec and its node_modules entry, which now resolves to f9acdf939aa726cb9ddd3162a6cac19fc4f4a5ca. With the pin: npm run verify passes 3422 of 3422 tests in 175 files, and check:leak is OK; npm run test:integration has 221 passing and 1 pending.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The vscode halves of the group E ruling of 2026-10-16. The maintainer's ruling: "Agree your suggestions ... Add unit tests to lock down the fix. I pre-approve PR and merge as long as it passes all tests." Each item takes its recommendation in
discuss.md.Core pin:
#v1.40.0. The last commit moves package.json from#v1.39.0to#v1.40.0(mathworks/data-explorer-core#129). That tag carries the core halves, mathworks/data-explorer-core#124, #125 and #127. It also carries #128 (MCOS numeric classes and per-element object classes), which the four item commits were not gated against.data-explorer-coretof9acdf939aa726cb9ddd3162a6cac19fc4f4a5ca, version 1.40.0, the commit tagv1.40.0points at.node_modulesentry. check:leak is OK.Results at the head, after
npm ciwith v1.40.0:npm run verify: 175 files, 3422 of 3422 tests pass, and check:leak is OK.npm run test:integration: 221 passing, 1 pending, 0 failing, on the first run. The pending test is cutPasteUndo's "a same-document move ...". It skips itself whereundodoes not apply to an editor.--no-save, so #128 adds no failure.Against v1.39.0, the earlier pin:
tscfails once:src/host/parseWarnings.ts:131, TS2367, because'duplicate-id'is not yet inParseWarningCode.C-030: a Signal's Complexity and DimensionsMode are dropdowns
Ruling: "(a). Confirm Signal's enum sets ... in MATLAB first, then reuse the BusElement and ValueType mechanism with Signal's own options. Dimensions stays a label."
Pairs with mathworks/data-explorer-core#124 (
cca1e6e).rowBuilder.tsnow names ValueType and Signal.test/dimensionsMode.test.ts, "the Signal surfaces an editable dimensionsMode column". It pinned the read-only label that the ruling removes. It now expects{text:'Fixed', editable:true, editor:'select', options:['auto','Fixed','Variable']}.expected 'label' to be 'select'.test/elementProps.test.tsis updated. That is a comment-only change.C-086: Alignment can be edited in the table, by MATLAB's rule
Ruling: "(b): the validation rule is already recorded, but the written form and defaults-stripping are exactly what the plan deferred. One MATLAB check turns this into a bounded core and vscode change."
Pairs with mathworks/data-explorer-core#124 (
71b3446).rowBuilder.tsnow lists alignment among the columns that can be edited.test-integration/suite/alignmentEdit.test.ts, with 6 tests through the realSlddTextEditorProvider. They run over core's MATLAB-writtenclasses_r2027a_text.sldd, which is copied byte for byte. The tests check that:COLUMNS. None of the fixtures that sweep reads has a non-Auto Parameter or Signal, so it would never reach an alignment cell.C-180: a pasted or dropped mpt entry lands in Design Data
Ruling: "(a). The paste copies an mpt object MATLAB already wrote, rather than writing one from scratch, so the doc's reason for refusing creation does not cover it."
Pairs with mathworks/data-explorer-core#125 (
7f04c0b).src/host/sectionRules.tsnow postsgetAdmittedTypes(). On a core without that method it falls back togetAllowedTypes().allowsTypefor every class, and Design Data lists mpt.test-integration/suite/mptPasteDrop.test.ts: the paste and the drop through the real JSON and binary providers.sectionRules.tsreverted, on core 3decebe, 5 unit tests and both integration tests fail. The integration message is "Design Data's posted rule admits mpt.Parameter".A "mpt.Parameter" entry is not allowed in Design Data.F1-50: an edit on one of two same-named entries no longer lands on the first
Ruling: "(a). It stops the wrong-data delete without changing any id, and it suits a state that only malformed input reaches."
Pairs with mathworks/data-explorer-core#127 (
98f8f7c).SlddModel.findNodenow treats the session's null as final when the session holds the source. Before, its cache fallback returned the first twin.findNodeById, and for a source the session no longer holds.warningBannerdoes not countduplicate-idas a part that could not be read. When shared names are the only warning, it shows a headline of its own.test/findNodeSharedName.test.ts(3 tests): two K Parameters and two S structs.test/parseWarnings.test.ts(+3).test-integration/suite/sharedNameEntries.test.ts(3 tests): the banner, a refused edit on a twin, and a control edit on another entry.expected 'the first twin' to be null.test/binaryEntryScopedEdit.test.ts, "does NOT undo correctly with the inverses in forward order". It pinned the wrong-twin remove that the ruling removes.No entry is indexed.