Skip to content

Conversation

@csillag
Copy link
Contributor

@csillag csillag commented Mar 31, 2024

Display votes on the proposal details page.

Design is here.

Some of the required data is not yet provided by nexus, including:

  • Timestamps for votes
  • Voting power accompanying the votes

Therefore, some parts are not implemented yet.

@github-actions
Copy link

github-actions bot commented Mar 31, 2024

Deployed to Cloudflare Pages

Latest commit: b641559d9d58116730758a5b9080939a99637808
Status:✅ Deploy successful!
Preview URL: https://237679fe.oasis-explorer.pages.dev

@csillag csillag force-pushed the csillag/proposal-show-votes-simplified branch 3 times, most recently from c445593 to 2d971f4 Compare March 31, 2024 18:56
@csillag csillag force-pushed the csillag/proposal-show-votes-simplified branch from 2d971f4 to c6913a8 Compare March 31, 2024 22:11
@csillag csillag marked this pull request as ready for review March 31, 2024 22:19
export const ProposalVoteIndicator: FC<ProposalVoteIndicatorProps> = ({ vote }) => {
const { t } = useTranslation()

if (!ProposalVoteValue[vote]) {
Copy link
Member

Choose a reason for hiding this comment

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

When does this happen? I would throw an error - response doesn't match types

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, throwing an error now. The question is, on which level do we want to catch it (with a boundary)?

My guess is that we stall want to see as much of the list as possible, so let's catch it within the table cell, like this:

image

Is that how you would do it? Or should the error kill the whole list?

Copy link
Member

Choose a reason for hiding this comment

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

🤷 either. I'd crash it all

Copy link
Contributor

Choose a reason for hiding this comment

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

From a user's perspective, we should show as much as possible. Showing a full invalid view does not help the user.

@csillag csillag force-pushed the csillag/proposal-show-votes-simplified branch 9 times, most recently from 7da7549 to 2aea726 Compare May 9, 2024 02:46
@csillag csillag requested a review from lukaw3d May 9, 2024 02:46
@csillag csillag force-pushed the csillag/proposal-show-votes-simplified branch 4 times, most recently from a8531a9 to b4b912f Compare May 10, 2024 14:36
@csillag csillag force-pushed the csillag/proposal-show-votes-simplified branch from b4b912f to b641559 Compare May 15, 2024 00:01
@csillag csillag merged commit 37a8933 into master May 15, 2024
@csillag csillag deleted the csillag/proposal-show-votes-simplified branch May 15, 2024 00:03
@lukaw3d lukaw3d mentioned this pull request May 17, 2024
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.

4 participants