Skip to content

Dashboard maintenance refactor#1585

Merged
mariahosfeld merged 11 commits into
developfrom
feature/dashboard-maintenance-refactor
Nov 2, 2022
Merged

Dashboard maintenance refactor#1585
mariahosfeld merged 11 commits into
developfrom
feature/dashboard-maintenance-refactor

Conversation

@mohitb35

@mohitb35 mohitb35 commented Oct 7, 2022

Copy link
Copy Markdown
Member

Refactors recently introduced features in the dashboard to remove code duplication / create reusable components / clean up code where possible. These features include

  1. Bulk Codes
  2. Create Donation Link
  3. My PlanetCash
  4. Manage Payouts
  5. Complete Signup Form

Changes

  • refactors bulk codes to use common TabbedView
  • removes duplicate InlineFormDisplayGroup definitions (or similar elements)
  • refactors bulk codes, donation link to use common StyledForm
  • refactors multiple dashboard features to reuse CenteredContainer where possible
  • refactors PlanetCash / ManagePayouts to use common FormHeader
  • rearranges folder structure to separate certain components e.g. SingleColumnView
  • use scope = 'map' while fetching project list for donation link form, as API is lighter
  • add documentation to indicate function of common layout components

Fixes #1580

- update BulkCodeSteps to string values
- set up tabConfig and enable/disable conditions
- use common CenteredContainer
- allow BulkCodesForm to occupy full container width
@vercel

vercel Bot commented Oct 7, 2022

Copy link
Copy Markdown

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

Name Status Preview Updated
planet-webapp ✅ Ready (Inspect) Visit Preview Oct 31, 2022 at 0:41AM (UTC)

@pr-triage pr-triage Bot added the PR: draft label Oct 7, 2022
- along with 77126b5
- uses a common InlineFormDisplayGroup where needed
- fix alignment in groups not containing only text fields with type prop
- update min text field width to 180px
- BulkCodes
- ManagePayouts
- PlanetCash
- DonationLinkForm

- also refactor DonationLinkForm to remove formButtonContainer
- remove unused BulkCodesForm component and formButtonContainer class
- in SingleColumnView, Bulk Codes, Manage Payouts - NoBankAccount, PlanetCash - NoPlanetCashAccount
- wraps header content placed above a `<form>` within a common container
- remove unrequired `formTitle` styles from `StyledForm`
- reason > lighter API call
- also update types/interfaces
a. rename `APISingleProject` > `MapSingleProject` to reflect API resp.
b. use `MapSingleProject` instead of `SingleProject` in DonationLinkForm
c. remove unused APISingleProject/SingleProject interfaces
d. move `MapSingleProject` to project type file
@mariahosfeld mariahosfeld merged commit b1152ce into develop Nov 2, 2022
@mariahosfeld mariahosfeld deleted the feature/dashboard-maintenance-refactor branch November 2, 2022 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage Payouts Potential Refactors (from #1552)

3 participants