Draw a link only where there is somewhere to go - #13
Merged
Conversation
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.
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.
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'sOperator=square, and a Gain'sGain=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=finalGainis a real reference — MATLAB resolves it to the base workspace, whichis a live session and not a file — so there is nothing to open and
linkTargetis empty.The Value column has always gated its anchor on that; both
paramLinksarms did not. Aparameter 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
_renderParamLinksshared by the DataType andUsedBy 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=finalGainis shown with no link.