mvsmal / fable-material-ui

Fable bindings for Material-UI https://mvsmal.github.io/fable-material-ui/
MIT License
61 stars 8 forks source link

Update Fable libs #58

Closed cmeeren closed 5 years ago

cmeeren commented 5 years ago

Fixes #56.

Almost done, but I'm stuck with a last few details as mentioned in https://github.com/mvsmal/fable-material-ui/issues/56#issuecomment-484636985, so I figured I'd share the work I have done.

I have only concentrated on the actual library dependencies. Docs dependencies are left untouched (separate group in paket.dependencies).

The choice of new types is based on discussion in https://github.com/fable-compiler/fable-react/issues/151 and https://github.com/fable-compiler/fable-react/issues/155.

Note that I have no problems if you want to reject this PR and do your own thing entirely. I just want Fable.MaterialUI to support Fable.React 5 so I can get on with the new Fable.React 5 goodness. :)

cmeeren commented 5 years ago

For a note about CSSProperties see https://github.com/fable-compiler/fable-react/issues/155#issuecomment-485387416

I haven't been able to figure out how the original CSSProperties was intended to be used, so I'll let you make the decision about how it should look now.

mvsmal commented 5 years ago

Hello @cmeeren. Many thanks for your contribution. I've been too busy to work on this update lately. I will use this update as a base for the further work. That's why I've changed the base branch to fable-react-5. I saw Alfonso made some changes, which will help us.

Regarding RefProp I would keep U2, but replace obj with RefValue<'T>, so it becomes even more type safe. Frankly, I am not sure how many users actually utilize this approach.

As for CSSProperties I would go for just obj and keep it not type safe for now. Maybe later we could take old Fable.React code and put it into this library, however it would probably make the package larger since tree-shaking might not work for such object type (I will need to test).

I am also waiting for Material-UI v4 to switch from HOC to Hook-based styles, but that's a next step.

cmeeren commented 5 years ago

Great, thanks!