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

Display the votes on the network proposal details page (simplified version) #1356

Merged
merged 3 commits into from
May 15, 2024

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.

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

src/app/components/Account/AccountLink.tsx Outdated Show resolved Hide resolved
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
Collaborator

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.

src/app/components/Proposals/VoteTypePills.tsx Outdated Show resolved Hide resolved
src/app/components/Proposals/VoteTypePills.tsx Outdated Show resolved Hide resolved
src/app/components/Validators/ValidatorImage.tsx Outdated Show resolved Hide resolved
src/app/pages/ProposalDetailsPage/hooks.ts Outdated Show resolved Hide resolved
src/app/pages/ProposalDetailsPage/hooks.ts Outdated Show resolved Hide resolved
src/app/pages/ProposalDetailsPage/hooks.ts Outdated Show resolved Hide resolved
src/types/vote.ts Outdated Show resolved Hide resolved
src/app/pages/TokenDashboardPage/hook.ts Outdated Show resolved Hide resolved
@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
src/app/pages/ProposalDetailsPage/hooks.ts Outdated Show resolved Hide resolved
src/app/pages/ProposalDetailsPage/hooks.ts Outdated Show resolved Hide resolved
@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
8 checks passed
@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.

None yet

3 participants