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

Hide completed proposals #455

Merged
merged 5 commits into from
Oct 9, 2024
Merged

Hide completed proposals #455

merged 5 commits into from
Oct 9, 2024

Conversation

Corantin
Copy link
Contributor

@Corantin Corantin commented Oct 5, 2024

This pull request includes several changes focused on improving the handling of proposal identifiers and refactoring the ProposalCard and Proposals components to enhance code readability and maintainability. Key changes include renaming proposalId to proposalNumber, updating the state management for proposals, and modifying the inputHandler function.

Identifier Renaming:

ProposalCard Component Updates:

  • apps/web/components/ProposalCard.tsx: Modified ProposalCardProps to make inputData optional and changed the inputHandler function to use proposalId instead of an index. [1] [2] [3]
  • Removed unnecessary index prop and adjusted related logic.

Proposals Component Refactor:

  • apps/web/components/Proposals.tsx: Refactored state management to use objects keyed by proposalId instead of arrays. Updated inputHandler and related functions to reflect this change. [1] [2] [3]
  • Simplified the rendering logic for proposals and ended proposals. [1] [2]

Configuration Updates:

- Added a new entry to the .gitignore file to exclude the .graphclientrc.yml configuration from version control.
- Updated the GraphQL endpoint version in the configuration.
- Add a new template configuration file for GraphQL client settings.
- The changes update the GraphQL endpoint configuration for the subgraph client.
- Updated the build-client script to generate a graphclient configuration file before building.
…gement

- Renamed the property from `proposalId` to `proposalNumber` in the component for clarity.
- Renamed the `proposalId` property to `proposalNumber` and updated its references throughout the component.
- Added support for managing proposal statuses and modified input handling in the ProposalCard component.
- Refactor the Proposals component for improved state management and clarity, enhancing the handling of proposal data and simplifying the input structure.
@Corantin Corantin requested a review from Mati0x October 5, 2024 00:28
Copy link

vercel bot commented Oct 5, 2024

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

Name Status Preview Comments Updated (UTC)
gardens-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 8:35pm

@Corantin
Copy link
Contributor Author

Corantin commented Oct 5, 2024

!ai

- Removed conditions for displaying support information in the ProposalCard component.
- Removed the import of ProposalStatus in ProposalCard.tsx.
- Refactor the proposals component to filter and display ended proposals more efficiently.
Copy link
Contributor

@Mati0x Mati0x left a comment

Choose a reason for hiding this comment

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

works really good!
try supporting, executing and cancelling and everything works as expected

@1Hive 1Hive deleted a comment from github-actions bot Oct 9, 2024
@1Hive 1Hive deleted a comment from github-actions bot Oct 9, 2024
@Corantin Corantin merged commit 7c73293 into dev Oct 9, 2024
3 checks passed
@Corantin Corantin deleted the hide-completed-proposals branch October 9, 2024 20:35
@Corantin Corantin linked an issue Oct 9, 2024 that may be closed by this pull request
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.

Dont show ended proposals in the list
2 participants