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

ProposalInfoCard Component Refactor #857

Closed
11 tasks
rossneilson opened this issue May 10, 2022 · 0 comments · Fixed by DXgovernance/DAVI#38
Closed
11 tasks

ProposalInfoCard Component Refactor #857

rossneilson opened this issue May 10, 2022 · 0 comments · Fixed by DXgovernance/DAVI#38
Assignees
Labels
Enhancement New feature or request Refactor Work to refactor and improve code
Milestone

Comments

@rossneilson
Copy link
Collaborator

Following our refactor sessions everyone should have some idea of what we are doing in this initial refactor with the aim of splitting logic and styles for reuse in dxvote and guilds, improving code quality, testing and documentation.
The following definition of done should be used as a guide as you work through each task.
If there is anything you are unsure about or want to work collaboratively on then reach out in the chat and we can have more mobbing sessions.

Definition of done

  • Move components into new structure (wrappers folder)
  • Split up into multiple components in same file
  • Add new components to their own component folder
  • Define types in types/common for Components
  • Completely remove styles from wrappers and logic from components
  • Ensure absolute imports
  • Add i18n
  • Use the new wrapper as an import to replace old-components and test it works as expected and the same as current v1.1-beta branch
  • Unit test
    For unit testing since we are aiming for no business logic inside the components we should be fine to do simple snapshot tests like in this PR. If you need to mock data fetching then probably you need to split things up more. For the wrappers we are also aiming not to need to test these as the bulk of logic should be in hooks which are also tested (I believe we have some examples of this coming soon)
  • Storybook
  • Remove old-components folders
@rossneilson rossneilson added Enhancement New feature or request Refactor Work to refactor and improve code labels May 10, 2022
@rossneilson rossneilson added this to the v1.1-3 milestone May 10, 2022
@rossneilson rossneilson modified the milestones: v1.1-3, v1.1-4 May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Refactor Work to refactor and improve code
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants