Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MWPW-149124 Improve Focus Page for Performance Improvement Tiger Team #2391

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions libs/features/icons/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ let fetched = false;
async function getSVGsfromFile(path) {
/* c8 ignore next */
if (!path) return null;
const { customFetch } = await import('../../utils/helpers.js');
const resp = await customFetch({ resource: path, withCacheRules: true })
.catch(() => ({}));
const resp = await fetch(path);
/* c8 ignore next */
if (!resp.ok) return null;
const miloIcons = {};
Expand Down
6 changes: 3 additions & 3 deletions libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,9 @@ function decorateHeader() {
async function decorateIcons(area, config) {
const icons = area.querySelectorAll('span.icon');
if (icons.length === 0) return;
const { miloLibs, codeRoot } = config;
const base = miloLibs || codeRoot;
await new Promise((resolve) => { loadStyle(`${base}/features/icons/icons.css`, resolve); });
const { base } = config;
loadStyle(`${base}/features/icons/icons.css`);
loadLink(`${base}/img/icons/icons.svg`, { rel: 'preload', as: 'fetch', crossorigin: 'anonymous' });
const { default: loadIcons } = await import('../features/icons/icons.js');
TsayAdobe marked this conversation as resolved.
Show resolved Hide resolved
await loadIcons(icons, config);
}
Expand Down
Loading