fix: do not call a complete graph partial - #51
Merged
Merged
Conversation
The warning chip prefixed its message with "Partial graph:" whenever the producer reported any error, whether or not the graph was actually partial. Those are opposite claims. A graph that is missing nodes and a graph that faithfully draws something faulty need different reactions, and the wrong label sends a reader hunting for content that was never missing instead of reading the problem being reported. The second case is also the more common one: a producer able to describe a fault precisely usually had no trouble drawing the thing. The prefix now follows `wf:partial`, which is the flag that actually means the graph is incomplete. When the graph is whole the message stands on its own — it already says what is wrong, and the chip's styling already says it is a warning. `isPartialGraph` keeps its meaning of "is there anything to warn about", because the centre overlay keys on it and that reading is right for deciding whether to warn at all. The new value is the narrower fact, and only the wording follows it. The wording moved into a small exported function so it could be tested directly. It is one line of string arithmetic, and it is also the whole difference between telling a reader their picture is missing something and telling them their subject has a fault.
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 problem
The warning chip prefixed its message with
Partial graph:whenever the producer reported any error, regardless of whether the graph was actually partial:A graph that is missing nodes and a graph that faithfully draws something faulty are opposite situations, and they need different reactions from the reader. The wrong label sends someone hunting for content that was never missing, instead of reading the problem being reported.
That is also the more common of the two. A producer able to describe a fault precisely usually had no trouble drawing the thing it is in.
The change
The prefix follows
wf:partial, the flag that actually means the graph is incomplete. When the graph is whole, the message stands on its own: it already says what is wrong, and the chip's styling already says it is a warning.isPartialGraphkeeps its existing meaning of "is there anything to warn about", because the centre overlay keys on it and that reading is correct for deciding whether to warn. The new value is the narrower fact, and only the wording follows it.The wording moved into a small exported function so it could be tested directly. It is one line of string arithmetic, and also the whole difference between telling a reader their picture is missing something and telling them their subject has a fault.
Verified
npm run build,npm run typecheck(5/5),npm run check:neutrality(5/5),npm test— green by exit code.packages/diagram-client/test/graph-warning-text.test.ts.