Skip to content

Draw a link only where there is somewhere to go - #13

Merged
ww-mw merged 1 commit into
mainfrom
usage-dead-links
Sep 10, 2026
Merged

Draw a link only where there is somewhere to go#13
ww-mw merged 1 commit into
mainfrom
usage-dead-links

Conversation

@ww-mw

@ww-mw ww-mw commented Sep 10, 2026

Copy link
Copy Markdown
Member

Three parameters in a user's model rendered as links and did nothing when clicked: a Bus
Selector's OutputSignals=a,b, a Math Function's Operator=square, and a Gain's
Gain=finalGain. Two separate defects.

The rows (core's half)

An option-list value and a bus signal name are not references to data. Core v1.15.0 now
judges a block parameter by which parameter it is, not only by its value, and stops
reporting both — the Bus Selector case was worse than a spare row, since it put the block
on the Usage cell of a variable it does not read. See
mathworks/data-explorer-core#24. The pin moves to v1.15.0.

The link (this repo's half)

Gain=finalGain is a real reference — MATLAB resolves it to the base workspace, which
is a live session and not a file — so there is nothing to open and linkTarget is empty.
The Value column has always gated its anchor on that; both paramLinks arms did not. A
parameter the graph could not resolve still painted accent-blue, underlined on hover, and
dispatched a click carrying an empty target that routed nowhere.

The two arms were also spelled twice, which is how they came to disagree with the Value
column one branch away. They are now one _renderParamLinks shared by the DataType and
UsedBy columns. The value stays visible either way — an unresolved parameter is an answer,
not a defect to hide — and the cell's text is untouched, so sorting, filtering and
copying do not depend on whether the target resolved.

Verified

Six new tests in treeTableCells.test.ts, three of which fail with the fix reverted.
Full unit suite 1935 pass; typecheck, desktop build and web build all green. Re-checked
against the reported model through the new core: all three rows behave — the two
non-references are gone, and Gain=finalGain is shown with no link.

Three parameters in a user's model rendered as links and did nothing when clicked: a
Bus Selector's `OutputSignals=a,b`, a Math Function's `Operator=square`, and a Gain's
`Gain=finalGain`. Two separate defects, and both are now fixed.

The rows themselves were wrong for the first two, and that is core's half: an option-list
value and a bus signal name are not references to data, and core v1.15.0 stops reporting
them (the Bus Selector case was worse than a spare row — it put the block on the Usage
cell of a variable it does not read). The pin moves to v1.15.0 here.

This repo's half is the link. `Gain=finalGain` IS a real reference — MATLAB resolves it
to the base workspace, which is a live session and not a file — so there is nothing to
open, and `linkTarget` is empty. The Value column has always gated its anchor on that;
both `paramLinks` arms did not. So a parameter the graph could not resolve still painted
accent-blue, underlined on hover, and dispatched a click carrying an empty target that
routed nowhere: three ways of saying "link" with nothing behind any of them.

The two arms were also spelled twice, which is how they came to disagree with the Value
column and with the same rule one branch away. They are now one `_renderParamLinks`
shared by the DataType and UsedBy columns, gating on `linkTarget` exactly as the Value
column does. The value stays visible either way — an unresolved parameter is an answer,
not a defect to hide — and the cell's TEXT is untouched, so what a user sorts, filters
and copies does not depend on whether the target resolved.

Six tests in `treeTableCells.test.ts`, three of which fail with the fix reverted: no
anchor in either column, the property and value still shown, the cell text identical to
a resolved one, only the resolved entries of a mixed cell linked, no navigation
dispatched from any anchor the cell offers, and the value still highlighted by a search.
@ww-mw
ww-mw merged commit e0a8564 into main Sep 10, 2026
1 of 2 checks passed
@ww-mw
ww-mw deleted the usage-dead-links branch September 11, 2026 18:13
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