FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects

Refactor components to a simpler styling method

Merged Joe Adams requested to merge 44-simplify-styling-approach into master

All components no longer 'appear' as a Material-UI component (removed custom Ucam classes and material typescript module augmentation). This removes a lot boilerplate involved in creating new components, and also removes the ability for consumers of our design system to deeply customise all aspects of the component. We've decided that we don't want this level of customisation as our design system should provide constraints that enforce our design language.

All styling for our components now uses the experimentalStyled api provided by material, which is actually a light abstraction over Emotion. The theme file should now only be used to override styles of Material-UI components, and not our own custom ones.

I've included a small contributing doc that gives an example of which styling approach to choose.

Acceptance:

  • All components should function exactly as before
  • Components should no longer be able to be styled from the theme styleOverrides pattern
  • Contributing doc should make sense

Closes #44 (closed) #45 (closed)

Edited by Joe Adams

Merge request reports

Pipeline #78095 passed with warnings

Pipeline passed with warnings for d02b39a4 on 44-simplify-styling-approach

Merged by Richard PeachRichard Peach 3 years ago (Apr 27, 2021 3:29pm UTC)

Loading

Pipeline #78157 passed with warnings

Pipeline passed with warnings for a77eb5d7 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading