Skip to content

Commit

Permalink
[not verified] Boost: Update ISA summary colors when there are issues (
Browse files Browse the repository at this point in the history
…#31908)

* Update UI feedback regarding ISA issues

* add changelog
  • Loading branch information
dilirity authored and haqadn committed Jul 19, 2023
1 parent 9cd5215 commit 8dfe41c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import OtherGroupContext from '../../elements/OtherGroupContext.svelte';
import ProgressBar from '../../elements/ProgressBar.svelte';
import Spinner from '../../elements/Spinner.svelte';
import WarningIcon from '../../svg/warning-outline.svg';
import { isaGroupLabels, isaSummary } from './store/isa-summary';
function safePercent( value: number, outOf: number ): number {
Expand Down Expand Up @@ -34,8 +35,12 @@
class="jb-navigator-link"
to="/image-size-analysis/{group}/1"
>
<span class="jb-bubble" class:done={isDone}>
{isDone ? '' : index + 1}
<span class="jb-bubble" class:done={isDone} class:has-issues={hasIssues}>
{#if hasIssues}
<WarningIcon class="icon" />
{:else}
{isDone ? '' : index + 1}
{/if}
</span>
</ConditionalLink>
{/if}
Expand Down Expand Up @@ -117,15 +122,14 @@
&.done {
background-color: var( --jetpack-green-50 );
}
&.has-issues {
background: transparent;
}
}
.jb-status {
grid-area: status;
font-size: 0.875rem;
color: var( --gray-50 );
:global( a ),
&.has-issues {
color: var( --color_warning );
}
}
.jb-category-name {
grid-area: category;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { __, sprintf } from '@wordpress/i18n';
import Button from '../../elements/Button.svelte';
import ErrorNotice from '../../elements/ErrorNotice.svelte';
import NoticeIcon from '../../svg/notice-outline.svg';
import RefreshIcon from '../../svg/refresh.svg';
import WarningIcon from '../../svg/warning-outline.svg';
import MultiProgress from './MultiProgress.svelte';
import { resetIsaQuery } from './store/isa-data';
import {
Expand Down Expand Up @@ -89,7 +89,7 @@
<div class="summary-line">
{#if totalIssues > 0}
<div class="has-issues summary">
<NoticeIcon class="icon" />
<WarningIcon class="icon" />
{sprintf(
/* translators: %d is the number of issues that were found */
__( 'Found a total of %d issues', 'jetpack-boost' ),
Expand Down Expand Up @@ -177,7 +177,7 @@
}
.has-issues {
color: $red_50;
color: var( --jp-orange-20 );
}
.has-issues :global( svg ) {
Expand Down
5 changes: 5 additions & 0 deletions projects/plugins/boost/changelog/update-isa-summary-colors
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Update ISA summary UI colors when there are issues with the report.


0 comments on commit 8dfe41c

Please sign in to comment.