Files
co-lite/openspec/specs/admin-visual-design/spec.md
ngqileandClaude Opus 5.5 2c6a4dc8ce docs: archive whatsapp-inbox, zh-cn-messages, messages-colite-filter and landing-pages
The owner deferred the WhatsApp e2e (add-whatsapp-inbox task 6.3) until the
business account can be linked; the task stays open with a note. Specs are
synced and the new capabilities have their Purpose written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
2026-12-02 16:58:47 +08:00

7.9 KiB

admin-visual-design Specification

Purpose

Keep the admin portal's look consistent and accessible: colours from theme tokens only, slate neutrals with one blue accent, one type family, a light default with a dark theme, the Co-Lite wordmark, and styled dropdown menus.

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

Requirement: Visitor Page Look

The public visitor pages (registration, invitation and check-in) SHALL show their content in one card on the page ground. The card SHALL be headed by the company name as a small label, the event name as the main heading, and the event dates and location. The pages SHALL use only the portal's theme tokens and SHALL NOT show a per-company logo or colour. The privacy notice SHALL be shown in full in English and Bahasa Malaysia as smaller, muted text that keeps at least 4.5:1 contrast.

Scenario: Visitor opens a registration code

  • WHEN a visitor opens the registration page of an INS event
  • THEN the card shows "INS" as a label above the event name, then the event dates and location
  • AND the full privacy notice appears in both languages above the consent box

Scenario: Visitor needs a contact

  • WHEN a visitor sees the mobile field on the registration form
  • THEN a hint under it says that a mobile number or an email is required

Scenario: Visitor reaches an end state

  • WHEN a visitor's registration is accepted, or the code is inactive, or check-in has not opened yet
  • THEN the same card shows an icon and a heading for that state

Requirement: Header Trail Without Repeats

The admin header SHALL NOT repeat the page title. On a page reached directly from the sidebar it SHALL show no trail. On a page below one, it SHALL show the parent page as a link back.

Scenario: Top-level page

  • WHEN an admin opens the Events list
  • THEN the header shows no trail text

Scenario: Sub-page

  • WHEN an admin opens the new event page
  • THEN the header shows "Events" as a link to the Events list

Requirement: Table Scroll Cue

A table wider than its container SHALL show a fade on each edge where more columns can be scrolled into view. The fade SHALL disappear at that end of the scroll. Where a data table pins its first column, the pinned column covers the left fade and SHALL instead show a divider on its right edge.

Scenario: Users list on a phone

  • WHEN an admin opens the Users list at 360 px wide
  • THEN a fade shows on the right edge of the table
  • AND after scrolling to the last column the right fade is gone
  • AND the pinned username column shows a divider on its right edge

Requirement: Sidebar Sections

The sidebar SHALL show Dashboard first, then the labelled sections Events, Leads, Access and System, each with a fixed set and order of pages. A page not in any section SHALL appear in a final section without a label. A section SHALL be marked by a divider and a small muted label, with only the divider in the collapsed rail, and SHALL NOT show when it has no page the user may open. Every page SHALL have a distinct icon.

Scenario: WhatsApp inbox in the Leads section

  • WHEN a user with BO_WHATSAPP and two unread conversations opens the portal
  • THEN the Leads section lists Leads, WhatsApp and Interests, with a badge showing 2

Scenario: Super admin sidebar

  • WHEN a super admin opens the portal
  • THEN the sidebar shows Dashboard, then "Events" with Events, Event leads and Pages, "Leads" with Leads, WhatsApp and Interests, "Access" with Users, Roles and Login security, and "System" with Companies, Emails, Audit log, Translations and Languages

Scenario: Staff without admin pages

  • WHEN a staff user who can open only Events and Event leads opens the portal
  • THEN the sidebar shows only the "Events" section
  • AND no "Leads", "Access" or "System" label

Scenario: Unknown page

  • WHEN the server menu has a page that is not in the category map
  • THEN it is listed after the System section, without a label

Scenario: Collapsed rail

  • WHEN an admin collapses the sidebar to the icon rail
  • THEN the sections are separated by dividers and no section label shows

Requirement: Phone Cards For Listings

Every listing built on the shared data table SHALL show one card per row below the md width instead of a table, with the row's first column as the card title, the other columns as labelled values, and the row actions at the bottom of the card. Sorting and paging SHALL stay available. A page with its own phone cards SHALL keep them.

Scenario: Users on a phone

  • WHEN a super admin opens Users at 360 px
  • THEN each user is a card with the name as title and labelled username, company, roles and status
  • AND the page does not scroll sideways

Scenario: Actions on a card

  • WHEN a user opens Events at 360 px
  • THEN each event card has the row's actions at its bottom

Scenario: Wide screen unchanged

  • WHEN a user opens Users at 1280 px
  • THEN the listing is the table, as before