Save Drafts to StoresteemCreated with Sketch.

in #utopian-io7 years ago

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 - import getDrafts() helper; add drafts to response so that it can be loaded when /drafts URL is accessed;
  • src/helpers/localStorageHelpers.js - added main methods getDrafts(), add draft to local store, and delete draft from local store;
  • src/post/Write/editorActions.js - switched adding to and deleting drafts from user_metadata to store;
  • src/post/Write/editorReducer.js - get drafts directly from payload instead of user_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

Sort:  

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:

  1. The upvote from @utopian-io ($67.31 value).
  2. Although I didn't ask for it, @elear gave me 80 STEEM for it
  3. I received other upvotes via @elear's publication of my contribution here;

If I were to estimate the value of each:

  1. utopian-io bot's vote value: $67.31
  2. Liquid STEEM: 80 STEEM (around $80)
  3. Upvotes triggered by @elear's post: around $5

And we were to strictly consider only the vote from @utopian-io ($67.31):

  • 80%: $53.848
  • 20%: $13.462 (15% goes to those people who delegated Steem Power to @utopian-io, 5% goes to the moderators who review the posts)

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]

Hey @eastmael I am @utopian-io. I have just super-voted you at 22% Power!

Suggestions https://utopian.io/rules

  • Your contribution is less informative than others in this category.

Achievements

  • I am a bot...I love developers... <3
  • You have less than 500 followers. Just gave you a gift ;)
  • Seems like you contribute quite often. AMAZING!
  • You have a good amount of votes on your contributions. Good job!
    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

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63098.94
ETH 2621.87
USDT 1.00
SBD 2.74