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

Show banner for when user delegated tokens after a proposal was made #2721

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

DarksightKellar
Copy link
Contributor

@DarksightKellar DarksightKellar commented Feb 7, 2025

See issue for testing instructions

Screenshot 2025-02-07 at 17 19 13

I've also:

  • Removed the ability to hide voting power
  • Done some refactoring to make it it easier to implement redesigned proposal summary cards
  • Removed an apparently redundant expandedView

I noticed the Quorum bar has been moved in the designs from the side panel to the Breakdown section:
Screenshot 2025-02-07 at 18 29 09

I didn't do that here (too outta scope), but leaving it as is also led to ugly UI. For a middle ground I moved it out of the VoteSection, pending its move to the Votes Breakdown:
Screenshot 2025-02-07 at 18 28 04

Copy link

cloudflare-workers-and-pages bot commented Feb 7, 2025

Deploying decent-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1380cc3
Status: ✅  Deploy successful!
Preview URL: https://141ffaa9.decent-interface.pages.dev
Branch Preview URL: https://eng-91-voting-power-hint.decent-interface.pages.dev

View logs

Comment on lines 63 to 75
export const VOTE_CHOICES = [
{
label: 'yes',
label: 'Approve',
value: 1,
},
{
label: 'no',
label: 'Reject',
value: 0,
},
{
label: 'abstain',
label: 'Abstain',
value: 2,
},
Copy link
Member

Choose a reason for hiding this comment

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

What are these changes for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update from design:
Screenshot 2025-02-07 at 18 25 02

Copy link
Member

Choose a reason for hiding this comment

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

The lowercase "yes/no/abstain" are translation string keys though right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh... dang. Duh. Will update, thanks

@DarksightKellar DarksightKellar requested review from mudrila, adamgall, Da-Colon and a team February 7, 2025 18:26
{showVotingPower ? proposalVotingWeight : t('show')}
</Button>
);
const notEnoughVotingPowerAtTheTimeOfProposalCreation =
Copy link
Contributor

Choose a reason for hiding this comment

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

now if thats not an example of clear variable naming I don't know what is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lmaooo

@@ -73,7 +313,6 @@ export function AzoriusProposalSummary({ proposal }: { proposal: AzoriusProposal
address: tokenAddress,
client: publicClient,
});
// @todo We should be checking proposal state - if it's active, we should use the latest block, otherwise we should calculate the voting weight based on the startBlock and deadlineMs
Copy link
Contributor

Choose a reason for hiding this comment

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

is this TODO no longer relavent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm I don't remember. I'll take a look

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