Skip to content

Add "Try with demo data" onboarding button to admin dashboard#9

Open
datengraben wants to merge 1 commit into
masterfrom
claude/add-demo-data-button-gRwTp
Open

Add "Try with demo data" onboarding button to admin dashboard#9
datengraben wants to merge 1 commit into
masterfrom
claude/add-demo-data-button-gRwTp

Conversation

@datengraben

Copy link
Copy Markdown
Owner

Adds a DemoData service that creates a demo location, item, bookable
timeframe, 3 confirmed bookings (2 past + 1 future), and a private
page with [cb_bookings] shortcode in one click.

The banner button appears on the dashboard only when no CB custom post
type data exists and the install is within the 7-day onboarding window;
it disappears permanently once demo data is created or the window closes.

  • src/Service/DemoData.php — new service (create, shouldShowButton, AJAX handler)
  • tests/php/Service/DemoDataTest.php — 15 red/green PHPUnit tests
  • src/Plugin.php — record install date on activation + admin_init fallback
  • includes/Public.php — register wp_ajax_cb_create_demo_data
  • includes/Admin.php — wp_localize_script + inline JS for button
  • templates/dashboard-index.php — conditional demo-data banner

https://claude.ai/code/session_01QvGeLKxbtPAEZm4SbdkwNm

Adds a DemoData service that creates a demo location, item, bookable
timeframe, 3 confirmed bookings (2 past + 1 future), and a private
page with [cb_bookings] shortcode in one click.

The banner button appears on the dashboard only when no CB custom post
type data exists and the install is within the 7-day onboarding window;
it disappears permanently once demo data is created or the window closes.

- src/Service/DemoData.php         — new service (create, shouldShowButton, AJAX handler)
- tests/php/Service/DemoDataTest.php — 15 red/green PHPUnit tests
- src/Plugin.php                   — record install date on activation + admin_init fallback
- includes/Public.php              — register wp_ajax_cb_create_demo_data
- includes/Admin.php               — wp_localize_script + inline JS for button
- templates/dashboard-index.php   — conditional demo-data banner

https://claude.ai/code/session_01QvGeLKxbtPAEZm4SbdkwNm
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.

2 participants