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

feat(core): route announcer #7074

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
02db474
Add a route announcer
seyoon20087 Mar 30, 2022
1af1a6c
Delay some time for the route announcer to change state.
seyoon20087 Mar 30, 2022
2ada5fc
Move route announcer to App.tsx.
seyoon20087 Mar 30, 2022
ebd259f
Decrease the wait time.
seyoon20087 Mar 30, 2022
2c9ae8f
update code - use code suggested by @Josh-Cena
seyoon20087 Mar 30, 2022
f271f17
Remove @reach/portal dep in favor of built-in portal
seyoon20087 Mar 30, 2022
df005b8
Update portal import.
seyoon20087 Mar 30, 2022
9608abe
update types
seyoon20087 Mar 30, 2022
6188ded
update lockfile
seyoon20087 Mar 30, 2022
36a773d
update types
seyoon20087 Mar 30, 2022
a5cd567
refactor
Josh-Cena Mar 30, 2022
fd8018d
comment fix
Josh-Cena Mar 30, 2022
6686055
Merge branch 'facebook:main' into create-route-announcer
seyoon20087 Apr 2, 2022
75f5260
Wrap the route announcer inside `<App />`
seyoon20087 Apr 3, 2022
d948353
Wrap the route announcer inside `<App />`
seyoon20087 Apr 3, 2022
90e07e3
refactor
Josh-Cena Apr 3, 2022
49e20e7
add return type
Josh-Cena Apr 3, 2022
37cafa3
quick fix
Josh-Cena Apr 3, 2022
7cc8df3
fallback to page path when first h1 or document.title does not exist …
seyoon20087 Apr 3, 2022
1060785
remove temporary fallback
seyoon20087 Apr 3, 2022
bbb2ffb
Merge branch 'main' into create-route-announcer
Josh-Cena Apr 30, 2022
8704767
reimplement with client module
Josh-Cena Apr 30, 2022
6104fcb
make text label translatable
Josh-Cena Apr 30, 2022
4e2319d
fixes
Josh-Cena Apr 30, 2022
00956fd
fix CSS order?
Josh-Cena Apr 30, 2022
8833c65
use cleanup function
Josh-Cena Apr 30, 2022
7d67a48
Merge branch 'main' into create-route-announcer
Josh-Cena May 25, 2022
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
1 change: 1 addition & 0 deletions packages/docusaurus-theme-classic/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export default function docusaurusThemeClassic(
'./prism-include-languages',
'./admonitions.css',
'./nprogress',
'./routeAnnouncer',
];

if (customCss) {
Expand Down
20 changes: 20 additions & 0 deletions packages/docusaurus-theme-classic/src/routeAnnouncer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#docusaurus-route-announcer-content {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using an ID selector here. Not sure if we necessarily want a class name here, or if we want to use inline styles.

border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
/* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe */
white-space: nowrap;
word-wrap: normal;
}
43 changes: 43 additions & 0 deletions packages/docusaurus-theme-classic/src/routeAnnouncer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import {translate} from '@docusaurus/Translate';
import type {ClientModule} from '@docusaurus/types';
import './routeAnnouncer.css';

const clientModule: ClientModule = {
onRouteDidUpdate({location, previousLocation}) {
if (!previousLocation || location.pathname === previousLocation.pathname) {
return undefined;
}
const announcerContainer = document.createElement(
'docusaurus-route-announcer',
);
const announcement = document.createElement('p');
Object.assign(announcement, {
ariaLive: 'assertive', // Make the announcement immediately.
id: 'docusaurus-route-announcer-content',
role: 'alert',
});
Comment on lines +17 to +25
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure DOM manipulation. Because client modules don't have access to the React context, it would be quite cumbersome if we want to use React to do this. The alternative will be to put this in Layout, but there may be other edge-cases (for example, the layout doesn't re-mount between doc pages)

const firstHeading = document.querySelectorAll(`#__docusaurus h1`)[0];
const pageName = firstHeading?.textContent ?? document.title;
announcement.innerText = translate(
{
message: 'Navigated to {pageName}',
id: 'theme.RouteAnnouncer.content',
description:
'The text announced by screen reader when the user has navigated to a new page',
},
{pageName},
);
announcerContainer.appendChild(announcement);
document.body.appendChild(announcerContainer);
return () => document.body.removeChild(announcerContainer);
},
};

export default clientModule;
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "لم نتمكن من العثور على ما كنت تبحث عنه.",
"theme.NotFound.p2": "يرجى الاتصال بمالك الموقع الذي ربطك بعنوان URL الأصلي وإخباره بأن الارتباط الخاص به معطل.",
"theme.NotFound.title": "الصفحة غير موجودة",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "محتويات هذه الصفحة",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"theme.NotFound.p2___DESCRIPTION": "The 2nd paragraph of the 404 page",
"theme.NotFound.title": "Page Not Found",
"theme.NotFound.title___DESCRIPTION": "The title of the 404 page",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.RouteAnnouncer.content___DESCRIPTION": "The text announced by screen reader when the user has navigated to a new page",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.TOCCollapsible.toggleButtonLabel___DESCRIPTION": "The label used by the button on the collapsible TOC component",
"theme.blog.archive.description": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "আপনি যা খুঁজছিলেন তা আমরা খুঁজে পাইনি।",
"theme.NotFound.p2": "দয়া করে সাইটের মালিকের সাথে যোগাযোগ করুন যা আপনাকে মূল URL এর সাথে যুক্ত করেছে এবং তাদের লিঙ্কটি ভাঙ্গা রয়েছে তা তাদের জানান।",
"theme.NotFound.title": "পেজটি খুঁজে পাওয়া যায়নি",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "এই পেজ এ রয়েছে",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Nepodařilo se nám najít co jste hledal(a).",
"theme.NotFound.p2": "Kontaktujte prosím vlastníka webu, který vás odkázal na původní URL a upozorněte ho, že jejich odkaz nefunguje.",
"theme.NotFound.title": "Stránka nenalezena",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Na této stránce",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Vi kunne ikke finde det, du søgte.",
"theme.NotFound.p2": "Venligst kontakt ejeren til webstedet, som førte dig frem denne URL, og informer dem om at linket ikke virker.",
"theme.NotFound.title": "Siden blev ikke fundet",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Wir konnten nicht finden, wonach Sie gesucht haben.",
"theme.NotFound.p2": "Bitte kontaktieren Sie den Besitzer der Seite, die Sie mit der ursprünglichen URL verlinkt hat, und teilen Sie ihm mit, dass der Link nicht mehr funktioniert.",
"theme.NotFound.title": "Seite nicht gefunden",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Auf dieser Seite",
"theme.blog.archive.description": "Archiv",
"theme.blog.archive.title": "Archiv",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "No pudimos encontrar lo que buscaba.",
"theme.NotFound.p2": "Comuníquese con el dueño del sitio que lo vinculó a la URL original y hágale saber que su vínculo está roto.",
"theme.NotFound.title": "Página No Encontrada",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "En esta página",
"theme.blog.archive.description": "Archivo",
"theme.blog.archive.title": "Archivo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "صفحه ای که دنبال آن بودید پیدا نشد.",
"theme.NotFound.p2": "لطفا با صاحب وبسایت تماس بگیرید و ایشان را از مشکل پیش آمده مطلع کنید.",
"theme.NotFound.title": "صفحه ای که دنبال آن بودید پیدا نشد.",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "مطالب این صفحه",
"theme.blog.archive.description": "آرشیو",
"theme.blog.archive.title": "آرشیو",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Hindi namin mahanap ang iyong hinananap.",
"theme.NotFound.p2": "Mangyaring makipag-ugnayan sa may-ari ng site na nag-link sa iyo sa orihinal na URL at sabihin sa kanila na ang kanilang link ay putol.",
"theme.NotFound.title": "Hindi Nahanap ang Pahina",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Nous n'avons pas trouvé ce que vous recherchez.",
"theme.NotFound.p2": "Veuillez contacter le propriétaire du site qui vous a lié à l'URL d'origine et leur faire savoir que leur lien est cassé.",
"theme.NotFound.title": "Page introuvable",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Sur cette page",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "אנחנו לא מוצאים את מה שאתה מנסה לחפש.",
"theme.NotFound.p2": "הקישור אינו תקין, אנא פנה למנהל האתר ממנו קיבלת קישור זה.",
"theme.NotFound.title": "דף לא נמצא",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "בעמוד זה",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "हमें वह नहीं मिला, जिसकी आपको तलाश थी।",
"theme.NotFound.p2": "कृपया उस साइट के मालिक से संपर्क करें जिसने आपको मूल URL से जोड़ा है और उन्हें बताएं कि उनका लिंक टूट गया है।",
"theme.NotFound.title": "पेज नहीं मिला",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "इस पेज पर",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Non siamo riusciti a trovare quello che stavi cercando.",
"theme.NotFound.p2": "Contatta il proprietario del sito che ti ha collegato all'URL originale e fagli sapere che il loro collegamento è interrotto.",
"theme.NotFound.title": "Pagina non trovata",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Su questa pagina",
"theme.blog.archive.description": "Archivio",
"theme.blog.archive.title": "Archivio",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "お探しのページが見つかりませんでした。",
"theme.NotFound.p2": "このページにリンクしているサイトの所有者に連絡をしてリンクが壊れていることを伝えてください。",
"theme.NotFound.title": "ページが見つかりません",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "원하는 페이지를 찾을 수 없습니다.",
"theme.NotFound.p2": "사이트 관리자에게 링크가 깨진 것을 알려주세요.",
"theme.NotFound.title": "페이지를 찾을 수 없습니다.",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "이 페이지에서",
"theme.blog.archive.description": "게시물 목록",
"theme.blog.archive.title": "게시물 목록",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Nie mogliśmy znaleźć strony której szukasz.",
"theme.NotFound.p2": "Proszę skontaktuj się z właścielem strony, z której link doprowadził Cię tutaj i poinformuj go, że link jest nieprawidłowy.",
"theme.NotFound.title": "Strona nie została znaleziona",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Na tej stronie",
"theme.blog.archive.description": "Archiwum",
"theme.blog.archive.title": "Archiwum",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Não foi possível encontrar o que você está procurando.",
"theme.NotFound.p2": "Entre em contato com o proprietário do site que lhe trouxe para cá e lhe informe que o link está quebrado.",
"theme.NotFound.title": "Página não encontrada",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Nessa página",
"theme.blog.archive.description": "Arquivo",
"theme.blog.archive.title": "Arquivo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Não foi possível encontrar o que procura.",
"theme.NotFound.p2": "Por favor, contacte o proprietário do site que o trouxe aqui e informe-lhe que o link está partido.",
"theme.NotFound.title": "Página não encontrada",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "On this page",
"theme.blog.archive.description": "Archive",
"theme.blog.archive.title": "Archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "К сожалению, мы не смогли найти запрашиваемую вами страницу.",
"theme.NotFound.p2": "Пожалуйста, обратитесь к владельцу сайта, с которого вы перешли на эту ссылку, чтобы сообщить ему, что ссылка не работает.",
"theme.NotFound.title": "Страница не найдена",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Содержание этой страницы",
"theme.blog.archive.description": "Архив",
"theme.blog.archive.title": "Архив",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Тражени резултат не постоји.",
"theme.NotFound.p2": "Молимо вас да контактирате власника сајта који вас је упутио овде и обавестите га да је њихова веза нетачна.",
"theme.NotFound.title": "Страница није пронађена",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "На овој страници",
"theme.blog.archive.description": "Архива",
"theme.blog.archive.title": "Архива",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Aradığınız şeyi bulamadık.",
"theme.NotFound.p2": "Lütfen sizi orijinal URL'ye yönlendiren sitenin sahibiyle iletişime geçin ve bağlantısının bozuk olduğunu bildirin.",
"theme.NotFound.title": "Sayfa Bulunamadı",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Bu sayfada",
"theme.blog.archive.description": "Arşiv",
"theme.blog.archive.title": "Arşiv",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "Chúng tôi không thể tìm thấy những gì bạn đang tìm kiếm.",
"theme.NotFound.p2": "Vui lòng liên hệ với trang web đã dẫn bạn tới đây và thông báo cho họ biết rằng đường dẫn này bị hỏng.",
"theme.NotFound.title": "Không tìm thấy trang",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "Trên trang này",
"theme.blog.archive.description": "Lưu trữ",
"theme.blog.archive.title": "Lưu trữ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "我们找不到您要找的页面。",
"theme.NotFound.p2": "请联系原始链接来源网站的所有者,并告知他们链接已损坏。",
"theme.NotFound.title": "找不到页面",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "本页总览",
"theme.blog.archive.description": "历史博文",
"theme.blog.archive.title": "历史博文",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"theme.NotFound.p1": "我們沒有您要找的頁面。",
"theme.NotFound.p2": "請聯絡原始連結來源網站的所有者,並通知他們連結已毀損。",
"theme.NotFound.title": "找不到頁面",
"theme.RouteAnnouncer.content": "Navigated to {pageName}",
"theme.TOCCollapsible.toggleButtonLabel": "本頁導覽",
"theme.blog.archive.description": "歷史文章",
"theme.blog.archive.title": "歷史文章",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ function ClientLifecyclesDispatcher({
const element = document.getElementById(id);
element?.scrollIntoView();
}
dispatchLifecycleAction('onRouteDidUpdate', {previousLocation, location});
return dispatchLifecycleAction('onRouteDidUpdate', {
previousLocation,
location,
});
Comment on lines +55 to +58
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposed the cleanup function here, so we can clean up the side-effect of appending DOM child.

}
return undefined;
}, [previousLocation, location]);
return children;
}
Expand Down
34 changes: 34 additions & 0 deletions packages/docusaurus/src/client/exports/Portal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import {useRef, useState, useEffect, type ReactPortal} from 'react';
import {createPortal} from 'react-dom';

type PortalProps = {
children: React.ReactNode;
type: string;
};

export function Portal({
children,
type = 'docusaurus-portal',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are other portal types planned?

What is the purpose of calling document.createElement("docusaurus-portal"); ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slorber This is the container node's tag name. Portal elements can often be custom elements so as not to have any default user-agent styles.

}: PortalProps): ReactPortal | null {
const portalNode = useRef<HTMLElement | null>(null);
const [, forceUpdate] = useState<unknown>();
useEffect(() => {
portalNode.current = document.createElement(type);
document.body.appendChild(portalNode.current);
forceUpdate({});
return () => {
if (portalNode.current) {
document.body.removeChild(portalNode.current);
}
};
}, [type]);

return portalNode.current ? createPortal(children, portalNode.current) : null;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ exports[`base webpack config creates webpack aliases 1`] = `
"@docusaurus/Interpolate": "../../../../client/exports/Interpolate.tsx",
"@docusaurus/Link": "../../../../client/exports/Link.tsx",
"@docusaurus/Noop": "../../../../client/exports/Noop.ts",
"@docusaurus/Portal": "../../../../client/exports/Portal.tsx",
"@docusaurus/Translate": "../../../../client/exports/Translate.tsx",
"@docusaurus/constants": "../../../../client/exports/constants.ts",
"@docusaurus/isInternalUrl": "../../../../client/exports/isInternalUrl.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ exports[`getDocusaurusAliases returns appropriate webpack aliases 1`] = `
"@docusaurus/Interpolate": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Interpolate.tsx",
"@docusaurus/Link": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Link.tsx",
"@docusaurus/Noop": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Noop.ts",
"@docusaurus/Portal": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Portal.tsx",
"@docusaurus/Translate": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/Translate.tsx",
"@docusaurus/constants": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/constants.ts",
"@docusaurus/isInternalUrl": "<PROJECT_ROOT>/packages/docusaurus/src/client/exports/isInternalUrl.ts",
Expand Down
2 changes: 1 addition & 1 deletion website/testCSSOrder.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const EXPECTED_CSS_MARKERS = [
// See https://github.com/facebook/docusaurus/pull/6222
'.markdown>h2',
'.button--outline.button--active',
'.DocSearch-Hit-content-wrapper',
'.navbar__title',
'--ifm-color-scheme:light',
'.col[class*=col--]',
Expand All @@ -49,6 +48,7 @@ const EXPECTED_CSS_MARKERS = [

// Lazy-loaded lib
'.DocSearch-Modal',
'.DocSearch-Hit-content-wrapper',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that this moved, but it makes more sense this way? Not sure why it was loaded so early before.

];

const cssDirName = fileURLToPath(new URL('build/assets/css', import.meta.url));
Expand Down