Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Upgrade to Docusaurus 2 #2268

Closed
wants to merge 3 commits into from
Closed

Upgrade to Docusaurus 2 #2268

wants to merge 3 commits into from

Conversation

yangshun
Copy link
Contributor

@yangshun yangshun commented Dec 1, 2019

Summary

Fixes #2261. This should be merged after #2267 (how I wish there were stacked diffs on GitHub)

Migrate the website to Docusaurus 2 which provides the following benefits specific to Draft.js:

  • Consistency with the other FB Docusaurus websites
  • Easy way to import Draft.js (bundle via webpack, no more ugly client-side script tags)
  • Nicer CSS framework
  • Dark mode (disabled for now until I sort out the dark mode styling for the editor)

Changes made:

  • I also changed the theme color of Draft.js to be lighter brown so that the contrast is better in general (much better on dark mode). Let me know if this is not ok.

Test Plan

Screen Shot 2019-11-30 at 9 16 32 PM

Screen Shot 2019-11-30 at 9 16 39 PM

Try it out here - https://build-swart-eight.now.sh

@@ -0,0 +1,100 @@
/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file already exists in the D1 version, just renamed.

</div>
);
};

ReactDOM.render(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is transferred into a separate component.

@claudiopro claudiopro self-assigned this Dec 1, 2019
@claudiopro claudiopro added dependencies Pull requests that update a dependency file documentation website Issues related to Draft.js website labels Dec 1, 2019
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@yangshun has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@claudiopro
Copy link
Contributor

This is looking good - I'd prefer to leave the theme color the same as it affects branding (e.g. Twitter account, sticker designs etc.) and would require broader coordination. The project is indeed screaming for better branding and would love to plan something in H1. Let's keep the impact of dark mode on theme colors in a separate conversation for now.

@claudiopro
Copy link
Contributor

I think it's okay to leave the current theme color for dark mode for the time being, but I like that you're trying to refresh the look of the website 😃 let's chat about the dark theme for the editor itself on a separate issue.

Screen Shot 2019-12-03 at 11 33 54 AM
Screen Shot 2019-12-03 at 11 33 49 AM

Copy link
Contributor

@claudiopro claudiopro left a comment

Choose a reason for hiding this comment

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

Let's leave theme color out of this diff for the moment, as it affects project branding. Otherwise looking good! 🎉

website/src/css/custom.css Outdated Show resolved Hide resolved
website/static/img/draftjs-logo.svg Outdated Show resolved Hide resolved
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@yangshun has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@@ -49,7 +49,7 @@ script:
git config --global user.name "Travis CI"
git config --global user.email "travis@reactjs.org"
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc
cd website && yarn install && GIT_USER=reactjs-bot npm run publish-gh-pages
cd website && yarn install && GIT_USER=reactjs-bot USE_SSH=true yarn deploy
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the new deploy command in Docusaurus v2

@@ -74,7 +74,7 @@ supplied text.
</li>
<li>
<a href="#getcharacterlist">
<pre>getCharacterList(): List<CharacterMetadata></pre>
<pre>getCharacterList(): List&lt;CharacterMetadata&gt;</pre>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately we use MDX (JSX in Markdown) now so it thinks <CharacterMetadata> is a React component and I have to change it to use the character entity references.

@yangshun
Copy link
Contributor Author

yangshun commented Dec 4, 2019

The dark mode for the editor needs more work - the editor text is still the same shade of gray and can hardly be seen, hence I disabled it. Unless you think it's not an issue at all then I shall enable it :D

@facebook-github-bot
Copy link

@yangshun merged this pull request in 5b10191.

mmissey pushed a commit to mmissey/draft-js that referenced this pull request Mar 24, 2020
Summary:
**Summary**

Fixes facebookarchive#2261. This should be merged after facebookarchive#2267 (how I wish there were stacked diffs on GitHub)

Migrate the website to Docusaurus 2 which provides the following benefits specific to Draft.js:

- Consistency with the other FB Docusaurus websites
- Easy way to import Draft.js (bundle via webpack, no more ugly client-side script tags)
- Nicer CSS framework
- Dark mode (disabled for now until I sort out the dark mode styling for the editor)

Changes made:

- I also changed the theme color of Draft.js to be lighter brown so that the contrast is better in general (much better on dark mode). Let me know if this is not ok.

**Test Plan**

<img width="1552" alt="Screen Shot 2019-11-30 at 9 16 32 PM" src="https://user-images.githubusercontent.com/1315101/69909874-bc28fd80-13b6-11ea-90bb-c6b44a1186a5.png">
<img width="1552" alt="Screen Shot 2019-11-30 at 9 16 39 PM" src="https://user-images.githubusercontent.com/1315101/69909875-bcc19400-13b6-11ea-9eda-c6eabfc4fde4.png">

Try it out here - https://build-swart-eight.now.sh
Pull Request resolved: facebookarchive#2268

Reviewed By: mrkev

Differential Revision: D18758642

Pulled By: yangshun

fbshipit-source-id: 169087f716ef2792dade75388b86debbaf34ac44
vilemj-Viclick pushed a commit to kontent-ai/draft-js that referenced this pull request Jul 16, 2020
Summary:
**Summary**

Fixes facebookarchive#2261. This should be merged after facebookarchive#2267 (how I wish there were stacked diffs on GitHub)

Migrate the website to Docusaurus 2 which provides the following benefits specific to Draft.js:

- Consistency with the other FB Docusaurus websites
- Easy way to import Draft.js (bundle via webpack, no more ugly client-side script tags)
- Nicer CSS framework
- Dark mode (disabled for now until I sort out the dark mode styling for the editor)

Changes made:

- I also changed the theme color of Draft.js to be lighter brown so that the contrast is better in general (much better on dark mode). Let me know if this is not ok.

**Test Plan**

<img width="1552" alt="Screen Shot 2019-11-30 at 9 16 32 PM" src="https://user-images.githubusercontent.com/1315101/69909874-bc28fd80-13b6-11ea-90bb-c6b44a1186a5.png">
<img width="1552" alt="Screen Shot 2019-11-30 at 9 16 39 PM" src="https://user-images.githubusercontent.com/1315101/69909875-bcc19400-13b6-11ea-9eda-c6eabfc4fde4.png">

Try it out here - https://build-swart-eight.now.sh
Pull Request resolved: facebookarchive#2268

Reviewed By: mrkev

Differential Revision: D18758642

Pulled By: yangshun

fbshipit-source-id: 169087f716ef2792dade75388b86debbaf34ac44
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
**Summary**

Fixes facebookarchive/draft-js#2261. This should be merged after facebookarchive/draft-js#2267 (how I wish there were stacked diffs on GitHub)

Migrate the website to Docusaurus 2 which provides the following benefits specific to Draft.js:

- Consistency with the other FB Docusaurus websites
- Easy way to import Draft.js (bundle via webpack, no more ugly client-side script tags)
- Nicer CSS framework
- Dark mode (disabled for now until I sort out the dark mode styling for the editor)

Changes made:

- I also changed the theme color of Draft.js to be lighter brown so that the contrast is better in general (much better on dark mode). Let me know if this is not ok.

**Test Plan**

<img width="1552" alt="Screen Shot 2019-11-30 at 9 16 32 PM" src="https://user-images.githubusercontent.com/1315101/69909874-bc28fd80-13b6-11ea-90bb-c6b44a1186a5.png">
<img width="1552" alt="Screen Shot 2019-11-30 at 9 16 39 PM" src="https://user-images.githubusercontent.com/1315101/69909875-bcc19400-13b6-11ea-9eda-c6eabfc4fde4.png">

Try it out here - https://build-swart-eight.now.sh
Pull Request resolved: facebookarchive/draft-js#2268

Reviewed By: mrkev

Differential Revision: D18758642

Pulled By: yangshun

fbshipit-source-id: 169087f716ef2792dade75388b86debbaf34ac44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed dependencies Pull requests that update a dependency file documentation Merged website Issues related to Draft.js website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Website to Docusaurus 2 Alpha
3 participants