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

chore: update docusaurus #12500

Merged
merged 6 commits into from
Mar 5, 2022
Merged

chore: update docusaurus #12500

merged 6 commits into from
Mar 5, 2022

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Feb 26, 2022

Summary

Closes #12432

Test plan

Click around deployment preview

@SimenB
Copy link
Member Author

SimenB commented Feb 26, 2022

This fails since we haven't done https://docusaurus.io/blog/2021/11/21/algolia-docsearch-migration.

@slorber how do we solve this? 😅 I've never gotten an email from Algolia (I'm probably not a "site owner" tho)

@slorber
Copy link
Contributor

slorber commented Mar 3, 2022

@shortcuts can tell who's the site owner and eventually set a new one.

I guess it's better if Meta owns the Algolia account for Jest? 🤷‍♂️
(you can be added as a member in the admin dashboard)

Not sure who to contact, maybe @zpao @hramos ?

@shortcuts
Copy link

shortcuts commented Mar 3, 2022

Hey, checking..

Edit: on my side @vjeux is the owner of the Jest account, but the invite expired (7 days validity). Let me know if I should add anyone else, you'll then be able to manage team members yourself

@slorber
Copy link
Contributor

slorber commented Mar 3, 2022

@SimenB I have access and invited you

Just use this on the config:

indexName: jest-v2
appId: HP439UUSOL
apiKey: e5e670fd16f8f17caada79d6b0931682

Similarly the archived deployment will be fixed in #12543

@SimenB
Copy link
Member Author

SimenB commented Mar 3, 2022

Thanks! Makes sense for some Meta employee (or them as an org) being admin, yes 🙂

@SimenB
Copy link
Member Author

SimenB commented Mar 3, 2022

image

some other error... I'll look into it tomorrow

@slorber
Copy link
Contributor

slorber commented Mar 4, 2022

@SimenB this is related to a breaking change we did on the TOC component: now the TOC structure is "flat" instead of being a tree: facebook/docusaurus#6729

When running locally on those reported URLs you can see a better console error.

image


Some of the Jest pages are using inline TOCs with some TOC filtering and should be updated accordingly.

image

It's not possible anymore to access .children on top items

- <TOCInline toc={toc[toc.length - 1].children}/>
+ <TOCInline toc={toc.slice(2)} />

cc @Josh-Cena maybe we should have a clearer error message? I don't think this would impact a lot of users though 🤷‍♂️

@Josh-Cena
Copy link
Contributor

maybe we should have a clearer error message?

There isn't much we can do, since the .children access happens on the client side, before it is even passed to any Docusaurus code... The only way is to have something like:

const toc = [
  {
     get children() { throw new Error("children doesn't exist"); }
  },
];

which is just weird...

@slorber
Copy link
Contributor

slorber commented Mar 4, 2022

was more thinking about throwing if toc is undefined, but probably useless

Let's see if someone else come up with a similar problem

@SimenB
Copy link
Member Author

SimenB commented Mar 5, 2022

Aha, thanks @slorber!

@SimenB SimenB merged commit 095f65e into jestjs:main Mar 5, 2022
@SimenB SimenB deleted the bump-docusaurus branch March 5, 2022 08:34
@github-actions
Copy link

github-actions bot commented Apr 5, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Website Scroll is Broken
5 participants