profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/slorber/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Sébastien Lorber slorber Lambda Scale Paris https://sebastienlorber.com React early adopter, Docusaurus maintainer

formium/formik 28286

Build forms in React, without the tears 😭

facebook/docusaurus 26769

Easy to maintain open source documentation websites.

APSL/react-native-keyboard-aware-scroll-view 4424

A ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.

async-library/react-async 2006

🍾 Flexible promise-based React data loader

lovasoa/react-contenteditable 1176

React component for a div with editable contents

react-navigation/hooks 559

React hooks for convenient react-navigation use

slorber/awesome-debounce-promise 321

Debounce your API calls easily and stay in promised land.

facebookincubator/infima 172

A UI framework that provides websites with the minimal CSS and JS needed to get started with building a modern responsive beautiful website

slorber/ajax-interceptor 97

This permits to wire interceptors on XHR requests and responses

slorber/awesome-imperative-promise 29

Offer an imperative API on top of promise, with cancellation support

startedWICG/close-watcher

started time in 5 days

startedmmazzarolo/react-native-universal-monorepo

started time in 9 days

pull request commentfacebook/jest

Rename all links to main

Hi

Just changed the branch and triggered a build

On holiday so won't be too available to check it worked, but it should.

Le jeu. 9 sept. 2021 à 07:48, Simen Bekkhus ***@***.***> a écrit :

@slorber https://github.com/slorber it seems netlify deploys aren't triggered (at least https://app.netlify.com/sites/jestjs/deploys don't have the latest commit) - is there some place in an admin panel we need to change master -> main?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebook/jest/pull/11856#issuecomment-915811126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFW6PR6PJNHAVUTVWBHFNDUBBKDZANCNFSM5DVPLLHA .

rickhanlonii

comment created time in 10 days

startedBuilderIO/mitosis

started time in 13 days

startedmolefrog/wouter

started time in 13 days

startedfkhadra/react-toastify

started time in 14 days

pull request commentfacebook/docusaurus

feat: adds blog archive route

You can use the i18n support tu customize all English labels, I don't think it's worth it to add an option for each individual label

Le sam. 4 sept. 2021 à 15:18, Joshua Chen ***@***.***> a écrit :

Definitely worth improving on. Also, if we add this in options, we will transfer the translation to plugin-blog instead, and we can start to populate the options.json file😉

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/facebook/docusaurus/pull/5428#issuecomment-912982007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFW6PWY2XLZFF2LUWDWKGTUAITCXANCNFSM5C3YWNXQ .

gabrielcsapo

comment created time in 15 days

delete branch facebook/docusaurus

delete branch : slorber/netlify-ignore-doc

delete time in 16 days

push eventfacebook/docusaurus

Sébastien Lorber

commit sha 4f59f0782e7af8b5414994848abe6adb18f509f2

docs: mention Netlify ignore build setting (#5486) * mention Netlify ignore build setting * doc backport

view details

push time in 16 days

PR merged facebook/docusaurus

Reviewers
docs: mention Netlify ignore build setting CLA Signed tag: documentation

Motivation

Add some useful doc for v1 sites that upgraded and using Netlify, as it affected some FB Docusaurus sites

image

+57 -0

4 comments

3 changed files

slorber

pr closed time in 16 days

push eventfacebook/docusaurus

slorber

commit sha 09ae0d8c0c117a7d52f03e3a8f879366f4f0c254

doc backport

view details

push time in 16 days

PR opened facebook/docusaurus

Reviewers
docs: mention Netlify ignore build setting tag: documentation

Motivation

Add some useful doc for v1 sites that upgraded and using Netlify, as it affected some FB Docusaurus sites

+19 -0

0 comment

1 changed file

pr created time in 16 days

create barnchfacebook/docusaurus

branch : slorber/netlify-ignore-doc

created branch time in 16 days

push eventfacebook/docusaurus

Sébastien Lorber

commit sha 28d2d6a8d061f929c894aca6aa8e9b4d67d8b442

polish: prevent pop navigation on back if navbar sidebar is open (#5485)

view details

push time in 16 days

delete branch facebook/docusaurus

delete branch : slorber/prevent-nav-on-drawer-back

delete time in 16 days

PR merged facebook/docusaurus

polish: prevent pop navigation on back if navbar sidebar is open CLA Signed tag: polish

Motivation

Follow-up of https://github.com/facebook/docusaurus/pull/5462

Seems like people think it's better to prevent the navigation https://twitter.com/sebastienlorber/status/1433424873955610639

cc @lex111

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

preview

+1 -1

4 comments

1 changed file

slorber

pr closed time in 16 days

pull request commentfacebook/docusaurus

polish: prevent pop navigation on back if navbar sidebar is open

We can remove it or making it optional if people complain about this behavior

slorber

comment created time in 16 days

issue commentPrismJS/prism

JSON formatting breaks inside Docusaurus2

Hey,

I'm on holiday soon so can't investigate much, but the Docusaurus site is able to render json properly:

https://docusaurus.io/docs/next/browser-support#default-values

image

So I guess the issue is related to @ArthurFlageul 's site specificities


The JSON code is clearly highlighted as JSON (SSR I reckon) but the client-side instance of Prism doesn't have JSON.

We have a webpack config to optimize the loading of Prism packages and reduce bundle size (if I remember correctly):

    configureWebpack() {
      const prismLanguages = additionalLanguages
        .map((lang) => `prism-${lang}`)
        .join('|');

      return {
        plugins: [
          new ContextReplacementPlugin(
            /prismjs[\\/]components$/,
            new RegExp(`^./(${prismLanguages})$`),
          ),
        ],
      };
    },

Same with the Copy to clipboard plugin. That JSON code block clearly has a Copy button but your client-side Prism instance doesn't have that plugin loaded.

We don't use a copy to clipboard plugin, it's code from Docusaurus

I know we have a quite unusual setup (that I didn't work on much) and Prism is likely not the problem here.

I don't think Docusaurus either because we render json correctly, as well as many other doc sites (it's not like json is not a popular language...)


@ArthurFlageul I already mentioned this is not valid JSON:

 "effects": [ {   "campaignId": 377,   "rulesetId": 1096,   "ruleIndex": 0,   "ruleName": "25% off",   "effectType": "setDiscount",   "triggeredByCoupon": 97534,   "props": {     "name": "25% off",     "value": 66.25 }

Please add {} around that code block first

ArthurFlageul

comment created time in 16 days

issue closedfacebook/docusaurus

Centered Element on main page

Maybe center the fourth element on HomePageFeatures

image

closed time in 16 days

Mysterious-Dev

issue commentfacebook/docusaurus

Centered Element on main page

This is an init template that you can customize, the goal of Docusaurus is not to provide you with a perfect landing page and in the end you must customize it to your own needs.

If you need 4 items, you may as well use a 2 items per row grid instead of centering?

And you can already add classNames to offset that element to the center if you want to.

See the Docusaurus site: https://docusaurus.io/

image

I don't think we should do anything. If you still think we do, please open a PR with an implementation proposal.

Mysterious-Dev

comment created time in 16 days

PR opened facebook/docusaurus

Reviewers
polish: prevent pop navigation on back if navbar sidebar is open tag: polish

Motivation

Follow-up of https://github.com/facebook/docusaurus/pull/5462

Seems like people think it's better to prevent the navigation https://twitter.com/sebastienlorber/status/1433424873955610639

cc @lex111

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

preview

+1 -1

0 comment

1 changed file

pr created time in 16 days

create barnchfacebook/docusaurus

branch : slorber/prevent-nav-on-drawer-back

created branch time in 16 days

push eventfacebook/docusaurus

Sébastien Lorber

commit sha 3d05ec2e4bb351570961f23dbf800caac0392812

chore: regenerate beta.6 examples + fix regen script (#5484) * update examples script * rename ext * typo * update examples * fix script to update starters * update examples * add --allow-empty so that script does not fail if nothing changed * fix lint

view details

push time in 16 days

delete branch facebook/docusaurus

delete branch : slorber/regen-examples-beta.6

delete time in 16 days

PR merged facebook/docusaurus

Reviewers
chore: regenerate beta.6 examples + fix regen script CLA Signed tag: internal

Motivation

examples and starters should be updated

+14351 -3267

4 comments

125 changed files

slorber

pr closed time in 16 days

issue closedfacebook/docusaurus

Some CSS is not loaded when direct-linked to a built page

<!--

! PLEASE HELP US HELP YOU !

Make it obvious to understand and reproduce this bug. Ideally, we should be able to understand it without running any code.

Bugs are fixed faster if you include:

  • a repro repository to inspect the code
  • an url to see the problem live (if possible)

Pro tip: create a reproducible demo of the bug with https://new.docusaurus.io

-->

🐛 Bug Report

Prerequisites

<!-- IMPORTANT: Please check the following items before creating a issue. Mark the checkbox by putting an X between the bracket. This way we know you've done these steps first. -->

  • [X] I'm using the latest version of Docusaurus.
  • [X] I have tried the npm run clear or yarn clear command.
  • [X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • [x] I have tried creating a repro with https://new.docusaurus.io - the bug presents itself only when building the site, not when running docusarus start, but I did create a minimal repro repo, linked below
  • [X] I have read the console error message carefully (if applicable)

Description

Hey Docusaurus team, I'm running into an odd issue starting in 2.0.0-beta.5 (still present on 2.0.0-beta.6) where some CSS that I generate in JSX components is not rendered properly when you link directly to a built docs page, but it does show up fine when running in docusaurus start or if you click out of the page with messed up CSS, and then back into it.

Here's an illustration: if you open this page directly you'll see some cards with no CSS applied to them https://613103da4ac20ffdfd0d68c8--happy-curie-b91cab.netlify.app/docs/changelog , but if you click into another docs page and then back to the "Illustrate Issue" page on the sidebar, the CSS renders fine.

Have you read the [Contributing Guidelines on issues]

Yes

Steps to reproduce

  1. Initialize a new docusaurus site
  2. yarn add @material-ui/core
  3. Add a few components that utilize makeStyles() and a couple of pages that use those components - https://github.com/taylorreece/docusaurus-css-issue/commit/e258b2f8745bf909dcd6ab098ffdfdca0e0ee3d8 illustrates a diff between a cleanly initialized Docusaurus site using 2.0.0-beta.6, and one with a couple components and docs pages
  4. Run yarn build and yarn serve; note that some pages with JSX components render fine, but if you refresh the page, or link to the built page directly, the CSS doesn't render right.

Expected behavior

Correctly rendered CSS on page load when linked directly to a docs page.

Actual behavior

If you link directly to https://613103da4ac20ffdfd0d68c8--happy-curie-b91cab.netlify.app/docs/changelog you don't get properly rendered CSS. image If you open another docs page and then click to the changelog page from the sidebar, CSS renders properly. image

Note: if I bump Docusaurus back down to 2.0.0-beta.4, the problem goes away. It seems like it was introduced between 2.0.0-beta.4 and 2.0.0-beta.5.

Your environment

<!-- Include as many relevant details about the environment you experienced the bug in -->

  • Public source code: https://github.com/taylorreece/docusaurus-css-issue
  • Public site URL: https://613103da4ac20ffdfd0d68c8--happy-curie-b91cab.netlify.app/docs/changelog
  • Docusaurus version used: 2.0.0-beta.6
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Chrome, Firefox, Mobile Chrome
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): MacOS and Android

Reproducible demo

Use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.

Unfortuantely this bug only appears if you build your project, and doesn't occur in the sandbox.

Example repo to illustrate the issue is at https://github.com/taylorreece/docusaurus-css-issue, though, and is split into two commits: the first commit is a clean initialization of a Docusaurus 2.0.0-beta.6 site using npx @docusaurus/init@latest init docusaurus-css-issue classic, and the second commit highlights the issue I'm seeing.

Thanks for your insight!

closed time in 16 days

taylorreece

issue commentfacebook/docusaurus

Some CSS is not loaded when direct-linked to a built page

We recently did a change that may produce this behavior: https://github.com/facebook/docusaurus/pull/5349

Basically, Docusaurus used to render uselessly twice on the client, leading to more resource usage on React hydration. I suspect on the 2nd render, JSS was able to "fix" the lack of SSR support in Docusaurus but is not able anymore since we optimized re-renders, so the fix only applies once you navigate.

Yes, I think we can't do anything here apart adding good CSS-in-JS support in Docusaurus, so let's track the other issue.

A possible workaround if you want to keep using Mui with bad integration/FOUC is to trigger this duplicate re-render yourself (as it was before).

Here's an example, no guarantee it works though:

export const ChangeLogEntry = ({ children, date }) => {
+  const isBrowser = useIsBrowser();
  const classes = useStyles();
  const formattedDate = dateFormat(
    new Date(date),
    "mmmm dd, yyyy",
    true // Account for timezones
  ).toUpperCase();

  return (
    <>
+      <Card key={isBrowser} className={classes.root}>
        <div className={classes.titleBar}>
          <span>{formattedDate}</span>
        </div>
        <CardContent className={classes.cardContent}>{children}</CardContent>
      </Card>
    </>
  );
};
taylorreece

comment created time in 16 days

push eventfacebook/docusaurus

slorber

commit sha 8719b00fe9681a91f8d103c51057ea26b0517fd9

update examples

view details

slorber

commit sha 67ab9067792f86bdec3d6ee1cd1249cfaba9f484

add --allow-empty so that script does not fail if nothing changed

view details

slorber

commit sha 0b5839f5c428eb170164d8583dde017f1d62fc83

fix lint

view details

push time in 16 days

PR opened facebook/docusaurus

chore: regenerate beta.6 examples + fix regen script tag: internal

Motivation

examples and starters should be updated

+14349 -3266

0 comment

124 changed files

pr created time in 16 days

create barnchfacebook/docusaurus

branch : slorber/regen-examples-beta.6

created branch time in 16 days