Skip to content

feat(demo-admin-dashboard): Campaign status, tags, and audience display tokens#306

Open
Agbasimere wants to merge 4 commits into
Stellar-Mail:mainfrom
Agbasimere:campaign-issue-49-tokens
Open

feat(demo-admin-dashboard): Campaign status, tags, and audience display tokens#306
Agbasimere wants to merge 4 commits into
Stellar-Mail:mainfrom
Agbasimere:campaign-issue-49-tokens

Conversation

@Agbasimere

Copy link
Copy Markdown

Labels

demo-admin-dashboard, demo-data, Campaign

Closes #300

Description

This PR implements Campaign Display Tokens for the Demo Admin Dashboard initiative (Campaign issue 49 of 50). It establishes local display tokens mapping campaign statuses, tag categories, and target audiences to consistent Tailwind CSS color schemes, complete with code lookup helpers, form selection, dynamic badge rendering, and an interactive reference panel.

Scope & Constraints

  • All changes are strictly confined to src/features/demo-admin-dashboard/.
  • No files outside src/features/demo-admin-dashboard/ were modified.

Deliverables & Key Changes

  1. Tokens Definition: Created constants/displayTokens.ts mapping status values (active, draft, needs-review, archived), tags, and audience fields to styling tokens.
  2. Schema & Fixtures: Added optional status to the CampaignSnapshot type and updated preloaded fixtures to leverage status codings.
  3. UI Enhancements: Integrated styled badges on snapshot cards, added a status select input on the snapshot form, and created a collapsible documentation drawer displaying badge examples.
  4. Documentation: Updated README.md to document the campaign display tokens styling rules.
  5. Tests: Added unit tests in __tests__/displayTokens.test.ts to verify lookup behavior, case insensitivity, and defaults. All 42 folder tests pass.

Testing Checklist

  • Unit tests pass: npx vitest run src/features/demo-admin-dashboard/__tests__/
  • Codebase formatting matches Prettier: npx prettier --check src/features/demo-admin-dashboard/
  • ESLint returns zero errors/warnings: npx eslint src/features/demo-admin-dashboard/
  • Compilation completes without issues: npm run build

…onfirmation support

Confined changes entirely under src/features/demo-admin-dashboard/. Added CampaignSnapshots UI component, fixtures, storage persistence helpers, and automated unit tests. Resolved pre-existing merge conflict markers.
…erence docs

Defined folder-local display tokens for campaign status, tag colors, and target audience badges. Integrated styled badges in snapshots view, added dropdown status select on form, and implemented interactive documentation panel. Added unit tests.
@kryputh

kryputh commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Fix conflict

@Agbasimere Agbasimere force-pushed the campaign-issue-49-tokens branch from 92be360 to 164bbaf Compare June 17, 2026 00:36
@Agbasimere

Copy link
Copy Markdown
Author

@kryputh Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add campaign visual preview tokens

2 participants