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

Fazle/vote timeline chart #303

Merged
merged 33 commits into from
Jun 12, 2024
Merged

Fazle/vote timeline chart #303

merged 33 commits into from
Jun 12, 2024

Conversation

sbvhev
Copy link
Collaborator

@sbvhev sbvhev commented May 22, 2024

PR-Codex overview

This PR introduces new SVG icons for voting bars, updates component props, adds scientific notation functions, and refactors UI components.

Detailed summary

  • Added new SVG icons for voting bars
  • Updated component props to include proposalVotes
  • Added scientific notation functions
  • Refactored UI components for better structure

The following files were skipped due to too many changes: src/components/Proposals/ProposalPage/OPProposalPage/ProposalVotesSummary/ProposalVotesSummary.tsx, src/components/Proposals/ProposalPage/VotingTimelineChart/VotingTimelineChart.tsx, src/components/Proposals/ProposalPage/OPProposalPage/ProposalVotesSummaryDetails/ProposalVotesSummaryDetails.tsx, yarn.lock

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented May 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agora-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 10:11pm
agora-next-ens ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 10:11pm
agora-next-etherfi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 10:11pm
agora-next-uniswap ❌ Failed (Inspect) Jun 12, 2024 10:11pm

Copy link
Contributor

sweep-ai bot commented May 22, 2024

Sweep: PR Review

Authors of pull request: @sbvhev

src/components/Proposals/ProposalPage/OPProposalApprovalPage/OPProposalApprovalPage.tsx

Added a new prop proposalVotes to the ProposalDescription component to provide it with votes data fetched asynchronously.

Sweep Found These Issues


src/components/Proposals/ProposalPage/OPProposalPage/OPProposalOptimisticPage.jsx

Added the proposalVotes prop to the ProposalDescription component to enable it to utilize votes data.

Sweep Found These Issues


src/components/Proposals/ProposalPage/OPProposalPage/OPProposalPage.tsx

Added the proposalVotes prop to the ProposalDescription component to provide it with voting data.


src/components/Proposals/ProposalPage/OPProposalPage/ProposalVotesSummary/ProposalVotesSummary.tsx

Added hover card functionality to display detailed proposal vote summaries on hover.

Sweep Found These Issues


src/components/Proposals/ProposalPage/ProposalDescription/ProposalDescription.jsx

Added the VotingTimelineChart component to the ProposalDescription component to display a voting timeline using the proposal and proposalVotes props.

Sweep Found These Issues


src/icons/icons.ts

Added three new SVG icons (chevronSelectorVertical, check, and link) to the icons export object.


src/lib/utils.ts

Added a new function formatNumberWithScientificNotation for scientific notation formatting and ensured consistent BigInt operations in generateBarsForVote.

Sweep Found These Issues

  • The formatNumberWithScientificNotation function does not handle cases where the input x is not a number, which could result in unexpected behavior or errors.
  • export function formatNumberWithScientificNotation(x: any) {
    if (Math.abs(x) < 1.0) {
    var e = parseInt(x.toString().split("e-")[1]);
    if (e) {
    x *= Math.pow(10, e - 1);
    x = "0." + new Array(e).join("0") + x.toString().substring(2);
    }
    } else {
    var e = parseInt(x.toString().split("+")[1]);
    if (e > 20) {
    e -= 20;
    x /= Math.pow(10, e);
    x += new Array(e + 1).join("0");
    }
    }
    return x;

    View Diff


The following files were not reviewed because our filter identified them as typically non-human-readable or less important files (e.g., dist files, package.json, images). If this is an error, please let us know.

  • package.json
  • yarn.lock

Copy link
Contributor

@andreitr andreitr left a comment

Choose a reason for hiding this comment

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

The chart looks good for optimism but we need to figure out why it didn't work on ENS proposals.

@andreitr andreitr merged commit 38a1184 into main Jun 12, 2024
5 of 7 checks passed
@andreitr andreitr deleted the fazle/vote-timeline-chart branch June 12, 2024 22:37
kent pushed a commit that referenced this pull request Aug 30, 2024
* Merge

* working

* feat:Vote Timeline graph style interface

* WIP:voting timeline summary extended version ui

* feat:Implemented live data display in timeline chart

* fixes timeline chart

* Formatting and updates to sci notation functions

* A few minor bugfixes and empty vote display

* Reverted tenant-specific avatar changes

* wip

* Fixed quorum and threshold values

* Removed info icons

* Misc fixes

* Fixed hover issues and a few misc css bugs

* Quorum calc

---------

Co-authored-by: Andrei Taraschuk <[email protected]>
Co-authored-by: andrei <[email protected]>
jefag pushed a commit that referenced this pull request Oct 4, 2024
* Merge

* working

* feat:Vote Timeline graph style interface

* WIP:voting timeline summary extended version ui

* feat:Implemented live data display in timeline chart

* fixes timeline chart

* Formatting and updates to sci notation functions

* A few minor bugfixes and empty vote display

* Reverted tenant-specific avatar changes

* wip

* Fixed quorum and threshold values

* Removed info icons

* Misc fixes

* Fixed hover issues and a few misc css bugs

* Quorum calc

---------

Co-authored-by: Andrei Taraschuk <[email protected]>
Co-authored-by: andrei <[email protected]>
jefag pushed a commit that referenced this pull request Oct 4, 2024
* Merge

* working

* feat:Vote Timeline graph style interface

* WIP:voting timeline summary extended version ui

* feat:Implemented live data display in timeline chart

* fixes timeline chart

* Formatting and updates to sci notation functions

* A few minor bugfixes and empty vote display

* Reverted tenant-specific avatar changes

* wip

* Fixed quorum and threshold values

* Removed info icons

* Misc fixes

* Fixed hover issues and a few misc css bugs

* Quorum calc

---------

Co-authored-by: Andrei Taraschuk <[email protected]>
Co-authored-by: andrei <[email protected]>
jefag pushed a commit that referenced this pull request Oct 8, 2024
* Merge

* working

* feat:Vote Timeline graph style interface

* WIP:voting timeline summary extended version ui

* feat:Implemented live data display in timeline chart

* fixes timeline chart

* Formatting and updates to sci notation functions

* A few minor bugfixes and empty vote display

* Reverted tenant-specific avatar changes

* wip

* Fixed quorum and threshold values

* Removed info icons

* Misc fixes

* Fixed hover issues and a few misc css bugs

* Quorum calc

---------

Co-authored-by: Andrei Taraschuk <[email protected]>
Co-authored-by: andrei <[email protected]>
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.

2 participants