diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f68c9b6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,27 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behaviour: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behaviour** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..ad4bd54 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,42 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +## Feature Request + +### Description +A clear and concise description of the feature you are proposing. + +### Use Case + +Describe the problem or need that this feature aims to address. Include any scenarios or examples that illustrate the use case. + +### Proposed Solution + +If you have a specific solution in mind, provide details on how you envision the feature working. + +### Benefits + +Explain the benefits of implementing this feature. How will it improve the project or user experience? + +## Improvement Suggestion + +###Description: +A clear and concise description of the improvement you are suggesting. + +### Current Situation + +Describe the current state or behavior that you believe could be improved. Include any pain points, limitations, or areas where the project can be enhanced. + +### Proposed Improvement + +If you have specific ideas or suggestions for improvement, outline them here. Be clear about how the suggested changes will benefit the project. + +### Benefits + +Explain the benefits of implementing this improvement. How will it positively impact the project or user experience? diff --git a/apps/astraplusplus/widget/Common/Modals/Voters.jsx b/apps/astraplusplus/widget/Common/Modals/Voters.jsx index 7fa5340..67969fe 100644 --- a/apps/astraplusplus/widget/Common/Modals/Voters.jsx +++ b/apps/astraplusplus/widget/Common/Modals/Voters.jsx @@ -111,13 +111,15 @@ return ( {Object.keys(votes).length === 0 && ( No votes yet )} - {votersCount > Object.keys(votes).length && ( -
- Note: Indexer is currently running behind schedule, and the - expected results may take longer to appear. We appreciate your - patience and apologize for any inconvenience. -
- )} + {isCongressDaoID && + isVotingBodyDao && + votersCount > Object.keys(votes).length && ( +
+ Note: Indexer is currently running behind schedule, and the + expected results may take longer to appear. We appreciate + your patience and apologize for any inconvenience. +
+ )} {Object.keys(votes).map((voterId) => { const vote = isCongressDaoID || isVotingBodyDao diff --git a/apps/astraplusplus/widget/DAO/Projects.jsx b/apps/astraplusplus/widget/DAO/Projects.jsx deleted file mode 100644 index be9e0c3..0000000 --- a/apps/astraplusplus/widget/DAO/Projects.jsx +++ /dev/null @@ -1,3 +0,0 @@ -return ( - -); diff --git a/apps/astraplusplus/widget/DAO/Proposals/Card/index.jsx b/apps/astraplusplus/widget/DAO/Proposals/Card/index.jsx index 5ee5051..1a339bb 100644 --- a/apps/astraplusplus/widget/DAO/Proposals/Card/index.jsx +++ b/apps/astraplusplus/widget/DAO/Proposals/Card/index.jsx @@ -335,9 +335,12 @@ const expensiveWork = () => { : 0; // Apply the threshold - const votesNeeded = Math.ceil( - (threshold[0] / threshold[1]) * eligibleVoters - ); + if (eligibleVoters === 0) { + return; + } + const votesNeeded = + Math.floor((threshold[0] / threshold[1]) * eligibleVoters) + + 1; totalVotesNeeded += votesNeeded; } @@ -367,6 +370,7 @@ const expensiveWork = () => { }; Object.keys(my_proposal.vote_counts).forEach((key) => { + if (key === "all") return; totalVotes.yes += my_proposal.vote_counts[key][0]; totalVotes.no += my_proposal.vote_counts[key][1]; totalVotes.spam += my_proposal.vote_counts[key][2]; diff --git a/apps/astraplusplus/widget/DAO/Proposals/Card/ui.jsx b/apps/astraplusplus/widget/DAO/Proposals/Card/ui.jsx index 61d60a3..860e643 100644 --- a/apps/astraplusplus/widget/DAO/Proposals/Card/ui.jsx +++ b/apps/astraplusplus/widget/DAO/Proposals/Card/ui.jsx @@ -494,6 +494,7 @@ function renderVoteButtons({ isAllowedToVote, handleVote }) { + const finished = statusName !== "In Progress"; const VoteButton = styled.button` width: 100%; border-radius: 15px; @@ -518,8 +519,8 @@ function renderVoteButtons({ color: #000; transition: all 0.4s ease-in-out; } - ${({ finsihed, percentage, disabled }) => { - if (finsihed) { + ${({ finished, percentage, disabled }) => { + if (finished) { if (percentage > 80) { return ` &.no > div:last-child { @@ -573,8 +574,8 @@ function renderVoteButtons({ min-width: ${({ percentage }) => percentage && percentage > 5 ? `${percentage}%` : "5px"}; - ${({ finsihed, wins }) => - finsihed && + ${({ finished, wins }) => + finished && wins && ` display: none; @@ -632,8 +633,6 @@ function renderVoteButtons({ abstain: statusName === "Failed" }; - const finsihed = statusName !== "In Progress"; - const voted = { yes: checkVotesForCongressDao("Approve"), no: checkVotesForCongressDao("Reject"), @@ -676,11 +675,11 @@ function renderVoteButtons({ handleVote("VoteApprove")} - disabled={alreadyVoted || finsihed || !isAllowedToVote[0]} + disabled={alreadyVoted || finished || !isAllowedToVote[0]} >
{wins.yes && ( @@ -698,11 +697,11 @@ function renderVoteButtons({ handleVote("VoteReject")} - disabled={alreadyVoted || finsihed || !isAllowedToVote[1]} + disabled={alreadyVoted || finished || !isAllowedToVote[1]} >
{wins.no && ( @@ -722,12 +721,12 @@ function renderVoteButtons({ handleVote("VoteAbstain")} disabled={ - alreadyVoted || finsihed || !isAllowedToVote[2] + alreadyVoted || finished || !isAllowedToVote[2] } >
@@ -744,7 +743,7 @@ function renderVoteButtons({ @@ -753,7 +752,7 @@ function renderVoteButtons({ ) } disabled={ - alreadyVoted || finsihed || !isAllowedToVote[2] + alreadyVoted || finished || !isAllowedToVote[2] } >
diff --git a/apps/astraplusplus/widget/DAO/index.jsx b/apps/astraplusplus/widget/DAO/index.jsx index 81e4bd2..ac2b198 100644 --- a/apps/astraplusplus/widget/DAO/index.jsx +++ b/apps/astraplusplus/widget/DAO/index.jsx @@ -77,15 +77,6 @@ const tabs = { dev: props.dev ?? false }) }, - projects: { - name: "Projects", - widget: "DAO.Projects", - href: constructURL({ - tab: "projects", - daoId: state.daoId, - dev: props.dev ?? false - }) - }, followers: { name: "Followers", widget: "DAO.Followers.index", @@ -117,7 +108,6 @@ const tabs = { if (isCongressDaoID || props.daoId === VotingBodyDaoId) { delete tabs["funds"]; - delete tabs["projects"]; delete tabs["bounties"]; delete tabs["settings"]; }