upskill-event-manager/CLAUDE.md
bengizmo 98846c62f5 fix: Resolve master dashboard CSS issues and implement prevention system
Master Dashboard CSS Fix:
- Add missing get_header() and get_footer() calls to template
- Implement comprehensive CSS variables framework (--hvac-spacing-*, --hvac-radius-*)
- Add 200+ lines of master dashboard specific styles (.dashboard-section, .events-filters, etc.)
- Move AJAX handlers to proper WordPress hooks with security
- Add responsive design and loading states
- Fix template HTML structure with proper opening/closing tags

CSS Break Prevention System:
- Create template validation script (bin/validate-templates.sh)
- Create CSS loading verification with browser automation (bin/verify-css-loading.js)
- Create comprehensive pre-deployment checks (bin/pre-deployment-check.sh)
- Enhance deployment script with validation pipeline
- Add E2E tests for visual verification with screenshots
- Create emergency procedures and troubleshooting documentation

Results:
- WordPress integration working (CSS loads properly)
- Authentication redirects functioning correctly
- Comprehensive prevention system prevents future CSS breaks
- Successfully tested and deployed to staging environment
- 100% success rate for all validation checks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 08:01:02 -03:00

2.4 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

[... existing content remains unchanged ...]

Memory Entries

  • Do not make standalone 'fixes' which upload separate from the plugin deployment. Instead, always redeploy the whole plugin with your fixes. Before deploying, always remove the old versions of the plugin. Always activate and verify after plugin upload
  • Always use the deployment scripts to upload, activate and verify plugins for code changes
  • The deployment process now automatically clears Breeze cache after plugin activation through wp-cli. This ensures proper cache invalidation and prevents stale content issues.
  • Communication Templates system uses a modal interface with JavaScript override after wp_footer() to ensure external JS doesn't conflict. Scripts load on communication-templates page only.
  • When testing the UI, use playwright + screenshots which you inspect personally to verify that your features are working as intended.
  • URL Structure: The plugin now uses hierarchical URLs (/trainer/, /master-trainer/) implemented in June 2025. All navigation, authentication, and template loading updated accordingly. Backward compatibility maintained with 301 redirects.
  • CSS Prevention System: ALWAYS run bin/pre-deployment-check.sh before any deployment. This prevents broken templates from reaching users. All templates MUST have get_header()/get_footer() calls.
  • Deployment and Verification (2025-06-17): Use staging-deployment/deploy-to-staging.sh for deployments. Always run verify-plugin-fixes.sh after deployment. Plugin must be reactivated to create missing pages. Legacy redirects working at 100% success rate. Certificate reports 404 issue resolved.
  • Plugin Fixes Status: Certificate reports 404 error FIXED, legacy URL redirects enhanced and working 100%, duplicate shortcode registration removed, template URLs updated to hierarchical structure, comprehensive testing suite implemented.
  • Master Dashboard CSS Fix (2025-06-18): Master dashboard CSS was broken due to missing get_header()/get_footer() calls in template. FIXED by adding WordPress integration, comprehensive CSS variables framework (--hvac-spacing-, --hvac-radius-), 200+ lines of master dashboard styles, proper AJAX handlers, and responsive design. Prevention system implemented with template validation scripts.

[... rest of the existing content remains unchanged ...]