Align the report's status colors with the CP and add dark mode valuesReport colors - #690
Merged
Merged
Conversation
The status icons, the score and the failing comment in the page details now use red-600 like error text and icons elsewhere in the CP, and all of them get dark mode values (green-400, red-400, amber-300). The score bar uses lighter shades than icons and text because it covers more area. Icons and bar match the status icons and the score ring of the new dashboard widget, so both show the same colors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same classes as the ui ErrorMessage component: red-600 text, underlined link with red-700 / red-300 (dark) on hover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 report pages show a status in three colors – green, amber and red – on the icons, the score and the score bar. This PR makes those colors consistent: with the rest of the CP, between light and dark mode, and with the new dashboard widget in #689.
The icons, the score and the bar had no dark mode values so far, so they looked dull on a dark background. And in light mode, the red of the icons and the score was a shade lighter than the red the CP uses for errors.
In short:
red-600, like error text and icons in the CP. Before, they usedred-500. In dark mode they usered-400.red-500.The PR is independent of #689. The two don't touch the same files and can be merged in any order.
Before and after
green-600green-600/green-400amber-500amber-500/amber-300red-500red-600/red-400green-600,amber-500,red-500red-500/red-400red-600/red-400green-600,amber-500,red-500green-500,amber-400/amber-300,red-500The warning icon keeps the lighter
amber-500in light mode on purpose, so it stays easy to tell apart from the red one (more on that below).The icons come from
StatusIcon.vue, so the change applies to the reports index, the rules table, the page listing and the page details at once.Before
After
How this lines up with the CP
Where the CP has a clear habit, the report now follows it:
statamic/cmsgreen-600red-600ErrorMessage,Label, the upload error icon, and most other red text in light mode –red-500is the exception theregreen-400/red-400Text(success,danger), the licensing alertamber-500CharacterCounteramber-300AlertThe CP itself isn't uniform everywhere, so a few differences remain:
green-600. The report usesgreen-400, likeText.yellow-700/yellow-500in the publish form,amber-600/amber-400inText,amber-500inCharacterCounter, andamber-800inherited by the icon in a lightAlert. The report keepsamber-500. I tried the darkeramber-600, but next to the red icons it's hard to tell the two apart.red-500. The report usesred-400, since a status isn't an action.The score bar
The bar is the one part that doesn't follow the CP, because the CP has no colored bar to follow. It uses the colors of the score ring in #689, which are one shade lighter than the icons: a bar or ring covers more area than an icon or a number, and the darker shades look heavy there. The track keeps its
gray-300on purpose. The ring in the widget uses the lightergray-200, but on the report page the bar sits right below the gray panel header, and a lighter track gets lost next to it.Also in here
The "Asset container not configured" notice on the asset fields used
red-500as well. It now uses the classes of the CP'sErrorMessagecomponent. That's a separate commit, in case you'd rather not have it in this PR.Not changed
Alertcomponent.