Build system for OCaml/Reason
Prototyping the UI of 2030
Starter project for our Europe-wide (+ more) Dojo
A collection of awesome things regarding Reason/OCaml ecosystem.
Reason bindings to Pixi.js
Set of build rules for jenga
chenglou/bootstrap-everywhere.safariextension 2
Safari extension for turning websites more Californian
pull request commentrescript-association/rescript-lang.org
Improve syntax lookup history behaviour
See inline comment: https://github.com/rescript-association/rescript-lang.org/pull/385#discussion_r650729738
Of couse, what is clearer is subjective, and if you want I can try to achieve the same behaviour without this library.
comment created time in 28 minutes
push eventfacebook/docusaurus
commit sha bb47e1bbf1ada3bb5297c72c20e90653d0d27da4
refactor(v2): minor cleanups
push time in 37 minutes
Pull request review commentrescript-association/rescript-lang.org
Improve syntax lookup history behaviour
type state = | ShowFiltered(string, array<item>) // (search, filteredItems) | ShowDetails(item) +type action =+ | URLChanged(string)+ | SearchValueChanged(string)+ | ItemSelected(item)++let stateFromPath = path =>+ getAnchor(path)+ ->Belt.Option.flatMap(anchor =>+ Js.Array2.find(allItems, item => GithubSlugger.slug(item.id) === anchor)+ )+ ->Belt.Option.map(item => ShowDetails(item))+ ->Belt.Option.getWithDefault(ShowAll)+ @react.component let make = () => { let router = Next.Router.useRouter()- let (state, setState) = React.useState(_ => ShowAll)-- React.useEffect0(() => {- switch getAnchor(router.asPath) {- | Some(anchor) =>- Js.Array2.find(allItems, item =>- GithubSlugger.slug(item.id) === anchor- )->Belt.Option.forEach(item => {- setState(_ => ShowDetails(item))- })- | None => ()- }- None- })-- /*- This effect syncs the url anchor with the currently shown final match- within the fuzzy finder. If there is a new match that doesn't align with- the current anchor, the url will be rewritten with the correct anchor.-- In case a selection got removed, it will also remove the anchor from the url.- We don't replace on every state change, because replacing the url is expensive- */- React.useEffect1(() => {- switch (state, getAnchor(router.asPath)) {- | (ShowDetails(item), Some(anchor)) =>- let slug = GithubSlugger.slug(item.id)-- if slug !== anchor {- router->Next.Router.replace("syntax-lookup#" ++ anchor)- } else {- ()- }- | (ShowDetails(item), None) =>- router->Next.Router.replace("syntax-lookup#" ++ GithubSlugger.slug(item.id))- | (_, Some(_)) => router->Next.Router.replace("syntax-lookup")- | _ => ()- }- None- }, [state])
@ryyppy For me, the improvement is being able to connect a specific action (like clearing the search box) to this effect (updating the URL). With ReactUpdate, you can queue the effect at the same location where you handle the action, whereas in the old version you have to compare the current URL and new state to reverse engineer what the most recent change was.
comment created time in 37 minutes
PR opened rescript-association/rescript-lang.org
pr created time in an hour
pull request commentrescript-association/rescript-lang.org
Invalid props for Non DOM Components
The use case was to pass aria-* props to React components from a ui library written in javascript. In our case a company's ui library.
This sounds like you are defining a type Props = { "aria-label": string } in your existing React component? This doesn't sound right to me for some reason.
comment created time in an hour
pull request commentfacebook/docusaurus
fix(v2): respect base url in RSS feeds
Size Change: 0 B
Total Size: 621 kB
<details><summary>ℹ️ <strong>View Unchanged</strong></summary>
| Filename | Size | Change |
|---|---|---|
website/build/assets/css/styles.********.css |
87.8 kB | 0 B |
website/build/assets/js/main.********.js |
444 kB | 0 B |
website/build/blog/2017/12/14/introducing-docusaurus/index.html |
62.1 kB | 0 B |
website/build/docs/introduction/index.html |
235 B | 0 B |
website/build/index.html |
27 kB | 0 B |
</details>
<a href="https://github.com/preactjs/compressed-size-action"><sub>compressed-size-action</sub></a>
comment created time in an hour
pull request commentfacebook/docusaurus
fix(v2): respect base url in RSS feeds
⚡️ Lighthouse report for the changes in this PR:
| Category | Score |
|---|---|
| 🟠 Performance | 55 |
| 🟢 Accessibility | 97 |
| 🟢 Best practices | 100 |
| 🟢 SEO | 100 |
| 🟢 PWA | 95 |
Lighthouse ran on https://deploy-preview-4962--docusaurus-2.netlify.app/ <!-- Sticky Pull Request Commentlighthouse -->
comment created time in an hour
pull request commentfacebook/docusaurus
fix(v2): respect base url in RSS feeds
:heavy_check_mark: [V2]
:hammer: Explore the source changes: 9200dba01a6d18a3650d3bd96104c206becbf8a1
:mag: Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60c7073b242c0600078521e2
:sunglasses: Browse the preview: https://deploy-preview-4962--docusaurus-2.netlify.app
comment created time in an hour
pull request commentrescript-association/rescript-lang.org
Improve syntax lookup history behaviour
What makes the logic cleaner with ReactUpdate? It might look cleaner on first glance, but for me it's currently not entirely clear what benefits I get over the approach we had before?
comment created time in an hour
PR opened facebook/docusaurus
<!-- 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
Fixes #4956
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
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.)
pr created time in an hour
issue commentfacebook/docusaurus
/docs/ should redirect to /docs/myFirstDoc ?
That would be awesome. Also, for every subdirectory in /docs, it would be also great to redirect to a first doc there in the sidebar.
For example:
redirect /docs/cli to /docs/cli/first-doc-under-cli-subdirectory, assuming that in the /docs/cli there is first-doc-under-cli-subdirectory.md file, which is the very first link in the sidebar.
comment created time in an hour
pull request commentfacebook/docusaurus
refactor(v2): improve semantic blog sidebar markup
Size Change: +46 B (0%)
Total Size: 621 kB
| Filename | Size | Change |
|---|---|---|
website/build/blog/2017/12/14/introducing-docusaurus/index.html |
62.2 kB | +46 B (0%) |
<details><summary>ℹ️ <strong>View Unchanged</strong></summary>
| Filename | Size | Change |
|---|---|---|
website/build/assets/css/styles.********.css |
87.8 kB | 0 B |
website/build/assets/js/main.********.js |
444 kB | 0 B |
website/build/docs/introduction/index.html |
235 B | 0 B |
website/build/index.html |
27 kB | 0 B |
</details>
<a href="https://github.com/preactjs/compressed-size-action"><sub>compressed-size-action</sub></a>
comment created time in an hour
pull request commentfacebook/docusaurus
fix(v2): use ExecutionEnvironment for BrowserOnly
Size Change: 0 B
Total Size: 621 kB
<details><summary>ℹ️ <strong>View Unchanged</strong></summary>
| Filename | Size | Change |
|---|---|---|
website/build/assets/css/styles.********.css |
87.8 kB | 0 B |
website/build/assets/js/main.********.js |
444 kB | 0 B |
website/build/blog/2017/12/14/introducing-docusaurus/index.html |
62.1 kB | 0 B |
website/build/docs/introduction/index.html |
235 B | 0 B |
website/build/index.html |
27 kB | 0 B |
</details>
<a href="https://github.com/preactjs/compressed-size-action"><sub>compressed-size-action</sub></a>
comment created time in an hour
pull request commentfacebook/docusaurus
refactor(v2): improve semantic blog sidebar markup
⚡️ Lighthouse report for the changes in this PR:
| Category | Score |
|---|---|
| 🟠 Performance | 62 |
| 🟢 Accessibility | 97 |
| 🟢 Best practices | 100 |
| 🟢 SEO | 100 |
| 🟢 PWA | 95 |
Lighthouse ran on https://deploy-preview-4961--docusaurus-2.netlify.app/ <!-- Sticky Pull Request Commentlighthouse -->
comment created time in an hour
pull request commentfacebook/docusaurus
refactor(v2): improve semantic blog sidebar markup
:heavy_check_mark: [V2]
:hammer: Explore the source changes: 70c9c8807a6d889fca5f6d0b82fa16318b79ef86
:mag: Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60c70483fd9d30000880eaae
:sunglasses: Browse the preview: https://deploy-preview-4961--docusaurus-2.netlify.app
comment created time in an hour
pull request commentfacebook/docusaurus
fix(v2): use ExecutionEnvironment for BrowserOnly
⚡️ Lighthouse report for the changes in this PR:
| Category | Score |
|---|---|
| 🔴 Performance | 46 |
| 🟢 Accessibility | 97 |
| 🟢 Best practices | 100 |
| 🟢 SEO | 100 |
| 🟢 PWA | 95 |
Lighthouse ran on https://deploy-preview-4960--docusaurus-2.netlify.app/ <!-- Sticky Pull Request Commentlighthouse -->
comment created time in an hour
pull request commentfacebook/docusaurus
fix(v2): use ExecutionEnvironment for BrowserOnly
:heavy_check_mark: [V2]
:hammer: Explore the source changes: 1a8196de0b156e9f49b2b2f8bb958285eb7bb19c
:mag: Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60c703dad692870007929d96
:sunglasses: Browse the preview: https://deploy-preview-4960--docusaurus-2.netlify.app
comment created time in an hour
PR opened facebook/docusaurus
<!-- 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
Does the same thing as #4940, but for the blog sidebar.
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.)
pr created time in an hour
issue commentfacebook/docusaurus
@drcmda sorry, will be fixed in #4960.
comment created time in an hour
PR opened facebook/docusaurus
<!-- 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
Proper way to fix #4934 :facepalm:
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
See Test Plan from #4935
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.)
pr created time in an hour
push eventfacebook/docusaurus
commit sha 70c9c8807a6d889fca5f6d0b82fa16318b79ef86
refactor(v2): improve semantic blog sidebar markup
push time in an hour
pull request commentrescript-association/rescript-lang.org
Fix incorrectly migrated package-lock.json
Right, I understand. Feel free to ignore this / leave this until later, but just to clear up any confusion:
I did not migrate the lockfile to v2 in this PR, that was done a month ago in this commit: https://github.com/rescript-association/rescript-lang.org/commit/b1ecde64fbe2152370fdae26cff6cb3e7fd749b3. I just updated the README to reflect the lockfile version that is currently in use. If you want to stay on npm@6 it would be better to revert the lockfile in the repo to v1; I could do that if you want?
The team's problems with the v2 lockfile may be the same I encountered (missing binaries)? Both downgrading to v1 or re-upgrading to v2 (this PR) would fix that.
comment created time in 2 hours
push eventfacebook/docusaurus
commit sha 971d939c656ddcb6530ecf20c3685c69cc428cc5
refactor(v2): minor cleanups
push time in 2 hours
issue commentfacebook/docusaurus
@slorber @lex111 for some reason the canary gives me this now:
index.js?1ef8:1 Warning: React has detected a change in the order of Hooks called by BrowserOnly. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
Previous render Next render
------------------------------------------------------
1. useContext useContext
2. undefined useRef
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at BrowserOnly (webpack-internal:///./node_modules/@docusaurus/core/lib/client/exports/BrowserOnly.js:12:26)
at div
at div
at nav
at Navbar (webpack-internal:///./src/theme/Navbar.js:28:423)
at DocsPreferredVersionContextProviderUnsafe (webpack-internal://
there seems to be nothing unusual in the file that im loading inside browseronly.
comment created time in 2 hours
push eventrescript-association/rescript-lang.org
commit sha 89f04adbdf517bea953a72df275992dd75ab42d7
npx rescript format -all
commit sha 116bd0c4945e7566c542558707f5b57b7e497901
Change React.useEffect1(fn, []) to React.useEffect0(fn) No change in behaviour
commit sha 569caaf572597d3eb1887ec6ea8f6a6b3ed78ee7
Merge pull request #389 from Minnozz/fix-useeffect0 Change `React.useEffect1(fn, [])` to `React.useEffect0(fn)`
push time in 2 hours
PR merged rescript-association/rescript-lang.org
No change in behaviour, but this aligns better with the docs.
pr closed time in 2 hours
pull request commentrescript-association/rescript-lang.org
Change `React.useEffect1(fn, [])` to `React.useEffect0(fn)`
perfect. Then it's safe to merge I guess. Thanks!
comment created time in 2 hours
pull request commentrescript-association/rescript-lang.org
Fix incorrectly migrated package-lock.json
Right now you are supposed to use node@12 and npm@6 (this was not a typo).
npm@6 uses lockfile v1, which works perfectly fine on all our machines.
We experienced problems with lockfile version 2 though, which ended up so badly that Cheng was literally zipping up node_modules to be able to reproduce his rescript-lang.org setup.
Same for Maxim and Bettina's machine (and partly also mine).
Will have another look at it soon, right now it's too cumbersome to me to communicate yet another tooling version change for everyone.
comment created time in 2 hours