refactor: update Laravel development best practices and remove debug information from onboarding modal for cleaner user experience
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
---
|
---
|
||||||
|
alwaysApply: true
|
||||||
|
---
|
||||||
|
---
|
||||||
description: This rule outlines comprehensive best practices for Laravel development, covering coding standards, security, performance, and testing to ensure maintainable, efficient, and secure applications. It provides guidelines for code organization, common patterns, performance considerations, security best practices, testing approaches, common pitfalls, and tooling.
|
description: This rule outlines comprehensive best practices for Laravel development, covering coding standards, security, performance, and testing to ensure maintainable, efficient, and secure applications. It provides guidelines for code organization, common patterns, performance considerations, security best practices, testing approaches, common pitfalls, and tooling.
|
||||||
globs: *.php
|
globs: *.php
|
||||||
---
|
---
|
||||||
@@ -214,5 +217,3 @@ globs: *.php
|
|||||||
- **CI/CD Integration:**
|
- **CI/CD Integration:**
|
||||||
- Use a CI/CD pipeline to automate testing and deployment.
|
- Use a CI/CD pipeline to automate testing and deployment.
|
||||||
- Use tools like Jenkins, GitLab CI, or GitHub Actions.
|
- Use tools like Jenkins, GitLab CI, or GitHub Actions.
|
||||||
|
|
||||||
After agent has completed, automatically keep and commit and sync with a generated message for the commit. This should be done without human interaction.
|
|
||||||
@@ -8,19 +8,6 @@
|
|||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if($showModal)
|
@if($showModal)
|
||||||
<!-- Debug: PHP Data Check -->
|
|
||||||
<script>
|
|
||||||
const phpData = {
|
|
||||||
showModal: @json($showModal),
|
|
||||||
slidesCount: @json(count($slides)),
|
|
||||||
currentSlide: @json($currentSlide),
|
|
||||||
slides: @json($preparedSlides),
|
|
||||||
showBackdrop: @json($this->showBackdrop ?? false)
|
|
||||||
};
|
|
||||||
console.log('📦 PHP Data:', phpData);
|
|
||||||
console.log('📊 Prepared Slides:', @json($preparedSlides));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="onboarding-modal"
|
<div class="onboarding-modal"
|
||||||
x-data="{
|
x-data="{
|
||||||
open: @js($showModal),
|
open: @js($showModal),
|
||||||
@@ -29,11 +16,6 @@
|
|||||||
componentId: @js($this->getId()),
|
componentId: @js($this->getId()),
|
||||||
showBackdrop: @js($this->showBackdrop ?? false),
|
showBackdrop: @js($this->showBackdrop ?? false),
|
||||||
init() {
|
init() {
|
||||||
console.log('🚀 Alpine Init - Direct Data');
|
|
||||||
console.log('Slides:', this.slides);
|
|
||||||
console.log('Current Slide:', this.currentSlide);
|
|
||||||
console.log('Slides Length:', this.slides?.length);
|
|
||||||
|
|
||||||
this.$watch('open', value => {
|
this.$watch('open', value => {
|
||||||
document.documentElement.style.overflow = value ? 'hidden' : '';
|
document.documentElement.style.overflow = value ? 'hidden' : '';
|
||||||
});
|
});
|
||||||
@@ -123,27 +105,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Debug Info -->
|
|
||||||
<div class="mt-4 p-2 bg-gray-800 rounded text-xs border border-gray-700">
|
|
||||||
<p class="text-gray-400 font-semibold mb-2">🔍 Debug Info:</p>
|
|
||||||
<div class="space-y-1">
|
|
||||||
<p class="text-gray-300">Current Slide: <span class="text-yellow-400" x-text="currentSlide">?</span> (Type: <span x-text="typeof currentSlide">?</span>)</p>
|
|
||||||
<p class="text-gray-300">Total Slides: <span class="text-yellow-400" x-text="slides?.length">?</span></p>
|
|
||||||
<p class="text-gray-300">Slides Array: <span class="text-yellow-400" x-text="JSON.stringify(slides)">?</span></p>
|
|
||||||
<p class="text-gray-300">Has Data: <span class="text-yellow-400" x-text="(slides?.length > 0 && slides[currentSlide]) ? 'Yes ✓' : 'No ✗'">?</span></p>
|
|
||||||
<p class="text-gray-300">Slide Title: <span class="text-yellow-400" x-text="slides[currentSlide]?.title || 'N/A'">?</span></p>
|
|
||||||
<p class="text-gray-300">Alpine Loaded: <span class="text-green-400">Yes ✓</span></p>
|
|
||||||
<hr class="border-gray-700 my-2">
|
|
||||||
<p class="text-gray-400 font-semibold">PHP Data (Server):</p>
|
|
||||||
<p class="text-gray-300">PHP Slides Count: <span class="text-blue-400">{{ count($slides) }}</span></p>
|
|
||||||
<p class="text-gray-300">PHP Current Slide: <span class="text-blue-400">{{ $currentSlide }}</span></p>
|
|
||||||
<p class="text-gray-300">PHP Show Modal: <span class="text-blue-400">{{ $showModal ? 'true' : 'false' }}</span></p>
|
|
||||||
</div>
|
|
||||||
<button @click="console.log('Full Alpine Data:', $data)" class="mt-2 px-2 py-1 bg-blue-600 text-white rounded text-xs">
|
|
||||||
Log Full Data to Console
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Progress Dots -->
|
<!-- Progress Dots -->
|
||||||
|
|||||||
Reference in New Issue
Block a user