profile
viewpoint
Yangshun Tay yangshun @facebook Singapore yangshun.im Full Front End Stack @facebook · Raising 🦖via Docusaurus · Ex-@grab · Look I'm a ☁️ developer! · 🇸🇬

quarbby/links-and-resources 199

:books: :pencil2: :mortar_board: A collection of textbooks, links and resources during our studying years in NUS SoC

khankuan/audiosign 22

AudioSignJS allows the broadcasting/listening of an id (32-bits) to/from a device to another via sound (Ultrasound).

nusmodifications/react-redux-starter 13

Minimal non-opinionated starter for modern single-page applications.

khankuan/rtcstarjs 12

A star topology client-server framework for WebRTC using PeerJS

jin/NUSWhispers-iOS 10

iOS app for an anonymous confession platform.

khankuan/colorplus 8

Simple color game written with Flux, React and Sass

khankuan/react-catalog 7

React Catalog is a UI Component development and documentation tool

weiqingtoh/corspedia 7

Corspedia is an easy-to-use search engine for NUS CORS Bidding Archives. It provides a clean and simple interface for students to search for the bidding history of any module and displays the relevant results according to their profile: Faculty, New/Returning student and Programmes/General account.

push eventfacebook/docusaurus

Robert

commit sha e54ede52843ba5f430dcf1e025387dbeaf27adff

fix(v2): add @babel/preset-typescript to babel-loader (#2310)

view details

push time in 3 hours

PR merged facebook/docusaurus

chore(v2): Add @babel/preset-typescript to babel-loader CLA Signed tag: bug fix

Motivation

With #2221 docusaurus v2 is able to detect {ts,tsx} pages and components, but as soon as babel hits TypeScript syntax it fails. While the docusaurus babel.config.js includes @babel/preset-typescript, babel-loader inside the Webpack config does not.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

  1. Add typescript.tsx to your pages directory
  2. Add TypeScript syntax
import React from 'react';

export default () => {
  let name: string = 'World';

  return (
    <h1>Hello {name}!</h1>
  );
};
  1. Run docusaurus
  2. Check localhost:3000/typescript

Related PRs

#2221

+1 -0

1 comment

1 changed file

deniaz

pr closed time in 3 hours

push eventfacebook/docusaurus

Zhenchao Cai

commit sha b25eb5dd36073d4f228928f6ee5d047007f2d4c3

docs(v2): move the quotes to remark admonitions (#2313) * docs(v2): move the quotes to remark admonitions * Delete package-lock.json Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>

view details

push time in 3 hours

PR merged facebook/docusaurus

Reviewers
docs(v2): move the quotes to remark admonitions CLA Signed

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Make quotes more obvious to see by replacing them with admonitions. #2304

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

It is just docs update, so I manually verified them under https://localhost:3000/docs/next. I also run yarn prettier && yarn lint and yarn test to make use it passes all the tests.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+91 -19

1 comment

10 changed files

Zhencha0Cai

pr closed time in 3 hours

push eventZhencha0Cai/docusaurus

Yangshun Tay

commit sha ef1f884f8deed074187993cce450195fcdd56b21

Delete package-lock.json

view details

push time in 3 hours

issue commentfacebook/docusaurus

[v2] move the quotes to remark admonitions

Hmm I think you need to add a title. Try the following formats:

:::tip Title
The content and title *can* include markdown.
:::

or add an empty line after the :::

:::tip

The content and title *can* include markdown.
:::
yangshun

comment created time in a day

delete branch facebook/docusaurus

delete branch : active-base-path-docs

delete time in 2 days

push eventfacebook/docusaurus

jartuso

commit sha d06ab640ff84ff5b0b14ef4ab75c2557c048f162

docs(v1): fix Windows instructions for GitHub Pages publishing (#2307) additional space after GIT_USER=<GIT_USER> && was throwing errors on windows

view details

push time in 2 days

PR merged facebook/docusaurus

docs(v1): fix Windows instructions for GitHub Pages publishing tag: documentation

additional space after GIT_USER=<GIT_USER> && was throwing errors on windows

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

I had an issue publishing to gh pages from windows. Created an issue and got a solution which I'm now passing on as a pr! https://github.com/facebook/docusaurus/issues/2258

Fixes #2258

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

I tried pushing a change to my gh-pages docs with the space "<GIT_USER> &&" it failed, when I tried without a space <GIT_USER>&& it worked.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+1 -1

2 comments

1 changed file

jartuso

pr closed time in 2 days

issue closedfacebook/docusaurus

Publish-gh-pages script fails -- error: git clone failed

🐛 Bug Report

When trying to publish changes to our github pages hosted site, the npm run publish-gh-pages step fails with the following error code (full output from powershell attached)

generate.js triggered... feed.js triggered... feed.js triggered... sitemap.js triggered... Site built successfully. Generated files in 'build' folder. 7ce717117293691c87678f7b3cc7fbe015e946de fatal: Too many arguments. Error: git clone failed npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ publish-gh-pages: docusaurus-publish npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ publish-gh-pages script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\artus\AppData\Roaming\npm-cache_logs\2020-01-30T23_49_07_563Z-debug.log

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

Windows 10 node (12.14.1) npm (6.13.4) yarn (1.21.1)

  1. clone documentation repo locally
  2. make edits in visual studio code
  3. run command: cmd /C "set GIT_USER=[myuser] && set CURRENT_BRANCH=master && npm run publish-gh-pages"
  4. fails :(

Note -- also fails in the same way when using yarn run publish-gh-pages

Expected behavior

My 1st time trying to push changes to our docusaurus site. I expected it to work without any errors.

Actual Behavior

npm run publish-gh-pages failed

Reproducible Demo

Repo that I'm trying to push changes for https://github.com/OpenBCI/Documentation/tree/master

docusaurus-errortxt.txt

closed time in 2 days

jartuso

push eventfacebook/docusaurus

Yangshun Tay

commit sha 787b073bb7679f374a59208bfc0d75c852fd23c0

docs(v2): nav links activeBasePath (#2303) * docs(v2): Nav links activeBasePath * rename activeBaseRoute to activeBasePath * fixes

view details

push time in 2 days

PR merged facebook/docusaurus

Reviewers
docs(v2): Nav links activeBasePath CLA Signed

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Add docs for #2299. I decided to rename activeBaseRoute to activeBasePath.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Just docs...

Related PRs

#2299

+35 -25

1 comment

7 changed files

yangshun

pr closed time in 2 days

Pull request review commentfacebook/docusaurus

docs(v2): Nav links activeBasePath

 module.exports = {         },         {           to: 'docs/introduction',-          activeBaseRoute: 'docs',+          activeBasePath: 'docs',           label: 'Docs',           position: 'left',         },-        {to: 'blog', label: 'Blog', position: 'left'},+        {to: 'blog', activeBasePath: 'blog', label: 'Blog', position: 'left'},

Sure, will remove.

yangshun

comment created time in 2 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha 16b5f1052adaffafdfb63d32867c8660b75cf5cf

fixes

view details

push time in 2 days

pull request commentfacebook/docusaurus

feat(v2): add support specify new languages for Prism

I'll take a stab at this over the weekend (or the next :S)

lex111

comment created time in 3 days

Pull request review commentfacebook/docusaurus

docs(v2): Nav links activeBasePath

 import useLockBodyScroll from '@theme/hooks/useLockBodyScroll';  import styles from './styles.module.css'; -function NavLink({activeBaseRoute, to, href, label, position, ...props}) {+function NavLink({activeBasePath, to, href, label, position, ...props}) {   const toUrl = useBaseUrl(to);-  const activeBaseUrl = useBaseUrl(activeBaseRoute);+  const activeBaseUrl = useBaseUrl(activeBasePath);   const activeBaseProps =-    activeBaseRoute != null+    activeBasePath != null

I guess I can do that. The other falsey values aren't valid path values anyway.

yangshun

comment created time in 3 days

Pull request review commentfacebook/docusaurus

docs(v2): Nav links activeBasePath

 module.exports = {         },         {           to: 'docs/introduction',-          activeBaseRoute: 'docs',+          activeBasePath: 'docs',           label: 'Docs',           position: 'left',         },-        {to: 'blog', label: 'Blog', position: 'left'},+        {to: 'blog', activeBasePath: 'blog', label: 'Blog', position: 'left'},

For now, nope. But we never know if that might change in future. Anyway no harm adding IMO. I'm also ok with removing but I think it's good for education.

yangshun

comment created time in 3 days

Pull request review commentfacebook/docusaurus

docs(v2): Nav links activeBasePath

 import useLockBodyScroll from '@theme/hooks/useLockBodyScroll';  import styles from './styles.module.css'; -function NavLink({activeBaseRoute, to, href, label, position, ...props}) {+function NavLink({activeBasePath, to, href, label, position, ...props}) {   const toUrl = useBaseUrl(to);-  const activeBaseUrl = useBaseUrl(activeBaseRoute);+  const activeBaseUrl = useBaseUrl(activeBasePath);   const activeBaseProps =-    activeBaseRoute != null+    activeBasePath != null

Because I want to check both null and undefined. != null checks for both.

yangshun

comment created time in 3 days

issue commentfacebook/docusaurus

PDF Download

@braco thanks for the feedback. What will you be moving to?

cooltrooper

comment created time in 3 days

issue openedfacebook/docusaurus

[v2] move the quotes to remark admonitions

📚 Documentation

We have a bunch of blockquotes in our documentation which looks like this and they are not very obvious because of the changes in v2's CSS.

Ever since callouts/admonitions have been added in 2.0.0.alpha.43 by the awesome @elviswolcott , we can use them in place of the blockquotes.

The task here is to go through the docs and help replace the use of blockquotes with the suitable admonitions. Refer to the admonitions docs for the available types.

Note that you do not have to convert all the blockquotes in the docs, you are free to just do whichever you please, but please comment here so that other interested contributors are aware and the contributions don't conflict.

Tip: The docs for the master version are found under https://localhost:3000/docs/next not https://localhost:3000/docs/ (that is the current released version)

Have you read the Contributing Guidelines on issues?

Yes

created time in 3 days

startedelviswolcott/remark-admonitions

started time in 3 days

Pull request review commentfacebookresearch/fastText

Docusaurusv2 Migration

+/**

Let's just use the default Footer without swizzling

scottilee

comment created time in 3 days

Pull request review commentfacebookresearch/fastText

Docusaurusv2 Migration

-{+module.exports = {

All FB code needs copyright docs

scottilee

comment created time in 3 days

Pull request review commentfacebookresearch/fastText

Docusaurusv2 Migration

 {   "scripts": {-    "start": "docusaurus-start",-    "build": "docusaurus-build",-    "publish-gh-pages": "docusaurus-publish",-    "examples": "docusaurus-examples"+    "start": "docusaurus start",+    "build": "docusaurus build",+    "swizzle": "docusaurus swizzle",+    "deploy": "docusaurus deploy"   },-  "devDependencies": {-    "docusaurus": "^1.0.0-alpha.35",-    "babel-preset-react": "^6.24.1"+  "dependencies": {+    "@docusaurus/core": "^2.0.0-alpha.40",

Let's upgrade to .43

scottilee

comment created time in 3 days

PR opened facebook/docusaurus

Reviewers
docs(v2): Nav links activeBasePath

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Add docs for #2299

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Just docs...

Related PRs

#2299

+32 -20

0 comment

6 changed files

pr created time in 3 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha 9dba46ebe04cce9e8246f54fb3fbf1ac6943c899

rename activeBaseRoute to activeBasePath

view details

push time in 3 days

create barnchfacebook/docusaurus

branch : active-base-path-docs

created branch time in 3 days

pull request commentfacebook/flux

feat: add DocSearch as recommended by docusaurus.

Tested and deployed! https://facebook.github.io/flux/

s-pace

comment created time in 3 days

push eventfacebook/flux

Yangshun Tay

commit sha c93d77e4a064d468ef46c3e45d05f21f9fc94d87

Deploy website version based on 4f0af648c2bdcca7088c4935898f51aeb2d9507f

view details

push time in 3 days

push eventfacebook/flux

Yangshun Tay

commit sha 4f0af648c2bdcca7088c4935898f51aeb2d9507f

chore: upgrade website packages

view details

push time in 3 days

delete branch facebook/docusaurus

delete branch : docs-active

delete time in 3 days

push eventfacebook/flux

Sylvain Pace

commit sha 06f4973186bdea07153d7f95e5d9d543769899c8

feat: add DocSearch as recommended by docusaurus. (#483) * feat: add DocSearch as recommended by docusaurus. * Update docusaurus.config.js Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>

view details

push time in 3 days

PR merged facebook/flux

feat: add DocSearch as recommended by docusaurus. CLA Signed

👋 team,

I am working on DocSearch. We have an integration for Docusaurus. We thought it is a shame you can not also used this search that you can find on reactjs for example.

This PR will add DocSearch to the documentation website. It will allow an user to have a learn-as-you-type experience by displaying results thanks to a dropdown in a live way.

Let me know if you need anything.

+4 -0

0 comment

1 changed file

s-pace

pr closed time in 3 days

push events-pace/flux

Yangshun Tay

commit sha a4fa15b65a6fc844217ec466568a3e12dd6472ea

Update docusaurus.config.js

view details

push time in 3 days

issue commentfacebook/docusaurus

Extra padding/white space in Safari on some pages (v2)

It's probably not extra padding, it's because the footer is not rendered stickily on certain browsers, likely due to flexbox bugs/inconsistencies.

dima

comment created time in 3 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha c46bf90f600b0505ae4cb4440bd8d1d66a3c3978

feat(v2): allow navbar links to show active style by specifiying a base path (#2299)

view details

push time in 3 days

PR merged facebook/docusaurus

feat(v2): allow navbar links to show active style by specifiying a base path CLA Signed

Motivation

Attempts to fix #2222 and as an alternative to #2243. I think this solution is better than in #2243 as it is a general solution and can be useful for other kinds of pages as well.

If approved, I'll add docs for this feature and add this new property to the templates.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Click on docs links in preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+17 -2

2 comments

2 changed files

yangshun

pr closed time in 3 days

issue closedfacebook/docusaurus

Active link in navbar loses highlight when you click on sidebar items (v2 only)

🐛 Bug Report

This bug applies to v2. v1 seems to work correctly.

When you click a link in the navbar and the page renders, the navbar item is highlighted so the user has context to what area they are in. That highlight will disappear when you click around the sidebar, unless you click on the first link in the sidebar.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

This happens in my project, but it can be reproduced using Docusaurus's own doc page.

  1. Go the Docusaurus website: https://v2.docusaurus.io/

  2. Click the Docs link in the navbar, which takes you to https://v2.docusaurus.io/docs/introduction

  3. Notice that the Docs item in the navbar is highlighted in green

  4. Click on any other sidebar item. At the time of writing this bug, the second item was Design Principles

  5. Notice that Docs in the navbar is no longer highlighted

  6. Click back on the first item in the sidebar, Introduction, and Docs is once again highlighted in the navbar

If you go the v1 site, this doesn't occur:

  1. Go to https://docusaurus.io/en

  2. Click Docs in the navbar and notice it's highlighted (though subtly)

  3. Click on another item in the sidebar and notice Docs continues to stay highlighted.

Expected behavior

While clicking around the sidebar, I expect the navbar item to stay highlighted so the user has context to what section they are in.

Actual Behavior

The navbar item only highlights if the first item in the sidebar is the current page.

image

image

My guess is that it's coming from docusaurus.config.js:

module.exports = {
  themeConfig: {
    navbar: {
      links: [
        {
          to: "introduction",
          label: "Introduction",
          position: "left"
        },
        { ... },
        { ... }
      ]
    }
  }
}

i.e. The highlight in the navbar is only occurring if the current sidebar item matches the above setting in your config file.

In my sidebar.js, I even specified the type as doc:

module.exports = {
  someSidebar: {
    Introduction: [
      { type: "doc", id: "doc1" },
      { type: "doc", id: "doc2" }
    ]
  }
};

But it had no noticeable effect.

Reproducible Demo

No demo needs to be included to reproduce this, as it can be reproduced live on Docusaurus's own website. I hope that suffices. But if needed, I can upload a minimal project that reproduces the issue.

closed time in 3 days

robinzimmermann

pull request commentfacebook/docusaurus

feat(v2): allow navbar links to show active style by specifiying a base path

since users need to manually add new option themselves in order to achieve the desired behavior.

Yes, but this is much more flexible and keeps the generic components generic, which is better for long term maintainability.

yangshun

comment created time in 3 days

PR opened facebook/docusaurus

Reviewers
feat(v2): allow navbar links to show active style by specifiying a base path

Motivation

Attempts to fix #2222 and as an alternative to #2243. I think this solution is better than in #2243 as it is a general solution and can be useful for other kinds of pages as well.

If approved, I'll add docs for this feature and add this new property to the templates.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Click on docs links in preview.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+17 -2

0 comment

2 changed files

pr created time in 4 days

create barnchfacebook/docusaurus

branch : docs-active

created branch time in 4 days

issue commentfacebook/docusaurus

Release v2.0.0-alpha.41 / v2.0.0-alpha.43 on npm

No problem, that's the v1 package and you're not the only one confused by it (I get confused sometimes as well). Thanks for the initiative!

deniaz

comment created time in 4 days

issue closedfacebook/docusaurus

Release v2.0.0-alpha.41 / v2.0.0-alpha.43 on npm

🐛 Bug Report

v2.0.0-alpha.41 and v2.0.0-alpha.43 releases have been created on Github but not actually been released on npm. Since alpha.41 brings quite a few interesting features it would be great to ave it available.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

(Write your steps here:)

  1. Check releases on Github https://github.com/facebook/docusaurus/releases
  2. Check releases on npm https://www.npmjs.com/package/docusaurus

Expected behavior

Releases are available on npm so they can easily be installed.

Actual Behavior

Releases are not on npm ;)

closed time in 4 days

deniaz

issue commentfacebook/docusaurus

Release v2.0.0-alpha.41 / v2.0.0-alpha.43 on npm

They've been released on npm. See here. We have users who upgraded to alpha.43 and said that it fixed bugs for them.

Try manually upgrading to alpha.43 in your package.json or use the @docusaurus/core@next tag.

deniaz

comment created time in 4 days

pull request commentfacebook/docusaurus

fix(v2): highlight docs navbar item on corresponding pages

I just had an idea for fixing this without making the core/theme know about doc-specific code and some hacks by using <NavLink isActive>. I'll try to put up a PR.

lex111

comment created time in 5 days

delete branch facebook/docusaurus

delete branch : exe-env

delete time in 5 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha d974aa9c2a8c3789c974e4247d0f4bbdff260c27

feat(v2): add ExecutionEnvironment API (#2296) * feat(v2): add ExecutionEnvironment API * remove redundant code

view details

push time in 5 days

PR merged facebook/docusaurus

Reviewers
feat(v2): add ExecutionEnvironment API CLA Signed tag: new feature

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Add a new client API to determine the current execution environment (whether on server or client). This helps to clean up some of our code where we do typeof window !== 'undefined'. Some users are facing SSR issues as well and this API could be used by them as well.

Also reorganized the client API docs and added categories.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+77 -21

1 comment

6 changed files

yangshun

pr closed time in 5 days

push eventfacebook/docusaurus

Mohamed Abdel Nasser

commit sha e6562859fd46f900f909bf39b4260363701429a2

docs(v2): add instructions on Travis CI deployment (#2289) * docs: update versioned_docs/deployment with travis-ci * docs: update docs/deployment with travis-ci * Transfer update to a new version * Update node version * update v-2.0.0-alpha.43 with Travis CI deployment instructions * Remove updates from v2.0.0-alpha.43 * Update deployment.md Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>

view details

push time in 5 days

PR merged facebook/docusaurus

Reviewers
docs(v2): add instructions on Travis CI deployment tag: documentation

I created this PR to update Docusaurus V2 Doc/deployment with Automating Deployments steps with Travis CI. Ref Issue: #2286

Motivation

Because When I tried to use Travis CI with Docusaurus V2, I didn't find any steps for automating deployments using CI with Travis CI or even Circle CI, so I jumped back to Docusaurus V1 and I made a some update to Travis CI script to be suitable with Docusaurus V2.

+29 -0

4 comments

1 changed file

mohamedsgap

pr closed time in 5 days

push eventmohamedsgap/docusaurus

Yangshun Tay

commit sha 509127c70d55eec12d019cbfbbc37d3e9e64c57e

Update deployment.md

view details

push time in 5 days

issue commentyangshun/front-end-interview-handbook

MY HOT VIDEOS HERE 💋💋💋

I've blocked but it's not helping. There are always new users being created.

On Wed, Feb 19, 2020, 7:22 AM Durdona Abdusamikovna < notifications@github.com> wrote:

Can you actually block this user ? She keep posting non relevant posts

On Tue, Feb 18, 2020 at 1:46 PM helena331 notifications@github.com wrote:

MY HOT VIDEOS HERE 💋💋💋 👇👇👇

https://tinyurl.com/v43x47t

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/yangshun/front-end-interview-handbook/issues/238?email_source=notifications&email_token=ABLOJYPIILGPFSBBQU52YVTRDQUJRA5CNFSM4KXKHQIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IONCDVQ , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABLOJYLQZJUOGMKGPZ4RITLRDQUJRANCNFSM4KXKHQIA

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yangshun/front-end-interview-handbook/issues/238?email_source=notifications&email_token=AAKBCHOB7LPSLIU7VUA2WGLRDRUSXA5CNFSM4KXKHQIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMFXSJA#issuecomment-587954468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKBCHIYKNVEIDM6GS6WNY3RDRUSXANCNFSM4KXKHQIA .

helena331

comment created time in 5 days

issue commentfacebook/docusaurus

[v2] add a way to exclude components from SSR within JSX

Ok I think we can add that, but it is better named <ClientOnly>/<ClientRenderedOnly>

equinusocio

comment created time in 5 days

issue commentfacebook/docusaurus

[V2] Handle /docs route

Maybe there can be a new config option for docusaurus-plugin-docs to redirect/render a specific page when /<routeBasePath> is accessed. WDYT?

jamiedavenport

comment created time in 5 days

issue commentfacebook/docusaurus

[V2] | Build Fails on Server build | (undefined) API is not available in this browser.

Closing this as it's not a Docusaurus bug.

ramakrishnan3

comment created time in 5 days

issue closedfacebook/docusaurus

[V2] | Build Fails on Server build | (undefined) API is not available in this browser.

🐛 Bug Report

Error: Sorry, the Vimeo Player API is not available in this browser.

This works well in the dev mode but the build throws an error.

Have you read the Contributing Guidelines on issues?Yes

I am trying to import and use a React component in the .mdx files in the docs folder.

abc.mdx import Vimeo from '@u-wave/react-vimeo'; <Vimeo video="https://vimeo.com/1234567789" responsive={true} width={640} height={480} />

To Reproduce

(Write your steps here:)

  1. Scaffold a v2 docusaurus project
  2. Install @u-wave/react-vimeo from npm and import it in docs/doc2.mdx file
  3. npm start -> starts the build and video is displayed in the component
  4. Try to build the project npm run build -> errors out

Expected behavior

The build version should be successful and should behave like the dev version.

(Write what you thought would happen.)

Actual Behavior

The prod build error out <!-- Did something go wrong? Is something broken, or not behaving as you expected? Describe this section in detail, and attach screenshots if possible. Don't only say "it doesn't work"! -->

(Write what happened. Add screenshots, if applicable.) image

Reproducible Demo

https://github.com/ramakrishnan3/ducusaurus-bug-report

-> clone the repo -> npm i -> npm start - successful -> npm run build - errors out (Paste the link to an example repo, including a siteConfig.js, and exact instructions to reproduce the issue.)

<!-- What happens if you skip this step?

Someone will read your bug report, and maybe will be able to help you, but it’s unlikely that it will get much attention from the team. Eventually, the issue will likely get closed in favor of issues that have reproducible demos.

Please remember that:

* Issues without reproducible demos have a very low priority.
* The person fixing the bug would have to do that anyway. Please be respectful of their time.
* You might figure out the issues yourself as you work on extracting it.

Thanks for helping us help you! -->

closed time in 5 days

ramakrishnan3

issue commentfacebook/docusaurus

[V2] | Build Fails on Server build | (undefined) API is not available in this browser.

But I am using what you have suggested already in my code https://github.com/ramakrishnan3/ducusaurus-bug-report/blob/master/docs/doc2.mdx but it does not work.

That's not syntactically valid code... I meant for you to render something behind the &&.

{typeof window !== 'undefined' && <div>{...}</div>}

By the way when https://github.com/facebook/docusaurus/pull/2296 lands there will be a convenient API to check the execution environment and you no longer have to write typeof window !== 'undefined'

ramakrishnan3

comment created time in 5 days

Pull request review commentfacebook/docusaurus

fix(v2): highlight docs navbar item on corresponding pages

 function NavLink({to, href, label, position, ...props}) {         : {             activeClassName: 'navbar__link--active',             to: toUrl,+            isActive: (match, location) => {+              const firstPathSegment = toUrl+                .replace(/^\//, '')+                .split('/')+                .shift();+              const isDocPage =

Not great to have doc-specific code in Navbar :/

lex111

comment created time in 5 days

issue commentfacebook/docusaurus

V2. Toggle theme component not reacting on change system theme

i change system theme and a Toggle not reacting on this

Did you try incognito mode? Could you clear your localStorage and try again?

Is it just the toggle? Does the rest of the website respond to the change in the theme? A video recording would be helpful.

Sorry. I did it on Windows 10

Unfortunately I don't have Windows and can't really debug there. If you have time I recommend you try debugging it. It's not very complicated. The relevant code can be found in docusaurus/packages/docusaurus-theme-classic/src/index.js

popuguytheparrot

comment created time in 5 days

issue closedfacebook/docusaurus

Need collapsible dropdown inside markdown file

❓ Questions and Help

Please note that this issue tracker is not a help form and this issue will be closed.

Please contact us instead. We have a few channels:

I have tried the following code:

<details> <summary> <i>Like this? </i> <a href="http://www.ironspider.ca/format_text/fontstyles.htm"> Useful Source</a> </summary> <p>It's because the details block is html5. If you want to modify it your best bet is using html5. </p> </details>

It shows error.

provide the command line to add the collapsible dropdown.

Refer the attached image for dropdown. And we are looking for the output like that

TeleCMI_Dropdown

closed time in 5 days

prasathsekar

issue commentfacebook/docusaurus

Need collapsible dropdown inside markdown file

This question is unclear and unlikely to be Docusaurus-specific. If you'd like to request for a new feature please change the issue description. Closing this for now.

prasathsekar

comment created time in 5 days

issue commentfacebook/docusaurus

Multilevel sidebar

@alexepshteyn please provide some examples or ask on Stack Overflow.

niccord

comment created time in 5 days

issue commentfacebook/docusaurus

Navbar Dropdown Menu

Yep, I'm supposed to work on this. Making it show up on desktop is not hard, the main blocker here is the current Infima nav dropdown is not mobile-friendly. Will prioritize this.

tkdrahn

comment created time in 5 days

issue commentfacebook/docusaurus

[V2] Potential code block improvements

Sounds very useful indeed!

markerikson

comment created time in 5 days

issue commentfacebook/docusaurus

Add a way to exclude components from SSR within JSX

I created https://github.com/facebook/docusaurus/pull/2296 which can be used as a convenient API instead of a component. Do you have examples of the API in Next and Nuxt which I can take a look at?

equinusocio

comment created time in 5 days

issue commentfacebook/docusaurus

[DOC] Adding Automating Deployments with Travis CI in Docusaurus V2

Saw the PR before I could reply. Thanks!

mohamedsgap

comment created time in 5 days

issue commentfacebook/docusaurus

V2. Toggle theme component not reacting on change system theme

I'm not able to reproduce this. Once you toggle it manually, we write the value to localStorage and the system value no longer affects it. Please try on incognito mode and see if the same thing happens.

popuguytheparrot

comment created time in 5 days

push eventfacebook/docusaurus

yangshun

commit sha 7b98f04ad428e3ba87251bfd81c143415dcbd497

remove redundant code

view details

push time in 5 days

push eventfacebook/docusaurus

push time in 5 days

PR opened facebook/docusaurus

Reviewers
feat(v2): add ExecutionEnvironment API

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Add a new client API to determine the current execution environment (whether on server or client). This helps to clean up some of our code where we do typeof window !== 'undefined'. Some users are facing SSR issues as well and this API could be used by them as well.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+78 -20

0 comment

6 changed files

pr created time in 5 days

delete branch facebook/docusaurus

delete branch : comments

delete time in 5 days

create barnchfacebook/docusaurus

branch : exe-env

created branch time in 5 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha 996b1151992592f56e1f48803371442362051e62

misc(v2): clean up comments in code (#2294)

view details

push time in 5 days

PR merged facebook/docusaurus

Reviewers
misc(v2): clean up comments in code CLA Signed

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Was taking a brief look at the code and decided to just reformat some comments. The only code change here is to deprecate @docusaurus/utils in packages/docusaurus/client/export because it is confusing to have the same package name although one refers to the monorepo package (in Node) and the other refers to the webpack alias (in client-side JS)

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

CI and preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+233 -154

1 comment

45 changed files

yangshun

pr closed time in 5 days

PR opened facebook/docusaurus

Reviewers
misc(v2): clean up comments in code

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Was taking a brief look at the code and decided to just reformat some comments. The only code change here is to deprecate @docusaurus/utils in packages/docusaurus/client/export because it is confusing to have the same package name although one refers to the monorepo package (in Node) and the other refers to the webpack alias (in client-side JS)

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

CI and preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+233 -154

0 comment

45 changed files

pr created time in 5 days

create barnchfacebook/docusaurus

branch : comments

created branch time in 5 days

Pull request review commentfacebook/hermes

Website playground

+/**+ * Copyright (c) Facebook, Inc. and its affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */++import { useState, useEffect } from 'react';+import useDocusaurusContext from '@docusaurus/useDocusaurusContext';++function useTheme() {

docusaurus@2.0.0-alpha.43 has been released which contains the ThemeProvider. Should work now!

exced

comment created time in 5 days

issue commentfacebook/create-react-app

[Docs] Infinite network requests loop in Safari and iOS

docusaurus@2.0.0-alpha.43 has been released which contains the fix.

dcastil

comment created time in 5 days

issue commentreduxjs/redux

Documentation webpage using 100% of CPU

docusaurus@2.0.0-alpha.43 has been released which contains the fix.

jsphkm

comment created time in 5 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha d7f3dff6e6926b02323f32da4f3b5f978153a674

Update CHANGELOG-2.x.md

view details

push time in 5 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha 6c9932deb1f85f9d382f82a18e75206dfc2629bc

chore(v2): clean up docs

view details

push time in 5 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha 3056479ed235863433398cfb4eca6a6e304f8af4

v2.0.0-alpha.43

view details

push time in 5 days

created tagfacebook/docusaurus

tagv2.0.0-alpha.43

Easy to maintain open source documentation websites.

created time in 5 days

delete tag facebook/docusaurus

delete tag : v2.0.0-alpha.42

delete time in 5 days

created tagfacebook/docusaurus

tagv2.0.0-alpha.42

Easy to maintain open source documentation websites.

created time in 5 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha 8a96e0bff6a3d907901ea6479d5220469e7e015d

v2.0.0-alpha.42

view details

push time in 5 days

delete tag facebook/docusaurus

delete tag : v2.0.0-alpha.42

delete time in 5 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha 3ba753922e9e5b16e50aeeb70fbd82fc30bbbe7f

Revert "v2.0.0-alpha.42" This reverts commit d48200be7d8599a1791b9b7c5e0cd82ebc39df7e.

view details

push time in 5 days

delete branch lex111/docusaurus

delete branch : alpha.42

delete time in 5 days

push eventfacebook/docusaurus

Alexey Pyltsyn

commit sha 871eeee9402fade0b8e871af97ceab437d40dd35

chore(v2): prepare v2.0.0.alpha-42 release (#2293) * docs(v1): drop support for node <10.9 (#2264) * chore(v2): prepare v2.0.0.alpha-42 release * Rename docs from 41 to 42 * Fix changelog * Update versions.json Co-authored-by: Hanseung Yoo <trustyoo86@gmail.com> Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>

view details

push time in 5 days

PR merged facebook/docusaurus

chore(v2): prepare v2.0.0.alpha-42 release CLA Signed

Motivation

Release v2.0.0.alpha-42

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+40 -25

1 comment

26 changed files

lex111

pr closed time in 5 days

Pull request review commentfacebook/docusaurus

chore(v2): prepare v2.0.0.alpha-42 release

-[-  "2.0.0-alpha.41",-  "2.0.0-alpha.40",-  "2.0.0-alpha.39",-  "2.0.0-alpha.38"-]+["2.0.0-alpha.42", "2.0.0-alpha.40", "2.0.0-alpha.39", "2.0.0-alpha.38"]

Can we change it back to how it was? Easier to see diffs to this file in future.

lex111

comment created time in 5 days

push eventlex111/docusaurus

Yangshun Tay

commit sha f348a161eec981a0b3066f5d0196a2ddce9c131e

Update versions.json

view details

push time in 5 days

Pull request review commentfacebook/docusaurus

[Doc] Add Automating Deployments with Travis CI

 Render offers [free static site hosting](https://render.com/docs/static-sites) w    | **Publish Directory** | `build`       |  That's it! Your app will be live on your Render URL as soon as the build finishes.++## Automating Deployments Using Continuous Integration++Continuous integration (CI) services are typically used to perform routine tasks whenever new commits are checked in to source control. These tasks can be any combination of running unit tests and integration tests, automating builds, publishing packages to NPM, and yes, deploying changes to your website. All you need to do to automate deployment of your website is to invoke the `yarn deploy` script whenever your docs get updated. In the following section, we'll be covering how to do just that using [Travis CI](https://travis-ci.com/), a popular continuous integration service provider.+++### Using Travis CI++1.  Go to https://github.com/settings/tokens and generate a new [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)+1.  Using your GitHub account, [add the Travis CI app](https://github.com/marketplace/travis-ci) to the repository you want to activate.+1.  Open your Travis CI dashboard. The URL looks like https://travis-ci.com/USERNAME/REPO, and navigate to the `More options` > `Setting` > `Environment Variables` section of your repository.+1.  Create a new environment variable named `GH_TOKEN` with your newly generated token as its value, then `GH_EMAIL` (your email address) and `GH_NAME` (your GitHub username).+1.  Create a `.travis.yml` on the root of your repository with below text.++```yaml+# .travis.yml+language: node_js+node_js:+  - '8'

We support Node 10 and above.

mohamedsgap

comment created time in 5 days

Pull request review commentfacebook/docusaurus

[Doc] Add Automating Deployments with Travis CI

 Render offers [free static site hosting](https://render.com/docs/static-sites) w    | **Publish Directory** | `build`       |  That's it! Your app will be live on your Render URL as soon as the build finishes.+

Please remove this change. We should just update the newest docs.

mohamedsgap

comment created time in 5 days

Pull request review commentfacebook/docusaurus

chore(v2): prepare v2.0.0.alpha-42 release

 # Docusaurus 2 Changelog +## 2.0.0-alpha.42 (2020-02-18)++**HOTFIX for 2.0.0-alpha.41**.++#### :bug: Bug Fix++- `docusaurus-theme-classic`+  - [#2292](https://github.com/facebook/docusaurus/pull/2292) chore(v2): update Infima to 0.2.0-alpha.4 ([@yangshun](https://github.com/yangshun))+  - [#2291](https://github.com/facebook/docusaurus/pull/2291) fix(v2): fix build and deps install ([@lex111](https://github.com/lex111))++#### Committers: 3++- Alexey Pyltsyn ([@lex111](https://github.com/lex111))+- Hanseung Yoo ([@trustyoo86](https://github.com/trustyoo86))

Weird, there should only be the two of us right?

lex111

comment created time in 5 days

delete branch facebook/docusaurus

delete branch : infima

delete time in 5 days

push eventfacebook/docusaurus

Yangshun Tay

commit sha 80f45e0dd252ef3065d9ad45edb7b5fc04736760

chore(v2): update Infima to 0.2.0-alpha.4 (#2292)

view details

push time in 5 days

PR merged facebook/docusaurus

Reviewers
chore(v2): update Infima to 0.2.0-alpha.4 CLA Signed

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Bump Infima version to 0.2.0-alpha.4 which contains a fix for https://github.com/facebook/create-react-app/issues/8400 and https://github.com/reduxjs/redux/issues/3688

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview. Ran site locally on Safari, no high CPU usage.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+24 -6

1 comment

2 changed files

yangshun

pr closed time in 5 days

PR opened facebook/docusaurus

Reviewers
chore(v2): update Infima to 0.2.0-alpha.4

<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md

Happy contributing!

-->

Motivation

Bump Infima version to 0.2.0-alpha.4 with contains a fix for https://github.com/facebook/create-react-app/issues/8400 and https://github.com/reduxjs/redux/issues/3688

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview. Ran site locally on Safari, no high CPU usage.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

+24 -6

0 comment

2 changed files

pr created time in 5 days

more