Skip to content

Migration docusaurus 2#429

Open
ThakurKarthik wants to merge 9 commits intofacebook:mainfrom
ThakurKarthik:Migration-Docusaurus-2
Open

Migration docusaurus 2#429
ThakurKarthik wants to merge 9 commits intofacebook:mainfrom
ThakurKarthik:Migration-Docusaurus-2

Conversation

@ThakurKarthik
Copy link
Copy Markdown

Hello @yangshun , @endiliey review this pr when you got time.

I was working on migrating docusaurus of this repo to new V2 version

Deployed at https://thakurkarthik.github.io/redex/ for testing.

This pr on successful merge takes the docusaurus version to new v2 alpha for fbredex

This PR belongs to #426 and facebook/docusaurus#1834

Here are some screenshots of the new site.

Landing Page

Screenshot (155)

Docs Page

Screenshot (156)

FAQ Page

Screenshot (157)

Comment thread website/package.json Outdated
"write-translations": "docusaurus-write-translations",
"version": "docusaurus-version",
"rename-version": "docusaurus-rename-version"
"examples": "docusaurus examples",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"examples": "docusaurus examples",

Comment thread website/package.json Outdated
"examples": "docusaurus examples",
"start": "docusaurus start",
"build": "docusaurus build",
"publish-gh-pages": "docusaurus publish",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"publish-gh-pages": "docusaurus publish",

Comment thread website/package.json Outdated
"start": "docusaurus start",
"build": "docusaurus build",
"publish-gh-pages": "docusaurus publish",
"write-translations": "docusaurus write-translations",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"write-translations": "docusaurus write-translations",

Comment thread website/package.json Outdated
"build": "docusaurus build",
"publish-gh-pages": "docusaurus publish",
"write-translations": "docusaurus write-translations",
"version": "docusaurus version",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"version": "docusaurus version",

Comment thread website/package.json Outdated
"publish-gh-pages": "docusaurus publish",
"write-translations": "docusaurus write-translations",
"version": "docusaurus version",
"rename-version": "docusaurus rename-version",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"rename-version": "docusaurus rename-version",

Comment thread website/docusaurus.config.js Outdated

/* Custom fonts for website */
/*
fonts: {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

delete it. why make it commented when its unused

Comment thread website/docusaurus.config.js Outdated
* LICENSE file in the root directory of this source tree.
*/

// See https://docusaurus.io/docs/site-config for all the possible
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
// See https://docusaurus.io/docs/site-config for all the possible

Comment thread website/docusaurus.config.js Outdated
// },

// Add custom scripts here that would be placed in <script> tags.
scripts: ["https://buttons.github.io/buttons.js"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i dont think its needed now

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

So github stars won't be coming,in v1 it was present in footer https://fbredex.com/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yep we don't plan to show it in the footer anymore. You may ignore that.

Copy link
Copy Markdown

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

The website looks great @ThakurKarthik! Thanks for deploying on your gh-pages so we can check it out. The only comments I have are regarding the Index page and CSS. Otherwise looks great!

@@ -0,0 +1,129 @@
/**
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please use 2 spaces (at the most, 4) for indentation. Recommend you install the Prettier plugin for your editor.

Comment thread website/src/css/custom.css Outdated
@@ -59,13 +66,17 @@
.button {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remove these .button styles. Use the default by Docusaurus CSS. Refer to https://github.com/facebook/create-react-app/blob/master/docusaurus/website/src/pages/index.js as an example of the CSS classes available.

Comment thread website/src/pages/faq.js
@@ -0,0 +1,72 @@
/**

This comment was marked as resolved.

Comment thread website/src/pages/faq.js Outdated
<div className="docMainWrapper wrapper">
<div className="container padding-vert--lg padding-top--xl">
<div className="post">
<header className="postHeader">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment thread website/src/theme/Footer/index.js Outdated
@@ -0,0 +1,110 @@
/**
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just use the default Footer, don't need to swizzle.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

unswizzling here just means to delete the Footer file right?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yep you're right!

Comment thread website/src/pages/index.js Outdated
}
];

class Button extends React.Component {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Don't need a Button component. Just do

import Link from '@docusaurus/Link`;

...

<Link className="button button--outline" href={withBaseUrl('...')} />

Using our <Link> component will cause it to do a front end redirect instead of full-page redirect.

Comment thread website/src/css/custom.css Outdated
/* your custom css */

@font-face {
font-family: 'Lato';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't think the Lato Google font is loaded at all...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

should i remove it?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes I'd lean towards that. We won't need to write too much in custom.css as they apply globally. Page-specific CSS should be written in CSS modules.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@yangshun please check for the updated build here https://thakurkarthik.github.io/redex/ .In my latest commit i have moved styles to local module.In the custom.css only some colors and fonts are present,for the fonts i am not that much aware if they are working or not.Can you please check for that and signal me accordingly.Thanks for the reviews !

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fonts look different from those on the current fbredex.com...

@ThakurKarthik
Copy link
Copy Markdown
Author

@yangshun @endiliey i have pushed my code,can you make some time and review it Thanks !

@yangshun
Copy link
Copy Markdown

@ThakurKarthik I think there are conflicts now. Could you resolve them?

From Redex site could @int3 help? Or I can do the reviewing instead and preserve as much of v1 design and functionality as possible.

@ThakurKarthik
Copy link
Copy Markdown
Author

@yangshun i haved merged with latest master now there should be no conflicts.

@int3
Copy link
Copy Markdown
Contributor

int3 commented Oct 30, 2019

I'm not too picky... would be nice to keep some of the old button/grey background styling, but I don't think it matters too much. I'm not a designer anyway :p

If you can fix the fonts I'm happy to merge this

@yangshun
Copy link
Copy Markdown

yangshun commented Oct 30, 2019 via email

@int3
Copy link
Copy Markdown
Contributor

int3 commented Oct 31, 2019

Ah alright then. Standardizing the font makes sense. Thanks!

@yangshun
Copy link
Copy Markdown

yangshun commented Nov 3, 2019

Ref: facebook/docusaurus#1834

@yangshun
Copy link
Copy Markdown

yangshun commented Nov 3, 2019

@ThakurKarthik could you remove the font styling in the CSS file? Then I think it should be good.

Comment thread website/src/css/custom.css Outdated
--ifm-color-primary-lightest: rgb(248, 248, 248);
}

body {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remove this whole class

--ifm-color-primary-lighter: rgb(158, 211, 191);
--ifm-color-primary-lightest: rgb(186, 224, 210);
--ifm-color-secondary: #f9f9f9;
--ifm-color-primary-dark: rgb(216, 216, 216);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please just leave what's necessary.

Comment thread website/src/css/custom.css Outdated
@@ -40,14 +55,6 @@
font-style: normal;
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@yangshun should i remove fonts from website/static/css/custom.css too?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes please

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@yangshun I have removed the fonts.

Comment thread website/package.json Outdated
"devDependencies": {
"docusaurus": "^1.7.2"
"@docusaurus/core": "^2.0.0-alpha.27",
"@docusaurus/preset-classic": "^2.0.0-alpha.27",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@ThakurKarthik can you please update Docusaurus to the latest version?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have updated them to newer 2.0.0-alpha.34 version

@justinjhendrick
Copy link
Copy Markdown
Contributor

Is this pull request ready to merge now? Has all the feedback been incorporated? Are all the reviewers happy?

@ThakurKarthik
Copy link
Copy Markdown
Author

Hey @justinjhendrick not sure if it the code is working anymore as docusaurus has gone through major changes i guess !

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants