Skip to content

Document the styling and component conventions in CONTRIBUTING.md #2259

Open

Description

@trillium

Trillium Firstmate 🤖

Overview

Write a short "UI components and styling" section so volunteers know where components go and how to style them while the migration is in progress. This is guidance only; nothing is enforced by scripts, hooks, or CI.

Dependencies

Action Items

  • Add a section "UI components and styling" to CONTRIBUTING.md (and add it to the table of contents) with the points below, kept to about one screen of text.
    • New UI is built with Tailwind classes and the shared components in client/src/components/ui/. Do not add new .scss files or new @mui/* imports.
    • Look in /design-system before writing a button, input, dialog, and so on. If a component is missing, build it in components/ui/ (see the folder README) and add it to the page in the same PR.
    • Folder layout: components/ui/ = shared primitives (no data fetching, no routing); components/layout/ = page frame and navigation pieces; feature folders (manageProjects/, user-admin/, ...) = screens built from primitives.
    • Use cn() for conditional classes and cva for variants. Use theme tokens (bg-primary, text-foreground-muted) rather than hex values.
    • Icons come from the one icon package chosen in Replace the MUI icons with one icon package #2261.
    • Tests: every new primitive and every migrated screen adds Vitest checks.
    • PRs that change how something looks include before/after screenshots at desktop and 390 px width (the PR template already has the sections).
    • Reviews check conventions by hand; there is no automatic rule that rejects raw HTML tags.
  • Add a short "MUI to Tailwind cheat sheet" table in the same section: Box -> div with classes, Typography -> Heading/Text, sx={{ mt: 2 }} -> mt-4 (MUI steps are 8 px, Tailwind steps are 4 px), Grid container -> grid/flex, theme.palette.primary.main -> text-primary/bg-primary.
  • Add a line in client/src/components/ui/README.md that points to the new section.

Acceptance Criteria

  • The new section is in CONTRIBUTING.md and linked from its table of contents.
  • It says clearly that there are no automatic checks, only review.
  • Every path named in the section exists in the repo (or in a draft ticket that is a dependency).
  • Markdown renders correctly on GitHub.

Resources/Instructions

  • Existing doc: CONTRIBUTING.md (Parts 1-5).
  • Decided in this epic: no raw-HTML enforcement scripts, git hooks, or CI job. Structure and conventions only.

Additional Notes

  • Wording is a proposal; keep it short so people read it.
  • If the team later wants automatic enforcement, that would be a separate epic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentationfeature: Design systemmilestone: missingrole: Front Endsize: 1pt

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions