Repository navigation
Lines in a node's middle, between its inputs' names and its outputs' (meta.body) - #290
Merged
Merged
Conversation
…puts' A producer gives a node `meta.body`: lines drawn in a column centred between the names of its inputs and of its outputs (under the inputs' and over the outputs' where the flow runs down), in the fixed-width font of a node's lines, taking the place of the family's mark. The node is wider between its names by the column, and taller when the column has more lines than the node has rows. A long line is broken onto the next rather than cut, after a space or a comma, up to NODE_BODY_MAX_LINES, the last ending in an ellipsis; a huge value is read no further than drawn. The server says where the column is (`wf:nodeBody`), the client draws it there (node-body.ts). Claude-Session: https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya
…its left A value broken onto several lines reads as one when its lines start at the same place; the column, as wide as its longest line, is centred between the names. Changelog entry for meta.body. Claude-Session: https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya
- A node with middle lines keeps the least height a node has: one line no longer makes it shorter than the same node without. - A line's kind that is no class name is dropped on the client too, for the middle lines and the bottom lines (a product's own model is not checked by the server): it no longer throws while drawing. - A product colours a kind with text.node-body-text.node-body-<kind>, which outranks the stock rule; said in the stylesheet and changelog. - A long line is read up to its bound, never through a character the bound would split. - Tested: blank padding after twelve lines adds no ellipsis. Claude-Session: https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya
Owner
Author
|
Review (
|
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
A producer can now give a node
meta.body, lines drawn in its middle:The node grows to fit:
A long line wraps onto the next after a space or a comma instead of being cut, up to
NODE_BODY_MAX_LINES(12). When there is more, the last line ends in…. Wrapping reads a value only as far as it is drawn, so a value of a million characters costs nothing.On the wire:
wf:nodeBody:lines,top,left,right,width), and the client draws it there (node-body.ts);node-body-<kind>).Why
mlir-viewer will put an unnamed operation's attributes there (
predicate ult,value dense<…>), between its operands and its results. The gray band at the bottom will then hold only the operation's name for a named node. That mlir-viewer PR follows.Checks
test/node-body.test.ts: placement in both directions, growth, wrapping, the cap, a huge value;test/node-body.test.ts: reading the argument, the column's placement, the view and the CSS.diagram-server1219 passed,diagram-client1304 passed.typecheck(5/5, including the client in strict mode) andcheck:neutrality(5/5) pass.https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya