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

Manage proposal status consistently #1984

Closed
Silver-IT opened this issue May 7, 2024 · 4 comments · Fixed by #2046
Closed

Manage proposal status consistently #1984

Silver-IT opened this issue May 7, 2024 · 4 comments · Fixed by #2046
Assignees
Labels
App:Frontend Note:Contracts Issues involving modifications to contracts

Comments

@Silver-IT
Copy link
Member

Problem

Now, we have two types of constants which represent the proposal state.
One is the list of these variables which have prefix of STATUS_.

export const STATUS_OPEN = 'open'
export const STATUS_PASSED = 'passed'
export const STATUS_FAILED = 'failed'
export const STATUS_EXPIRED = 'expired'
export const STATUS_CANCELLED = 'cancelled'

And the other is PROPOSAL_VARIANTS enum.

export const PROPOSAL_VARIANTS = {
  CREATED: 'created',
  EXPIRING: 'expiring',
  ACCEPTED: 'accepted',
  REJECTED: 'rejected',
  EXPIRED: 'expired'
}

Solution

Use only one constant, and remove the other.

@Silver-IT Silver-IT added Kind:Enhancement Improvements, new features, performance upgrades, etc. App:Frontend Note:Contracts Issues involving modifications to contracts labels May 7, 2024
@Silver-IT Silver-IT self-assigned this May 7, 2024
@Silver-IT Silver-IT removed the Kind:Enhancement Improvements, new features, performance upgrades, etc. label Jun 5, 2024
@Silver-IT
Copy link
Member Author

@taoeffect
In the current version, we create a message in the general chatroom, when the proposal is about to be expired. The name of the function that does this is notifyExpiringProposals.

Are we planning to create messages in the general chatroom for the status changes of all the proposals?

  • When proposal created
  • When proposal accepted
  • When proposal reject
  • When proposal expired
  • When proposal cancelled

@taoeffect
Copy link
Member

@Silver-IT Sure, yes I think that would be helpful 👍

@Silver-IT
Copy link
Member Author

@taoeffect, Yeah. If we notify proposal status in several ways, in relative the users would not miss to vote proposals.

But now, we notify the proposal status using notifications.

  • When proposal created
  • When proposal accepted
  • When proposal reject
  • When proposal expired
  • When proposal cancelled

Do we need to notify using general chatroom too? What I think is that we should notify the proposal status in one way, IMHO it's using notification, not using general chatroom. So, I would like to change workflow and make it to create notification instead of creating message when proposal is expiring.

And I remember you asked me for what we use MESSAGE_TYPES.INTERACTIVE. We currently use this type of messages only for notification message that saying the proposal is expiring. The MESSAGE_TYPES.NOTIFICATION and MESSAGE_TYPES.INTERACTIVE are all automatically created by the system, not by a specific user. But MESSAGE_TYPES.INTERACTIVE message uses horn(📢) instead of profile picture while MESSAGE_TYPES.NOTIFICATION message uses a picture of the specific user.

@taoeffect
Copy link
Member

So, I would like to change workflow and make it to create notification instead of creating message when proposal is expiring.

Go for it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App:Frontend Note:Contracts Issues involving modifications to contracts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants