Skip to main content

Long-term refactors 🛠️

Since our codebase has been around for a while, we have occasionally needed to revisit the way we do things and break with existing patterns – in other words, refactor or restructure the codebase. These refactors can be large and take months or even years.

To help you understand existing inconsistencies within our codebase, we're trying to maintain the following list of ongoing large refactors.

Try to keep these changes in mind as you write new code, and aim to follow code patterns consistent with the desired final goal.

Of course, we should aim to keep the number of large, long-term refactors as low as possible.

List of ongoing, large refactors and redesigns

Hub (general)

  • Rename "collections" to "playlists" everywhere

Hub (frontend)

  • Adopt TypeScript and functional React components over plain JS and class components
  • Use styled-components for styling instead of statically built SCSS
  • Use React Query hooks for data fetching to replace FLUX state and actions
  • Use the Modal component instead of ModalActions
  • Untangle the folder structure of /frontend/admin/components (see the README for details)

Hub (UI/design)

  • Move away from table-centric page layout with a narrow sidebar in favour of the type of layout used on the nudges page
  • Make all admin pages mobile-friendly