Skip to content

Instantly share code, notes, and snippets.

@nperez0111
Created September 6, 2018 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nperez0111/96d140e0129d08c008f489dd9d7576fb to your computer and use it in GitHub Desktop.
Save nperez0111/96d140e0129d08c008f489dd9d7576fb to your computer and use it in GitHub Desktop.
Proposed Refactor for Budgetwise.io

components/dialogs/ (folder)

Split out all dialog components into this folder and remove prefix dialog-. Add dropzone-modal, settings-modal, new-account-modal, settings-currency-date -> settings-modal

components/settings-modal.js

Current implementation is pretty much just to output some layout with no functionality.

  • Move UI code to containers/settings-form-container
  • Delete components/settings-modal.js

components/budget/ (folder)

All relevant budget table view items

table.js

Duties

  • Adding Categories
  • Toggle all expanded
  • Switching months to display
  • Toggle multi-month view

Renders

  • all the buttons described above
  • table-header.js
  • category.js

table-header.js

Duties

  • Editing of budget name

Renders

  • budget category header details

category.js

Duties

  • Saving any change to budgeting items
  • Addition of subcategories

Renders

  • budget category details
  • subcategory.js

subcategory.js

Duties

  • Saving any change to budgeting items

Renders

  • budget subcategory details

components/pages/

Stores any top level page components

  • verif-email
  • recover-password
  • reset-password
  • signup-form
  • budget
  • not-found
  • summary-view -> summary
  • account

components/layout/

  • sidebar
  • header
  • navbar
  • content-area

components/checkout & components/checkout-lifetime

Should be coalesced into just components/checkout with a prop on the type they are checking out.

components/alpha-notice & components/alpha-notification

Should be coalesced into just alpha-notice with a prop changing the className if it's a notification.

components/transaction

Doesn't seem to be used anywhere was this replaced by transaction-list? Then we ought to remove it.

containers/

  • remove -container or -connector from the end of each file name as it's only adding noise
  • rename containers/ to connectors/ as that's pretty much what they are
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment