Simplify highlight for leading and trailing spaces in jest-diff #4553
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.
Summary
inverse
for removed, added, in-changed lines.bgYellow
for unchanged lines which didn’t have highlight. The dim stack trace and gray lines caused a perceptual conflict instead of a contrast. Also as Scott said, gray was not light enough. I think yellow looks better on Windows. It looks like pollen on the following illustrations from MacOS Terminal. Also better not to churn snapshots of diffs.Removed lines are bgGreen at left and inverse of green at right, that is the same:
Added lines are bgRed at left and inverse of red at right, that is the same:
Indentation-changed lines are bgCyan at left and inverse of cyan at right, that is the same:
Unchanged lines are unhighlighted at left and bgYellow at right:
Thank y’all for reviewing incremental improvements even when urgent problems need solutions.
Next: similar change in
jest-matcher-utils
but a few things puzzled me inexpect
Test plan
Updated 4 snapshot in 1 test suite (renamed one of them)
P.S. Give my thanks to the Yarn team for improved links so previous PR passed AppVeyor CI