Save Drafts to Store
This is bug fix for issue #72.
1. The Bug
Contribution with more than 20,000 characters was not automatically saved and the following error displayed in the browser's console:
2. The Fix
src/auth/authActions.js
- importgetDrafts()
helper; add drafts to response so that it can be loaded when/drafts
URL is accessed;src/helpers/localStorageHelpers.js
- added main methodsgetDrafts()
, add draft to local store, and delete draft from local store;src/post/Write/editorActions.js
- switched adding to and deleting drafts fromuser_metadata
to store;src/post/Write/editorReducer.js
- get drafts directly from payload instead ofuser_metadata
;
3. Other Information
3.1. The Fork
The fix was pushed to my fork - https://github.com/eastmaels/busy.
3.2. The Branch
I pushed the changes to my branch bugfix/save-draft-with-more-than-20k-chars.
3.3. The Commit
My commit was given the hash d5c95ab5050fc53aa76e04fef05afc65bec7a5e0.
3.4. The PR
My PR was PR#78 in utopian-io/utopian.io git repo. Already merged as of this writing.
Open Source Contribution posted via Utopian.io
Can you tell us, how much of the reward here will you get in the end for your work?
Because this post has a lot of beneficiaries (20% of your reward seems to go to them)
Hello @wetten, thank you for asking. Actually for this work, there were many rewards received:
If I were to estimate the value of each:
And we were to strictly consider only the vote from @utopian-io ($67.31):
Considering that this is a contribution to open-source project where most of the contributions could not have been paid, at this point $53 is enough for me.
Approved in Utopian. Thanks @eastmael
[utopian-moderator]
Thank you.
Hey @eastmael I am @utopian-io. I have just super-voted you at 22% Power!
Suggestions https://utopian.io/rules
Achievements
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Thanks.