profile
viewpoint
Mohsen Azimi mohsen1 @airbnb San Francisco, CA https://azimi.me ♥ Open Source 👨🏽‍💻Airbnb https://twitter.com/mohsen____

issue openedsmooth-code/loadable-components

react-loadable compatibility component

🚀 Feature Proposal

For easier migrating from react-loadable this library can offer a Loadable HoC that wraps error handling, timeout and retries automatically. This component should conform to react-loadable API so users can easily switch to this component by simply aliasing the dependencies.

Motivation

To migrate our large repo we had to do a large refactoring change. We also lost automatic handling of timeouts and retry functionality. We had a global <Loading /> component that was consuming react-loadable props.

Pitch

This will make adopting the component framework super easy

created time in 5 hours

startedmicro/micro

started time in 6 hours

startedstaylor/react-helmet-async

started time in a day

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 0495705934f8ddc9ae0f3f367a7688e862ec506b

Use JSON.parse for speed https://twitter.com/mathias/status/1143551692732030979

view details

push time in a day

issue commentnetlify/netlify-lambda

Webpack entrypoint collection and warning is assuming a default set of file extensions

after you merged webpack configs, construct a regex from config.resolve.extensions list

mohsen1

comment created time in 2 days

delete branch mohsen1/apollo-react-async-ssr

delete branch : @loadable/component

delete time in 2 days

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha c35263abee1a947f19c58dbf5012ac8a4fe2059d

Switch from react-loadable to @loadable packages

view details

Mohsen Azimi

commit sha a320bafafd0b0ff82dd61487483f13e43c304f62

Merge pull request #1 from mohsen1/@loadable/component Switch from react-loadable to @loadable packages

view details

push time in 2 days

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha c35263abee1a947f19c58dbf5012ac8a4fe2059d

Switch from react-loadable to @loadable packages

view details

push time in 2 days

create barnchmohsen1/apollo-react-async-ssr

branch : @loadable/component

created branch time in 2 days

issue closedapollographql/react-apollo

getDataFromTree leaves components in loading state

I had this issue at work and thought it's because my app is too complicated I must be doing something wrong so I built a whole new app from scratch with the same set of tools:

https://github.com/mohsen1/apollo-react-async-ssr

As you can see here I'm calling getDataFromTree.

Intended outcome: My understanding is that, after calling getDataFromTree, rendering components like <Query /> should result in data in callback and loading be false.

Actual outcome: if you start and run this app, you'll see the server is rendering the <Query /> component at the loading phase.

How to reproduce the issue: Clone repo and run the server here: https://github.com/mohsen1/apollo-react-async-ssr

Version 2.5.8

closed time in 2 days

mohsen1

issue commentapollographql/react-apollo

getDataFromTree leaves components in loading state

It took me putting this al together to see the issue

I should pass result of React.createElement to getDataFromTree not a component


--- a/src/server/render.tsx
+++ b/src/server/render.tsx
@@ -24,7 +24,7 @@ const render: express.Handler = async (req, res, next) => {
     const apolloClient = getApolloClient();
     const routerContext: StaticContext = {};
 
-    const Contents = () => (
+    const contentsTree = (
       <ServerAppContents
         req={req}
         client={apolloClient}
@@ -34,9 +34,9 @@ const render: express.Handler = async (req, res, next) => {
     );
 
     await Loadable.preloadAll();
-    await getDataFromTree(Contents);
+    await getDataFromTree(contentsTree);
     const appContents = ReactDOMServer.renderToString(
-      sheet.collectStyles(<Contents />)
+      sheet.collectStyles(contentsTree)
     );
     const initialState = apolloClient.extract();
     const styleTags = sheet.getStyleElement();
mohsen1

comment created time in 2 days

push eventmohsen1/apollo-react-async-ssr

Mohsen Azimi

commit sha 97b8fbcada0002df01bc43f409b29f2300dfeba9

Fix get data on server

view details

push time in 2 days

issue openedapollographql/react-apollo

getDataFromTree leaves components in loading state

I had this issue at work and thought it's because my app is too complicated I must be doing something wrong so I built a whole new app from scratch with the same set of tools:

https://github.com/mohsen1/apollo-react-async-ssr

As you can see here I'm calling getDataFromTree.

Intended outcome: My understanding is that, after calling getDataFromTree, rendering components like <Query /> should result in data in callback and loading be false.

Actual outcome: if you start and run this app, you'll see the server is rendering the <Query /> component at the loading phase.

How to reproduce the issue: Clone repo and run the server here: https://github.com/mohsen1/apollo-react-async-ssr

Version 2.5.8

created time in 3 days

issue openednetlify/netlify-lambda

Webpack entrypoint collection and warning is assuming a default set of file extensions

even if I extend the webpack config with more extensions, entry files are not picked up. I believe default .wasm extension is not supported here either:

https://github.com/netlify/netlify-lambda/blob/80bcdd851c47a999c425d6a47e6731d0f5f1af9e/lib/build.js#L115-L124

created time in 3 days

PublicEvent

startedsmooth-code/loadable-components

started time in 3 days

issue commentremy/nodemon

High severity vulnerabilities found in dependency: chokidar

if you are using Yarn chokidar@3 is compatible

"resolutions": {
    "chokidar": "3"
  }
rossanthony

comment created time in 3 days

pull request commentmohsen1/posthtml-favicons

Fix: creating nested directories. ENOENT error.

updated the fix to use mkdirp. it is published to 1.3.0. Thanks!

anein

comment created time in 7 days

created tagmohsen1/posthtml-favicons

tagv1.3.0

PostHTML Favicon generator

created time in 7 days

push eventmohsen1/posthtml-favicons

Mohsen Azimi

commit sha 6fb487484da1965a734dc6c7c3b0fac97c29a714

use mkdirp

view details

Mohsen Azimi

commit sha 145575fa7d931d196bc457b88d49a8b293addc17

v1.3.0

view details

push time in 7 days

push eventmohsen1/posthtml-favicons

Alexander N

commit sha be6d15d8a8f20e0a1aaec64490a4df9f443c2e0c

Fix: creating nested directories. ENOENT error. (#7) * chore: update version of type definitions for node * ref: remove repeated code * fix: the creation of nested dirs * ref: remove unused code * chore: update packages * test: add a test of directory creation * chore(travis): update node version

view details

push time in 7 days

PR merged mohsen1/posthtml-favicons

Fix: creating nested directories. ENOENT error.

Hi there!

I'm faced with a problem when the plugin has not created a nested directory for icons. Here is a bug fix with the appropriate test.

Screenshot from 2019-06-17 23-31-34

+1434 -1309

0 comment

6 changed files

anein

pr closed time in 7 days

PR opened zoejessica/fuckingifcaseletsyntax.com

Support dark/light color scheme

How

It uses the newly introduced prefers-color-scheme media query to apply dark mode if user has that preference

Will CSS Variables break this website?

Yes. But we should not care. Not many developers are running IE11 or Opera Mini

https://caniuse.com/#feat=css-variables

Color choices

I'm no color theory expert. Please feel free to adjust the colors.

Screen Shot 2019-06-18 at 12 01 46 AM

+40 -18

0 comment

1 changed file

pr created time in 9 days

push eventmohsen1/fuckingifcaseletsyntax.com

Mohsen Azimi

commit sha 77ead8e28dd5c50a38237e7b545b1affa23f590c

Support dark/light color scheme

view details

push time in 9 days

push eventmohsen1/fuckingifcaseletsyntax.com

Mohsen Azimi

commit sha 410b1a4689d1b74d38512855f57d1c3bb827c6fa

Support dark/light color scheme

view details

push time in 9 days

create barnchmohsen1/fuckingifcaseletsyntax.com

branch : light-mode

created branch time in 9 days

create barnchmohsen1/cypress-ts-issue

branch : master

created branch time in 13 days

created repositorymohsen1/cypress-ts-issue

created time in 13 days

pull request commentlyft/lyft.github.io

[WIP] try to fix build

Maybe the token was rotated? Try generating a new token and encrypting it using travisci CLI

ecdavis

comment created time in 14 days

issue commentneuroo/json-ast

AST Printer with comments?

I would like to maintain comment locations as much as possible. I will try using the visitor to print. Do you have an example of printer written with the visitor?

mohsen1

comment created time in 14 days

push eventmohsen1/vscode-prettify-json

Mohsen Azimi

commit sha b5d98419c7a4af6b1dd77b98c310fc00e39e02f3

v0.0.5

view details

push time in 16 days

push eventmohsen1/vscode-prettify-json

Mohsen Azimi

commit sha 77f06d441630945537a8a6146079b1051e9bd1eb

Add yarn.lock

view details

push time in 16 days

issue openedneuroo/json-ast

AST Printer with comments?

created time in 16 days

push eventmohsen1/vscode-prettify-json

Colin Ray

commit sha a1e07833c5bf9e2393a54129d806d603791cf847

Update deprecated fields in launch.json

view details

Colin Ray

commit sha b6682b7f8e6a6d378b66fa3a28663a75849bc980

Import strip-json-comments using require instead of ES6 import

view details

Colin Ray

commit sha 7721d04b029dafd9949bdc14bf85d615cdc4d6c0

Use editor.tabSize for JSON spacing

view details

Mohsen Azimi

commit sha 8288e153d9855a3244b927f8fa54829a87d86a2b

Merge pull request #4 from rcolinray/master Use editor.tabSize config for JSON spacing

view details

push time in 16 days

PR merged mohsen1/vscode-prettify-json

Use editor.tabSize config for JSON spacing

Some other options I considered:

  • Use the tab size of the file that is being edited. It wasn't obvious how to get that information using the API.
  • Add a new configuration for this extension. I could see it being annoying to have to configure a second tab size. I could also see there being users who want to have one tab size for their code, and another tab size for their JSON.

Using editor.tabSize seems like a reasonable default.

Thank you for considering my pull request 😄

+9 -6

5 comments

2 changed files

rcolinray

pr closed time in 16 days

issue commentfacebookincubator/idx

DeepRequiredObject causing issues in Typescript 3.5.1

Can you make a pull request that upgrades the TypeScript version in this repo and adds a test case that fails? We can go from there.

amwill04

comment created time in 18 days

Pull request review commentQuramy/typed-css-modules

Make src TypeScript

 const traceKeySorter = ( a, b ) => {   } }; +export type Dictionary<T> = {+  [key: string]: T | undefined;+};+ export default class FileSystemLoader {-  constructor( root, plugins ) {+  private root: string;+  private sources: Dictionary<string>;

Record<string, string>

gdelmas

comment created time in a month

issue commentmicrosoft/TypeScript

JavaScript Property Suggestions Do not Pick Up Type From JSDoc Comment

Yes the import("webpack").Configuration works now.

mjbvz

comment created time in a month

issue commentfacebookincubator/idx

@babel/typescript support

Don't you need @babel/plugin-transform-typescript plugin for TypeScript syntax to work?

r4j4h

comment created time in a month

push eventmohsen1/fb-photo-fetch

Graham Bleaney

commit sha da262384662cedd4e7c4cfafe7f154fa96510907

Added try catch to prevent entire process from failing when facebook provides a bad image

view details

Mohsen Azimi

commit sha 3d0168a269f8318ef15478a503854d7e20c0648a

Merge pull request #19 from gbleaney/handle-bad-images Added try catch to prevent entire process from failing when facebook provides a bad image

view details

push time in a month

PR merged mohsen1/fb-photo-fetch

Added try catch to prevent entire process from failing when facebook provides a bad image

Title says it all. Facebook sometimes returns a bad link which doesn't return a valid image. This was blocking me from downloading any of my photos. This change notifies the user of the erroring image, and allows processing to continue.

+8 -2

0 comment

1 changed file

gbleaney

pr closed time in a month

Pull request review commentDefinitelyTyped/DefinitelyTyped

feat: scores are supported in all the OAuth2 flows

 export interface BasicAuthenticationSecurity extends BaseSecurity { export interface ApiKeySecurity extends BaseSecurity {   type: 'apiKey';   name: string;-  in: string;+  in: 'query' | 'header';

do you have a link to specs that verifies this?

XVincentX

comment created time in a month

startedyarnpkg/berry

started time in a month

startedMicrosoft/BuildXL

started time in 2 months

startedandrewbranch/gatsby-remark-vscode

started time in 2 months

startedNockiro/slack-black-theme

started time in 2 months

issue commenttypescript-eslint/typescript-eslint

Access original TypeScript node for using in typechecker

you can get the original node like this:

https://github.com/typescript-eslint/typescript-eslint/blob/063518380215fc0b2df777080d247fe222cf258d/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts#L83

goodmind

comment created time in 3 months

issue commentmohsen1/multi-file-swagger-example

Not working if folders are not in root

I'm happy to merge a PR to fix this

NassiHarel

comment created time in 3 months

issue commentadlawson/nodejs-langs

Missing many languages

Here is a complete list of language https://iso639-3.sil.org/code_tables/639/data

garyking

comment created time in 3 months

more