wevote / WebApp

We Vote's javascript (client-side) mobile website built with React/Flux. Twitter: @WeVote Apple Store: https://itunes.apple.com/us/app/we-vote-voter-guide/id1347335726 Android: https://play.google.com/store/apps/details?id=org.wevote.cordova&hl=en_US
95 stars 297 forks source link

material-ui-dropzone -- which fork do we want? #3491

Open SailingSteve opened 2 years ago

SailingSteve commented 2 years ago

We might be loading a maintained, but minimally liked branch of material-ui-file-dropzone and it is throwing an error

react-dom.development.js:67 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. at DropzoneArea (https://localhost:3000/vendors-node_modules_mui-file- dropzone_dist_index_js.7f62992ececc56effd98.js:28255:9)

We are loading version 4.01 of https://github.com/Deckstar/mui-file-dropzone

https://github.com/sah/material-ui-dropzone

https://github.com/Yuvaleros/material-ui-dropzone

DaleMcGrew commented 2 years ago

Hi @SailingSteve I think switching to https://github.com/Yuvaleros/material-ui-dropzone makes sense. Thank you for the suggestion. I marked this as priority 2 since it could wait until after November unless someone has a desire to upgrade and test the change now, in favor of other higher priority features in the works. But I have no objection to the upgrade.

eloeher commented 1 year ago

We've upgraded to the new package and everything seems to be working as it was before, without the unmounted component error.

However, interestingly, when I now drop a photo into the dropzone, it changes the "Save photo" and "choose new election" buttons to be white with a navy hover, instead of blue with white text. All the functionality is still working, but wondering if anyone with better insight on this project's styling can give any insight on what would fix this minor UI issue.

If the UI is not an issue (or we should just open a separate issue for it) this issue is otherwise ready for a PR and close.

Screen Shot 2022-12-01 at 12 56 59 PM

DaleMcGrew commented 1 year ago

Thank you @eloeher and @ctomasian! Yes, please feel free to submit a pull request, and we can fix the styling issue separately.