Skip to content

Migrate RN website from v1 to v2#43

Open
teikjun wants to merge 40 commits into
docs/masterfrom
docs/v2-migration
Open

Migrate RN website from v1 to v2#43
teikjun wants to merge 40 commits into
docs/masterfrom
docs/v2-migration

Conversation

@teikjun

@teikjun teikjun commented Aug 20, 2020

Copy link
Copy Markdown
Member

To do list

  • Run migration CLI
  • Remove unused versions
  • remove from /versioned_docs, /versioned_sidebar, versions.json, docusaurus.config.js
  • Fix build errors from all versioned_docs and current docs
  • close all unclosed tags, remove invalid tags (handled by Backwards compatible docs fixes for docusaurus upgrade react/react-native-website#2158)
  • for any invalid JSX outside codeblocks, enclose them in codeblocks (handled by Backwards compatible docs fixes for docusaurus upgrade react/react-native-website#2158)
  • use MDX compatible syntax: change class to className, change style="..." to style={{...}}.
  • Fix other build errors
  • Fix url-loader issue by adding it as dependency in root directory ( as a hack )
  • Fix errors in blog
  • Migrate navbar items
  • Migrate footer items
  • Migrate pages for help, showcase, version
  • replace CompLibrary, siteConfig and other deprecated things with appropriate substitutes
  • In docusaurus.config.js, set preset-classic's pages.path to be 'pages/en'
  • Migrate CSS for pages and docs
  • Use CSS modules to limit scope of CSS (global CSS can affect theme components)
  • Remove incompatible CSS and fix bugs
  • Move assets (handled by move image assets from docs to statics folder react/react-native-website#2157)
  • Move /docs/assets into /static/docs/assets
  • Move missing images from /blog/assets into /static/blog/assets
  • Migrate landing page
  • Fix CSS bugs in landing page
  • Customize Prism setup and SnackPlayer using remarkablePlugins 🔨
  • Fix custom CSS components in docs
  • Fix tabbed items in docs 🔨
  • Replace quotes with admonitions in docs
  • Add redirects for moved/renamed docs

Test site
https://reactnative-v2.netlify.app/docs/

Active branches:
docs/v2-migration - We're working on this branch!
docs/master - our base branch (before any migration)

Inactive branches (may be useful for reference):
docs/migration - ran cli without flags. A new branch was needed because this one does not preserve git history
docs/2-migration - ran cli with --page --mdx, use this as reference

Legends:

🔨 - in progress

  • - complete

Note: After ticking each item, we'll add a more detailed log and group similar items. Also, TJ should relay this todo to RN repo.

Issues that need to be fixed on CLI:

  • use relative path for presets.docs.sidebarPath, presets.theme.customCss
  • says subcategory instead of category

@teikjun teikjun changed the title Docs/v2 migration Migrate RN website from v1 to v2 Aug 20, 2020
@darshkpatel darshkpatel force-pushed the docs/v2-migration branch 3 times, most recently from 6d92864 to 1b5bce7 Compare August 20, 2020 10:16
@darshkpatel

darshkpatel commented Aug 20, 2020

Copy link
Copy Markdown
Member

Alright! Finally fixed all the issues with the site without adding extra commits.
PS. I swear this is the last force push. I'm done rebasing stuff

@darshkpatel

Copy link
Copy Markdown
Member

Updated the blog paths in the previous commits to reflect upstream master changes

@darshkpatel

darshkpatel commented Aug 24, 2020

Copy link
Copy Markdown
Member

SnackPlayer works now 🥳

@darshkpatel

Copy link
Copy Markdown
Member

Note: Index page has an issue currently, browsing http://localhost:3000/docs/ will help

@teikjun

teikjun commented Aug 24, 2020

Copy link
Copy Markdown
Member Author

bugs to squash:

  • "exports" error at index page and versions page

  • this may be related to const docusaurusConfig = require('../../docusaurus.config.js'); which may be treated as mixing es6 and commonjs syntax.

  • gray boxes in place of snack player (e.g. at docs/styles)

  • not sure about this atm

@darshkpatel

darshkpatel commented Aug 25, 2020

Copy link
Copy Markdown
Member
  • gray boxes in place of snack player (e.g. at docs/styles)

Apparently refreshing the page fixes it
Screenshot 2020-08-25 at 6 11 35 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants