Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postingflags #1137

Open
wants to merge 10 commits into
base: development
Choose a base branch
from
Open

Postingflags #1137

wants to merge 10 commits into from

Conversation

shawnpringle
Copy link
Collaborator

I'll be adding these features:
show whether a post was self-voted, how its reward will be split, and when to display what the reward limit is.

Sometimes it is interesting to some to see whether the user has self-voted a post. Whether they are powering up 100% or whether they have limited their payout to some small value.

These are set in the site wide defaults file:
"showSelfVote": true, "showRewardSplit": true, "lowRewardThreshold": 1000000000
For example, if you set lowRewardThreshold to 1000, it wont show unless the post is restricted to 1000 HBD or to some other lower value.

See also: https://www.proofofbrain.blog/hive-150329/@leprechaun/show-self-vote-maximum-payout-hive-150329

@@ -286,6 +287,13 @@ export default class EntryListItem extends Component<Props, State> {

const cls = `entry-list-item ${promoted ? "promoted-item" : ""} ${global.filter}`;

const self_vote_entry = entry.active_votes.find((x) => x.voter == entry.author);
const self_vote = self_vote_entry ? self_vote_entry.rshares : false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const selfVote = self_vote_entry?.rshares ?? false;

const self_vote_entry = entry.active_votes.find((x) => x.voter == entry.author);
const self_vote = self_vote_entry ? self_vote_entry.rshares : false;
const hp_portion = 100 * (1 - entry.percent_hbd / 20000);
const max_payout: number = parseFloat(entry.max_accepted_payout);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need extra number

<div className="app" title={app}>
<Tsx k="entry.via-app" args={{ app: appShort }}>
<a href="/faq#source-label" />
</Tsx>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess <a href="/faq#source-label">{_t('entry.via-app', { app: appShort })}</a> much easier

// @ts-ignore
(x) => x.voter == entry.author
);
const self_vote = self_vote_entry ? true : false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const selfVote = !!selfVoteEntry

showSelfVoteChanged = (e: React.ChangeEvent<typeof FormControl & HTMLInputElement>) => {
const { setShowSelfVote } = this.props;
const { value } = e.target;
console.log(value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary log

try {
setLowRewardThreshold(JSON.parse(value));
} catch (e) {
console.log(value, "Couldn't get it done boss");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a error function that will show an alert on the bottom right side of viewport. Please use it instead

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error message not meaningful

@@ -114,6 +145,10 @@ export class Preferences extends BaseComponent<Props, State> {
if (use_system_theme) {
theme = "system";
}
this.showSelfVoteChanged = this.showSelfVoteChanged.bind(this);
this.showRewardSplitChanged = this.showRewardSplitChanged.bind(this);
this.lowRewardThresholdChanged = this.lowRewardThresholdChanged.bind(this);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you did this? Arrow functions already have a current context

@shawnpringle
Copy link
Collaborator Author

shawnpringle commented Dec 8, 2022 via email

@feruzm
Copy link
Member

feruzm commented Jan 31, 2023

@shawnpringle I would prefer bit discreet design to show these info. Can you check mobile view in posts, there we have i info icon that shows read time and word count, could we show these details inside that type of popover?!
Idea of simplicity is to keep page from too much information being shown to new users. For many people these information has less value, imo. What do you think?

Also to discuss further fundamental of these features, here are few arguments:

  • self voted info - why we need to show this info to reader, people post their content usually do like it! This feature creates false mentality that it is wrong.
  • reward split - it is already shown when you hover on $ values, isn't it.
  • reward limit - also shown when you hover on $ if it is different than default value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants