-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(website): upgrade docusaurus #4692
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
chore(website): upgrade docusaurus #4692
Conversation
Thanks for the PR, @Josh-Cena! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super, thanks!
The Cypress failure looks suspicious. It wasn't like this before. Does that mean there are new a11y regressions in Docusaurus itself? |
packages/website/src/css/custom.css
Outdated
@@ -8,7 +8,7 @@ | |||
@import './prism.css'; | |||
|
|||
/* You can override the default Infima variables here. */ | |||
html:root { | |||
html { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except, now something in either this change or the docusaurus bump is causing aXe to think the page has some element(s) with lower color contrast than needed though: https://github.com/typescript-eslint/typescript-eslint/runs/5581627126?check_suite_focus=true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me try reverting this first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oop, test failures?
Huh, the contrast problem is indeed gone—very weird! We probably need to update the palette somehow, as the current dark mode palette in production is absolutely less accessible than it should. |
072af19
to
dbda680
Compare
Now blocked on #4739 |
@Josh-Cena I'm hoping #4740 fixed that one. Updating this branch to the newest |
Ooops, no 😞 |
😭 |
Looking at the log, looks like Cypress is trying to connect before the client is even ready |
I wonder if we can |
It's configured in - name: Cypress run
uses: cypress-io/github-action@v2
with:
project: ./packages/website
start: yarn start ...maybe it's a performance issue somewhere? https://github.com/cypress-io/github-action#wait-on might help. I'm on mobile right now but can try it tomorrow-ish if you don't have time before then. |
Mostly just unfamiliarity with Cypress 😄 If you have a plan already I'd let you handle that |
@Josh-Cena you can check #4771, this should make it work and let us work with dark/light mode |
@armano2 Instead of stacking duplicate selectors ( |
@Josh-Cena I'm ok with this change, but we are having issue now with how overrides has lower priority than colors defined in docusaurus,
{
"id": "color-contrast",
"data": {
"fgColor": "#969faf",
"bgColor": "#ebedf0",
"contrastRatio": 2.27,
"fontSize": "12.0pt (16px)",
"fontWeight": "normal",
"messageKey": null,
"expectedContrastRatio": "4.5:1"
},
"relatedNodes": [
{
"html": "<button type=\"button\" class=\"DocSearch DocSearch-Button\" aria-label=\"Search\">",
"target": [".DocSearch"]
}
],
"impact": "serious",
"message": "Element has insufficient color contrast of 2.27 (foreground color: #969faf, background color: #ebedf0, font size: 12.0pt (16px), font weight: normal). Expected contrast ratio of 4.5:1"
} live: this branch: |
Okay, I see. Reverted CSS changes. Probably related to facebook/docusaurus#3678 |
Codecov Report
@@ Coverage Diff @@
## main #4692 +/- ##
==========================================
+ Coverage 91.75% 92.59% +0.83%
==========================================
Files 226 186 -40
Lines 10558 10133 -425
Branches 3263 3215 -48
==========================================
- Hits 9688 9383 -305
+ Misses 590 501 -89
+ Partials 280 249 -31
Flags with carried forward coverage won't be shown. Click here to find out more. |
@bradzacher I think we can get this merged today? It's now a trivial version bump and from my manual visual testing there seems to be no regressions. I don't have plans about when beta.19 will be out, but probably not this week (since we haven't completed the main features yet), so this should be good to merge. |
I don't know what the Cypress test is up to but since the color mode toggle has changed... The failure is kinda expected. |
cc @JoshuaKGoldberg for the cypress failure:
I tried retrying the test and it failed in the same way. |
That '🌞' used to be a part of the color mode toggle, and the latter is now SVG based. |
Ah. So then the test is failing not as a false positive, but because the upgrade broke it. We'll need to fix that as part of this PR. |
Ah, I see. Thanks for the pointer! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noice. Thanks for this!
PR Checklist
Addresses an existing issueThat issue was marked as accepting prsOverview
This upgrades Docusaurus to the latest version.
The latest version provides doc breadcrumbs, but it admittedly doesn't look good on our website, so I turned it off.
In addition, I noticed that the dark mode selector
html[data-theme="dark"]
currently has a lower specificity than the light modehtml:root
, so it's never applied and causes low accessibility:That has been fixed.
(Ignore the logo, it wasn't loaded locally for some reason)