Steemit Condenser Contributions: Creating and loading template from the post editor


View this post on Hive: Steemit Condenser Contributions: Creating and loading template from the post editor


Context

I regularly create witnesses reports or Condenser contributions report manually (because I want to review the content before posting). To help simplify the task I have created my own Chrome extension that can save/load markdown templates and inject them into the post editor of Steemit.

Recently @smooth suggested that the condenser should allow us to set a default value for the post payout type (declined, 50/50 or 100% SP). While I believe it's a good idea, I preferred to actually be able to save those in a template like what SteemPeak is doing. This would allow you to set your preferred payout type and beneficiaries for different type of posts.

The work done

First, when you click on the "Advanced settings" from the post editor, it will show the Post templates section where you will be able to save a new template. Simply choose your payout and beneficiaries, give the template a name and click on "Save". This will save the post details (title, body and tags) and the advanced settings.

No template available

Once at least one template is saved, you will be able to choose it from a drop down menu when you go back into the advanced settings. Clicking on "Save" will then apply it to the current form (this will overwrite any existing title, body and tags).

Choosing an existing template

Steemit Condenser Pull Request

This feature is not out yet, a pull request has been created:
https://github.com/steemit/condenser/pull/3674

Once approved and merged, it will be available in a future release by Steemit Inc.


Vote for my witness
Support @quochuy Witness.jpg
On Steem, Witnesses are playing the important role of providing a performant and safe network for all of us. You have the power to choose 30 trusty witnesses to package transactions and sign the blocks that will go in the Steem blockchain. Vote for me via SteemConnect to help me do more useful projects for the communities.


Comments 35


As a follower of @followforupvotes this post has been randomly selected and upvoted! Enjoy your upvote and have a great day!

16.01.2020 10:04
0

Congratulations @quochuy, you have received a 80% upvote. I'm the Vietnamese Community bot developed by witness @quochuy and powered by community SP delegations

16.01.2020 10:06
0

Good

16.01.2020 15:10
0

Great work! Just voted for you as the steem witness.

16.01.2020 18:45
2

Thanks heaps

Posted using Partiko iOS

16.01.2020 21:23
0

steemdev used to be a popular tag for such post.

16.01.2020 19:02
1

Will add it, thanks for the reminder

Posted using Partiko iOS

16.01.2020 21:27
0

Hey @quochuy, am a starter into the Python world and currently coming across this post and getting amazed by the developments you pitching.

I'd be happy getting a way to you for some tips on building a simple frontend for steem as part of my projects(bootcamp). Please do let me know how to contact you. Thanks.

16.01.2020 19:07
1

Unfortunately I’m not familiar with Python. If you want to connect to the chain with Python, try Beem by @holger80. You can also find me https://steem.chat/channel/dev

Posted using Partiko iOS

16.01.2020 21:26
0

I do appreciate your kind infor, checking on.

17.01.2020 04:12
0

Thank you πŸ™‚πŸ‘

Posted using Partiko iOS

16.01.2020 21:03
0

πŸ‘

17.01.2020 01:35
0

Will vote for you as steem witness

17.01.2020 07:31
1

Thank you πŸ™

Posted using Partiko iOS

17.01.2020 10:40
0

πŸ‘

17.01.2020 08:12
0

Nice work

17.01.2020 14:35
0

Hey @quochuy. Really excited to see that you built this out for condenser. Thanks for taking on the initiative.

We tried to merge your PR into the https://steemleo.com site and are having trouble getting saved templates to appear as an option to load a new post.

Any ideas?

image.png

17.01.2020 15:38
1

Open the browser inspector, what variables to you see in the localstorage for your domain?

Posted using Partiko iOS

17.01.2020 16:05
1

My limited technical skills might show here, but I don't see anything there for local storage.

image.png

17.01.2020 16:13
0

have access to a computer now so will check on your site directly

17.01.2020 16:16
0

First, you need to merge my other PR for 3speak that fixes few bugs:
https://github.com/steemit/condenser/pull/3675

As for the templates, it seems like there are some issues after your merge. My code cannot see the tags anymore.

Do you have a git repo for your site?
The issues seems to come from the file:
src/app/components/elements/ReplyEditor.jsx

userTemplates.push({
  name: nextProps.postTemplateName.replace('create_', ''),
  beneficiaries,
  payoutType,
  markdown: body.value,
  title: title.value,
  tags: tags.value,
});

tags.value does not exist

17.01.2020 16:29
1

You need to expand that "Local Storage" by clicking on the arrow on its left, then click on your domain name (should be first)

17.01.2020 16:16
0

lol sometimes I miss the most obvious things

image.png

17.01.2020 16:26
0

I just pushed a new commit, can you try merge it back to your code?
https://github.com/quochuy/condenser/commit/44ab51fb8ad2348ea399b25c1d682e907848259d

17.01.2020 16:36
1

Awesome! Looks like that commit change made it work. Thanks for all your help with this and for creating it in the first place. This is a great feature. Anything we can do to help support you more?

image.png

17.01.2020 17:10
0

Only partially. You might not be able to save the tags into the template. It seems your version of the condenser is a bit different.

Don’t forget to also merge my 3Speak fixes.

Posted using Partiko iOS

17.01.2020 22:52
1

Gotcha. I'll have my dev take a look at it as well to see if there is anything we can do to fix that.

I brought in some of the 3speak fixes. The embed player seems to be working. I'll have to wait for him to take a look at those as well to confirm/fix any errors I made.

Thanks again :)

18.01.2020 00:12
0

Cool. When debugging the templates on your site, I noticed my changes for 3Speak was outputting warnings. This should be handled by the new PR.

Take care

Posted using Partiko iOS

18.01.2020 00:31
0

17.01.2020 15:47
0

Will vote for you as a Steemit witness

17.01.2020 19:05
0

2.5 USD has been spent to promote this content using Steemium .
Learn more here!

17.01.2020 19:46
0

Some great information!

17.01.2020 20:50
0

Thanks for the post.

21.01.2020 04:37
0