-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
fix(theme-classic): fix announcementBar css #5873
Conversation
✔️ [V2] 🔨 Explore the source changes: 9c07903 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/6184017e3845d000079f7470 😎 Browse the preview: https://deploy-preview-5873--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5873--docusaurus-2.netlify.app/ |
Size Change: +26 B (0%) Total Size: 881 kB ℹ️ View Unchanged
|
Oh, that's not a good sign, it might have a negative impact on heavily customized sites. |
@slorber if we remove ErrorBoundary from the App component, styles order will be the same as earlier. We use ErrorBoundary in Layout comp, maybe that will be enough? |
🤷♂️ we still want to catch errors that may be above unfortunately, not really willing to remove it. Users might want to use a different layout or have errors thrown in |
It's more like a rare use case, isn't it? Then I would remove the root ErrorBoundary, at least until we get consistent CSS ordering. |
The thing is we don't know for sure why ErrorBoundary does change the CSS order, so how can we be sure that removing it will actually keep the correct order forever? |
We already know that CSS ordering has changed as a result of this root error boundary, why this is the case is not yet known. However, better to eliminate this side effect before making new release. |
Ok Maybe give a try to use the theme-fallback Error in this case instead of the real theme Error? That would be better than plainly removing it |
This is quite unexpected, but makes sense. When Docusaurus mounts the Before this, we never loaded I've added a So indeed, we are not actually respecting our spec that "client modules are loaded before React starts rendering" |
For now, I'd prefer if we reverted to the old behavior until we have a proper plan to fix these CSS ordering issues once for all. To restore the old behavior, maybe we can use this in App? |
Well, it's more about importing the original |
Agree, not a good fix. I really don't want to do any CSS ordering changes in a hurry without a careful plan |
Sure, seems like a good enough fix for now if we are to release soon
I can assert that there's no ordering change in #5983 (which currently just makes client modules do what they used to do), but I understand your concern. I would do the actual reordering once and for all in that PR |
Motivation
After merging this PR: #3104
The insertion order of CSS classes became different 🤷♂️
This is a temporary fix, the original problem looks related to #3678
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
preview