Files
co-lite/openspec/changes/add-visual-foundation/specs/admin-visual-design/spec.md
T

3.0 KiB

ADDED Requirements

Requirement: Admin Colours Come From Theme Tokens

The admin portal SHALL take every colour from the theme tokens. A component MUST NOT use a fixed palette colour, except a modal scrim, a print-only sheet, a QR code's quiet zone, or a frame showing email HTML.

Scenario: A component uses a palette colour

  • WHEN a component's classes include a fixed palette colour that is not on the exception list
  • THEN the portal's checks fail

Requirement: One Accent Colour

The admin portal SHALL use slate neutrals for text, surfaces and borders, and one blue accent for primary actions, links, focus rings and the active navigation item. Status colours (success, warning, danger) SHALL appear only where they carry meaning.

Scenario: Primary action

  • WHEN a page shows a primary button
  • THEN the button uses the accent colour and the other buttons on the page do not

Scenario: Active navigation item

  • WHEN an admin is on the Events page
  • THEN the Events item in the sidebar is marked in the accent colour and no other item is

Requirement: One Type Family

The admin portal SHALL set all text, headings included, in one sans-serif family, with tabular figures for numbers in tables and counts.

Scenario: Fonts loaded

  • WHEN any admin page loads
  • THEN only the one family's font file is loaded

Requirement: Light Default With A Dark Theme

The admin portal SHALL show the light theme by default and SHALL offer a dark theme derived from the same neutrals and accent.

Scenario: First visit

  • WHEN an admin opens the portal with no theme preference saved
  • THEN the light theme is shown

Scenario: Dark theme chosen

  • WHEN an admin switches to the dark theme
  • THEN every page uses the dark tokens and text keeps at least 4.5:1 contrast

Requirement: Product Wordmark

The admin portal SHALL show the product name "Co-Lite" as solid text beside a small mark, and SHALL keep "Powered by Containerverse Sdn. Bhd." in the footer.

Scenario: Sidebar header

  • WHEN an admin page loads
  • THEN the sidebar shows the mark and the text "Co-Lite" in a solid colour, not gradient-filled text

Requirement: Styled Dropdown Menus

Every dropdown in the admin portal SHALL open a styled option menu that matches the portal's theme, and SHALL stay usable by keyboard and screen reader.

Scenario: Company picker

  • WHEN a super admin opens the company picker in the header
  • THEN a styled menu lists "All companies" and each company code, and choosing one scopes the pages to that company

Scenario: Form dropdown

  • WHEN an admin opens the salesperson, temperature or status dropdown on an event lead
  • THEN a styled menu opens, and the chosen value is saved with the form as before

Scenario: Keyboard use

  • WHEN an admin focuses a dropdown and presses Enter or Space, then the arrow keys and Enter
  • THEN the menu opens, moves between options, and chooses one