-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boost: Update critical css errors UI (#37658)
* Update show stopper UI * Add error message when unknown error occurs during css generation * add changelog * Improve readability of show stopper component * Add retry to "css gen library missing" error
- Loading branch information
Showing
12 changed files
with
270 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
17 changes: 12 additions & 5 deletions
17
...ins/boost/app/assets/src/js/features/critical-css/numbered-list/numbered-list.module.scss
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
.numbered-list { | ||
list-style-type: none; | ||
margin-left: 0; | ||
margin: 0; | ||
|
||
li { | ||
margin-bottom: 0.5em; | ||
margin-bottom: 1em; | ||
display: flex; | ||
} | ||
|
||
li:last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
.text { | ||
flex: 1; | ||
flex: 1; | ||
line-height: 1.3em; | ||
} | ||
|
||
.index { | ||
border: 1px solid #ccc; | ||
border-radius: 50%; | ||
display: block; | ||
width: 1.5em; | ||
height: 1.5em; | ||
width: 1.4em; | ||
height: 1.4em; | ||
text-align: center; | ||
line-height: 1.4em; | ||
line-height: 1.3em; | ||
font-size: 14px; | ||
margin-right: 5px; | ||
} | ||
} |
This file contains 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
18 changes: 18 additions & 0 deletions
18
projects/plugins/boost/app/assets/src/js/lib/utils/format-error-set-urls.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { stripCacheParams } from '$features/critical-css/error-description/error-description'; | ||
import { FormattedURL } from '$features/critical-css/error-description/types'; | ||
import { ErrorSet } from '$features/critical-css/lib/critical-css-errors'; | ||
|
||
function formatErrorSetUrls( errorSet: ErrorSet ): FormattedURL[] { | ||
return Object.entries( errorSet.byUrl ).map( ( [ url, error ] ) => { | ||
let href = url; | ||
if ( error.meta.url && typeof error.meta.url === 'string' ) { | ||
href = error.meta.url; | ||
} | ||
return { | ||
href, | ||
label: stripCacheParams( url ), | ||
}; | ||
} ); | ||
} | ||
|
||
export default formatErrorSetUrls; |
Oops, something went wrong.