VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.89k forks source link

Missing document argument #2273

Open Julien-Sytadelle opened 5 years ago

Julien-Sytadelle commented 5 years ago

https://github.com/VulcanJS/Vulcan/blob/90b470036f17acfb7cf02ba97f2110c3e5716265/packages/vulcan-ui-material/lib/components/core/EditButton.jsx#L75-L79

document argument is not passed to the successCallback function.

eric-burel commented 5 years ago

Thanks for opening an issue. Material UI deserves a small refactor now that it's in the core to limit such issues. I won't be able to provide additional fix on Material UI until next week (I am pushing a small cleanup of form components right now) so don't hesitate to open PR in the meantime, even if it's for adding quickfixes.

Julien-Sytadelle commented 5 years ago

Hi Eric,

The problem for a PR is that I could not update vulcan past 1.12.13 so I still work with erikdakoda package. I just opened the issue here for information. When I use devel, everything breaks and between apollo update and material-ui I am lost. I am waiting for a kind of update tutorial but I should start from a new project to see what breaks.

About refactoring, I am also working on Datatable, adding Hidden component to hide fields on small screens and some fields to display cloudinary images, some flags, some arrays. Also, The function getFieldValue of Card.jsx should be exported and use lodash.get to use fields of objects. I added a label optional field in this case. Once I use devel I will make PRs.

eric-burel commented 5 years ago

Thanks I'll check that.

Concerning the upgrade, issues comes mostly from React-Router 4. Material UI did not change much, it's just imported from "vulcan:ui-material" now. Sacha wrote an article here: https://blog.vulcanjs.org/vulcan-js-1-13-introducing-apollo-client-server-2-react-router-4-44528086faae And this issue lists some steps too (at the bottom): https://github.com/VulcanJS/Vulcan/issues/2171#issuecomment-451633028

I understand that it can be a bit tedious though. Don't hesitate to ask questions on the Slack if you encounter troubles during this update.