Update all diff notices for dark mode and to include icons.
Review Request #13900 — Created May 28, 2024 and submitted — Latest diff uploaded
We list special notices in diffs for the following conditions:
- Files without any changes made
- Newly-added files that are empty
- Files that were deleted
- Files containing whitespace-only changes
- Files containing suspicious Unicode characters
These notices now all use the rb-c-diff-file-notice
component, showing
an icon and defaulting to a yellow warning background on light mode and
a header color on dark mode. This gives us a color scheme that both
stands out and safely shows diff colors.
The one notice type that isn't covered is for binary files. This is kept
more plain for now, just due to differences between standard file and
defaut states for binary files.
As part of this, we've moved away from embedded rb-c-alert
components.
We aren't using ink-c-alert
here, but rather introducing a new
rb-c-diff-file-notice
, which is specific to the diff viewer. This lets
us ensure a structure that works well in this context, with the visuals
we need, and without having to override styles from either rb-c-alert
or ink-c-alert
to make it fit correctly.
Unit tests pass.
Tested all notice combinations, making sure the visuals looked right in
light and dark modes.