[Utopian] Steemit Advanced Settings Modal with Payout Setting

in #utopian-io6 years ago

Repository

https://github.com/steemit/condenser

New Feature

Recently as part of an effort towards adding the functionality for adding beneficiaries on posts, I helped set up an Advanced Settings modal which allows setting of the reward type on posts.

advancedsettingsinreply.PNG

It has feedback for what the split on the rewards is, and adds a link to toggle showing the Advanced Settings modal where you can change it.

advancedsettingsmodal.PNG

In the modal, there's the dropdown for payout type, set to whatever the default set on the profile or what is currently selected on the post. There's information about what your current default is, and a link to show where you can change it.

The commit with all changes is shown here:

https://github.com/steemit/condenser/commit/42e72b3d83a89daac504fb301b90630cd7512849

To implement this, I followed the pattern of the other modals in

https://github.com/steemit/condenser/blob/42e72b3d83a89daac504fb301b90630cd7512849/src/app/components/modules/Modals.jsx

though with the additional parameter that the formId is passed to the Modal. This allows the advanced settings to work when in the context of comment replies as well, though for now we do not enable this for comments.

Continuing along, in the ReplyEditor.jsx,

https://github.com/steemit/condenser/commit/42e72b3d83a89daac504fb301b90630cd7512849#diff-1f7a9b5758da60a99d0b041736b50e39R835

shows how I am storing the current post setting for payout type in the Redux store, and referenced throughout the file to display what is set, as well as the functionality for saving and restoring from local storage.

That's the rough idea, let me know if you have any specific questions below. I suspect the current feature won't see much use except for when users specifically want to decline payout. At least there's no longer a need to have to keep switching a default when this is desired. But I'm more excited now that I can put in the next phase of changes that I've been sitting on. Stay tuned!

GitHub Account

https://github.com/eonwarped

Sort:  
  • Great accomplishment to commit code to the steemit repo.
  • Good looking code, you just need to put in more comments.
  • The post itself could have been more elaborate, don't hesitate to geek out.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thanks for the feedback!

Hey thats great! Congrats!

Yip making Stinc great again one tweak at a time. 👍

A nice clean change. Just me or did this get merged? Congrats

It's merged, yes. Utopian accepts contributions after merge. :) Back to tweakin'...

Hey @eonwarped
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!