-
Notifications
You must be signed in to change notification settings - Fork 7
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
Refactoring on top of #2646 #2683
Merged
mudrila
merged 14 commits into
feature/#2533-example-proposal-templates
from
feature/#2533-example-proposal-templates-composition
Jan 22, 2025
Merged
Refactoring on top of #2646 #2683
mudrila
merged 14 commits into
feature/#2533-example-proposal-templates
from
feature/#2533-example-proposal-templates-composition
Jan 22, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… user experience - Updated ProposalBuilder to utilize new ProposalDetails, StreamsDetails, and TemplateDetails components for better separation of concerns. - Simplified Formik props by removing unnecessary types and streamlining the prepareProposalData function. - Enhanced StepButtons to accept metadata and transactions step buttons as props, improving flexibility in navigation. - Added detailed rendering for transactions and streams in ProposalDetails, improving clarity for users. - Introduced trimmed title handling and improved button states based on form validation. These changes aim to create a more maintainable and user-friendly proposal creation process.
adamgall
changed the title
Refactoring on top of https://github.com/decentdao/decent-interface/pull/2646
Refactoring on top of #2646
Jan 21, 2025
…lMode' for improved clarity - Updated ProposalBuilder, ProposalTransaction, ProposalTransactions, and ProposalTransactionsForm components to use 'isProposalMode' instead of 'mode' for better readability and understanding of the component's state. - Removed unnecessary imports related to ProposalBuilderMode, streamlining the codebase. - Enhanced prop handling in ProposalTransactions and ProposalTransaction components to reflect the new naming convention. These changes aim to improve code maintainability and enhance the developer experience when working with the ProposalBuilder components.
Deploying decent-interface with Cloudflare Pages
|
- Introduced a new component, ShowNonceInputOnMultisig, to conditionally render a nonce input field based on governance settings. - Updated ProposalBuilder and related pages to utilize the new contentRoute prop for rendering transaction forms and nonce input, improving modularity. - Refactored multiple proposal creation pages to integrate nonce handling, ensuring a consistent user experience across different proposal types. - Streamlined imports and improved code organization for better maintainability. These changes aim to enhance the user experience when creating proposals, particularly for multisig governance scenarios.
adamgall
force-pushed
the
feature/#2533-example-proposal-templates-composition
branch
from
January 22, 2025 05:17
fa4191f
to
fc80505
Compare
…2533-example-proposal-templates-composition
- Added `prevStepUrl` and `nextStepUrl` props to the ProposalBuilder component to facilitate navigation between proposal steps. - Refactored multiple proposal creation pages to compute these URLs dynamically using the current location, improving user experience and consistency across different proposal types. - Updated imports to include `useLocation` for better URL management. These changes aim to streamline the proposal creation process and enhance navigation for users.
…ality and navigation - Introduced new props for `pageHeaderTitle`, `pageHeaderBreadcrumbs`, and `pageHeaderButtonClickHandler` in the ProposalBuilder component to improve header customization across different proposal creation pages. - Updated multiple proposal creation pages to utilize the new header props, ensuring a consistent user experience and better navigation. - Streamlined imports and improved code organization for maintainability. These changes aim to enhance the user experience when creating proposals by providing clearer navigation and context within the application.
…e Clarity - Simplified the import structure in `constants.ts` by removing unused imports related to `ProposalBuilderMode`. - Introduced `ProposalMetadataTypeProps` interface and default props functions in `ProposalMetadata.tsx` to standardize metadata handling across proposal types. - Updated `ProposalBuilder` component to accept `proposalMetadataTypeProps`, enhancing flexibility in rendering metadata. - Refactored multiple proposal creation pages to utilize the new metadata props, ensuring consistent user experience and improved maintainability. - Streamlined the `ProposalMetadata` component to use the new props for labels and helpers, enhancing clarity and reducing conditional logic. These changes aim to improve the organization and readability of the code while providing a more consistent approach to handling proposal metadata.
…ns Experience - Removed unused imports and components from the ProposalBuilder, streamlining the code. - Introduced a new `ActionsExperience` component to encapsulate action handling logic, improving modularity and readability. - Updated the `SafeProposalWithActionsCreatePage` to utilize the new `ActionsExperience` component, enhancing the user interface for action management. - Set `actionsExperience` prop to `null` in other proposal creation pages to maintain consistency where actions are not applicable. These changes aim to improve the organization and clarity of the proposal creation process, particularly in managing proposal actions.
…tep Button Handling - Removed the `nextStepUrl` prop from the ProposalBuilder component to streamline button management. - Introduced a `metadataStepButtons` function in multiple proposal creation pages to encapsulate button rendering logic, enhancing modularity. - Updated the `SafeCreateProposalTemplatePage`, `SafeProposalWithActionsCreatePage`, `SafeProposalCreatePage`, and `SafeSablierProposalCreatePage` to utilize the new button handling approach, ensuring consistency across different proposal types. - Cleaned up imports and improved code organization for better maintainability. These changes aim to enhance the clarity and consistency of step button handling in the proposal creation process.
- Removed the `ProposalBuilderMode` enum and associated logic to simplify the component structure. - Updated `ProposalBuilder` and related pages to accept new props for `transactionsDetails`, `templateDetails`, and `streamsDetails`, allowing for more dynamic rendering of proposal details. - Cleaned up imports and improved code organization across multiple proposal creation pages, enhancing maintainability. - Streamlined the handling of transactions, templates, and streams in the proposal creation process, ensuring a more consistent user experience. These changes aim to improve the modularity and clarity of the proposal creation components, facilitating easier future enhancements.
…Handling - Updated the `metadataStepButtons` function in multiple proposal creation pages to accept an object with `formErrors` and `createProposalBlocked` parameters, enhancing clarity and consistency in button state management. - Refactored the `ProposalBuilder` component to align with the new metadata handling approach, ensuring a more modular and maintainable code structure. - Improved the user experience by ensuring that button states are derived from clear and standardized props across different proposal types. These changes aim to enhance the organization and readability of the proposal creation process, particularly in managing step button states.
- Updated the `metadataStepButtons` function in multiple proposal creation pages to a unified `stepButtons` function, enhancing clarity and consistency in button state management. - Refactored the `ProposalBuilder` component to align with the new step button handling approach, ensuring a more modular and maintainable code structure. - Improved the user experience by ensuring that button states are derived from clear and standardized props across different proposal types. These changes aim to enhance the organization and readability of the proposal creation process, particularly in managing step button states.
…eation Pages - Removed the ProposalBuilder component from its original location, streamlining the import paths across multiple proposal creation pages. - Updated the import statements in SafeCreateProposalTemplatePage, SafeProposalWithActionsCreatePage, SafeProposalCreatePage, and SafeSablierProposalCreatePage to reflect the new structure. - Enhanced code organization and maintainability by consolidating related components under a single directory. These changes aim to improve the modularity and clarity of the proposal creation process, facilitating easier future enhancements.
mudrila
approved these changes
Jan 22, 2025
…or Enhanced Flexibility - Updated the ProposalBuilder and ProposalDetails components to replace JSX.Element with React.ReactNode for props related to rendering transactions, templates, and streams. - This change improves the flexibility of the components, allowing for a wider range of renderable content types. - Adjusted the StepButtons component to align with the new prop types, ensuring consistency across the proposal creation process. These modifications aim to enhance the modularity and adaptability of the proposal components, facilitating easier future enhancements.
adamgall
force-pushed
the
feature/#2533-example-proposal-templates-composition
branch
from
January 22, 2025 20:38
616dd21
to
f637b6a
Compare
mudrila
merged commit Jan 22, 2025
b63e4a7
into
feature/#2533-example-proposal-templates
4 checks passed
mudrila
deleted the
feature/#2533-example-proposal-templates-composition
branch
January 22, 2025 20:45
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@mudrila i took at shot at starting to shuffle some code around in the way that I was envisioning (see this thread). Check it out and let me know your thoughts. I like it because it completely removes the
mode
checks inside some of the "leaf UI" component files, and keeps them in more of the "control flow" component files. (edit: now they're all gone all the way throughout the tree)More than anything with this PR I just wanted to take a shot at slightly different component composition patterns. None of this is essential for your base PR, but I do like the the patterns and direction this PR is going in.
edit:
I got rid of the
ProposalBuilderMode
enum.