fix(vscode): draw a table rendering as a table - #534
Merged
Merged
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
Desktop verification on e15cc12 with a freshly packaged and installed VSIX in VS Code.
|
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.
What and why
A table-kind view (
render asElementTable) or the#tablepseudo-view showed up in the diagram panel as its raw Markdown source in a<pre>— HTML comment, pipe characters and all — so it looked broken even though the server rendered it fine.The panel now draws the rendering's structured
rows/columns(whichopensysml/renderalready returns alongside the Markdownartifact) as a real HTML table, and a row whose element the server traced to a declaration opens that declaration in the editor when clicked, the way a node click does. The cursor highlight works the other way too: a row whose origin range holds the cursor is marked selected.Table styling uses VS Code theme variables, with B&W variants under the
pilotlook.How it was verified
npm --prefix editors/vscode run typecheck,npm --prefix editors/vscode test(182 pass; 4 new tests inwebview/table.test.ts: headers + located rows + literal-text cells, ragged-row padding, empty state, absent columns).python3 scripts/changelog.py check,make vscode-package.bin/sysml-lsp:#tablepseudo-view and a declaredpartsTableview render as tables; clicking thewrow selectswin the source; moving the cursor ontoCarhighlights its row.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelog