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

WIP: Migrate from docusaurus v1 to v2 #2139

Closed
wants to merge 40 commits into from

Conversation

darshkpatel
Copy link
Contributor

@darshkpatel darshkpatel commented Aug 12, 2020

Ref: facebook/docusaurus#3195

The deploy preview is currently broken, so here's a copy of this branch deployed
https://deploy-preview-5--react-native-website-migration.netlify.app/

To do:

  • Fix SnackPlayer and Prism config
  • Update content tabs

  • Remove old versions
  • Fix errors in 0.60 docs
  • Fix errors in 0.61 docs
  • Fix errors in 0.62 docs
  • Fix errors in 0.63 docs
  • Fix errors in current docs
  • Fix url-loader issue
  • Fix errors in blog
  • Make changes to footer
  • Update CI Config for v2
  • Make changes to navbar
  • Migrate landing page
  • Migrate other pages 🔨
  • Migrate documentation markdown files 🔨
  • Ensure legacy site works
  • manual redirects for removed pages
    Documentation Bugs:
  • CSS not loading properly in docs
  • colours.md not rendering example colours
  • Disappearing content issue with getting started page on prod

Legend:

🔨 - in progress

  • - complete

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@facebook-github-bot
Copy link

Hi @darshkpatel!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

4 similar comments
@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@darshkpatel darshkpatel marked this pull request as draft August 13, 2020 06:54
@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@Simek Simek added the MLH Major League Hacking label Aug 13, 2020
@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

1 similar comment
@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@@ -4,9 +4,9 @@ version: 2.1
# EXECUTORS
# -------------------------
executors:
node8:
node10:
Copy link
Collaborator

Choose a reason for hiding this comment

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

CI Node image has been updated to the LTS in #2140.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool. Maybe it would solve the memory issue 😝

Copy link
Collaborator

Choose a reason for hiding this comment

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

@slorber LTS bump fixed that OOM issue it seems 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for your help! 😄

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

2 similar comments
@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@darshkpatel
Copy link
Contributor Author

darshkpatel commented Aug 14, 2020

🥳
Screenshot 2020-08-14 at 3 15 36 PM
Will try to fix the deploy preview too

@darshkpatel
Copy link
Contributor Author

darshkpatel commented Aug 14, 2020

@Simek should i remove netlify-reduce-versions since the v2 site only has versions >0.60
or should i still keep it and change the filter to >v0.60

@Simek
Copy link
Collaborator

Simek commented Aug 14, 2020

@darshkpatel I'm not familiar with this pipeline. You should ask @charpeni about that, he is responsible for the website previews. He also should be able to help you with fixing the preview deployment script.

@darshkpatel
Copy link
Contributor Author

darshkpatel commented Aug 14, 2020

Removed the reduce-versions script since filtering >0.60 kind of defeats the whole purpose of the script. Lemme know if I should modify the script instead @charpeni

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

2 similar comments
@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

netlify.toml Outdated
@@ -1,4 +1,4 @@
[build]
base = "v2-website"
publish = "v2-website/build"
command = "sed -i -e \"s|const baseUrl .*|const baseUrl = '/'|g\" docusaurus.config.js && yarn install && yarn sync-community-repos && yarn build"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

yarn sync-community-repos is needed to get the list of community repos, it's essential I believe.

Copy link
Contributor

Choose a reason for hiding this comment

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

yup, I was trying to see which part was causing the problem. I think I got it

Copy link
Contributor

@teikjun teikjun Aug 14, 2020

Choose a reason for hiding this comment

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

guess not! 😅 I thought it was only because netlify was looking for v2-website/v2-website/build, but I'm still missing something else. I'll try again tmr
Anyway, I deployed a test site using the same netlify.toml (without the yarn sync-community-repos) here:
repo: https://github.com/teikjun/react-native-deploy
test site (netlify): https://react-native-v2.netlify.app/docs/
test site (vercel): https://react-native-deploy.vercel.app/docs/ (same thing)

Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @teikjun, were you able to get the deploy preview working finally? Can I help?

Also, can you put the preview links at the top so that they are more easy to find ? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't figure out what was causing the deploy preview to fail, so we're using our own previews for now.
@darshkpatel has just added the preview links to his PR description at the top! :)

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

3 similar comments
@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@s-pace
Copy link

s-pace commented Aug 24, 2020

@Simek thank you for your feedback.

But I have a question: why (on the attached screenshot) yello matches hello query? 🙂

This is intended since Algolia search is typo tolerant. It will help your end users to find what they are looking for even if their query has a typo. For example, the query scrolview would still match scrollview (1 l instead of 2)

image

@darshkpatel
Copy link
Contributor Author

darshkpatel commented Aug 25, 2020

I've force-pushed the changes from an alternate branch which preserves contributions for /docs
Ref: #2146 (comment) , #2146 (comment)

@darshkpatel
Copy link
Contributor Author

SnackPlayer also works now 🥳

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

2 similar comments
@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@react-native-bot
Copy link

Oops, something went wrong with this deploy preview.

@charpeni can you look at this?

@slorber
Copy link
Contributor

slorber commented Aug 28, 2020

Hey!

I've created this org and fork so that we can work on this migration in a more organized way:
https://github.com/react-native-website-migration/react-native-website

francoischalifour added a commit to francoischalifour/autocomplete.js that referenced this pull request Sep 1, 2020
This doesn't close the modal when selecting the input text and finishing the selection outside of the modal.

See facebook/react-native-website#2139 (comment)
@Simek
Copy link
Collaborator

Simek commented Sep 2, 2020

  • Migrate landing page

@darshkpatel The homepage is empty right now - https://react-native-v2.netlify.app/.

  • Make changes to navbar

@darshkpatel There are several changes that are still required:

  • navbar should be dark in both themes (the only component/element which should change theme is search bar),
  • navbar components/sections should be in other order and only logo and versions link should be positioned to the left side,
  • ideally versions page link and versions selector should merged to one component.

@slorber
Copy link
Contributor

slorber commented Sep 2, 2020

Can be closed in favor in the new migration fork: react-native-website-migration#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Major Contribution A contribution that changes the site's structure or majorly changes the content of a page MLH Major League Hacking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Website to Docusaurus 2
10 participants