feat(demo-admin-dashboard): Campaign draft snapshot support and restore confirmation#304
Open
Agbasimere wants to merge 3 commits into
Open
feat(demo-admin-dashboard): Campaign draft snapshot support and restore confirmation#304Agbasimere wants to merge 3 commits into
Agbasimere wants to merge 3 commits into
Conversation
…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.
Collaborator
|
Fix conflict |
cd4a7bb to
2565b4d
Compare
Author
|
@kryputh Resolved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Labels
demo-admin-dashboard,demo-data,CampaignCloses #277
Description
This PR implements Campaign Draft Snapshot Support for the Demo Admin Dashboard initiative (Campaign issue 26 of 50). It allows maintainers to save snapshots of the currently built draft dataset, list existing snapshots, inspect detailed metadata (target audience, timestamp, tags, draft list), and restore previous campaign draft states with a restore confirmation prompt.
Scope & Constraints
src/features/demo-admin-dashboard/.src/features/demo-admin-dashboard/were modified.src/features/demo-admin-dashboard/index.tsandsrc/features/demo-admin-dashboard/README.md.src/features/demo-admin-dashboard/DemoDashboard.tsxby declaring the missingDemoUserandDemoItemtypes intypes.ts.Deliverables & Key Changes
types/campaignSnapshot.tscontaining theCampaignSnapshotschema.fixtures/campaignSnapshotFixtures.tscontaining three public-safe, deterministic, and fake default campaign snapshots (Welcome Series, Security Onboarding, Monthly Newsletter).persistence/localStorageAdapter.tswith convenience get/save/clear helpers for the active draft dataset and campaign snapshots (falling back to preloaded defaults when empty).components/CampaignSnapshots.tsxrepresenting the new Campaigns dashboard section. It allows saving, viewing metadata, deleting, and restoring snapshots with a confirmation step detailing active vs target draft counts.datasetstate inDemoAdminDashboard.tsxto keep the Templates tab and Campaigns tab in sync.README.mdto resolve conflicts and document the new Campaign Snapshots feature.__tests__/campaignSnapshots.test.tsto test default fallback snapshots, custom saving, retrieval, deletion, and schema validations.__tests__/localStorageAdapter.test.tsto check storage adapter get/save operations.Testing Checklist
npx vitest run src/features/demo-admin-dashboard/__tests__/npx prettier --check src/features/demo-admin-dashboard/npm run build