Enhance form column settings and table display
- Add "Show all" and "Hide all" buttons in column settings modal - Improve column width handling and default width management - Update OpenSelect and OpenText components to support more flexible prop types - Add z-index to table header for better visual hierarchy - Refactor column width property from `cell_width` to `width`
This commit is contained in:
53
.cursor/rules/back-end.mdc
Normal file
53
.cursor/rules/back-end.mdc
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
description: Laravel Back-end
|
||||
globs: api/**.php
|
||||
---
|
||||
You are an expert in Laravel, PHP, and related web development technologies.
|
||||
|
||||
Key Principles
|
||||
- Write concise, technical responses with accurate PHP examples.
|
||||
- Adhere to Laravel 11+ best practices and conventions.
|
||||
- Use object-oriented programming with a focus on SOLID principles.
|
||||
- Prefer iteration and modularization over duplication.
|
||||
- Use descriptive variable and method names.
|
||||
- Use lowercase with dashes for directories (e.g., app/Http/Controllers).
|
||||
- Favor dependency injection and service containers.
|
||||
|
||||
PHP/Laravel
|
||||
- Use PHP 8.2+ features when appropriate (e.g., typed properties, match expressions).
|
||||
- Follow PSR-12 coding standards.
|
||||
- Utilize Laravel's built-in features and helpers when possible.
|
||||
- File structure: Follow Laravel's directory structure and naming conventions.
|
||||
- Implement proper error handling and logging:
|
||||
- Use Laravel's exception handling and logging features.
|
||||
- Create custom exceptions when necessary.
|
||||
- Use try-catch blocks for expected exceptions.
|
||||
- Use Laravel's validation features for form and request validation.
|
||||
- Implement middleware for request filtering and modification.
|
||||
- Utilize Laravel's Eloquent ORM for database interactions.
|
||||
- Use Laravel's query builder for complex database queries.
|
||||
- Implement proper database migrations and seeders.
|
||||
|
||||
Dependencies
|
||||
- Laravel (latest stable version)
|
||||
- Composer for dependency management
|
||||
|
||||
Laravel Best Practices
|
||||
- Use Eloquent ORM instead of raw SQL queries when possible.
|
||||
- Use Laravel's built-in authentication and authorization features.
|
||||
- Utilize Laravel's caching mechanisms for improved performance.
|
||||
- Implement job queues for long-running tasks.
|
||||
- Use Pest for unit and feature tests.
|
||||
- Use Laravel's localization features for multi-language support.
|
||||
- Implement proper database indexing for improved query performance.
|
||||
- Use Laravel's built-in pagination features.
|
||||
- Implement proper error logging and monitoring.
|
||||
|
||||
Key Conventions
|
||||
1. Follow Laravel's MVC architecture.
|
||||
2. Use Laravel's routing system for defining application endpoints.
|
||||
3. Implement proper request validation using Form Requests.
|
||||
4. Implement proper database relationships using Eloquent.
|
||||
5. Use Laravel's event and listener system for decoupled code.
|
||||
6. Implement proper database transactions for data integrity.
|
||||
7. Use Laravel's built-in scheduling features for recurring tasks.
|
||||
36
.cursor/rules/front-end.mdc
Normal file
36
.cursor/rules/front-end.mdc
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
description: Vue and Nuxt guidelines
|
||||
globs: client/**.*
|
||||
---
|
||||
You are an expert in Nuxt, Vue.js, Vue Router, Pinia, VueUse, NuxtUI library and Tailwind, with a deep understanding of best practices and performance optimization techniques in these technologies.
|
||||
|
||||
Code Style and Structure
|
||||
- Write concise, maintainable, and technically accurate code with relevant examples.
|
||||
- Use functional and declarative programming patterns; avoid classes.
|
||||
- Favor iteration and modularization to adhere to DRY principles and avoid code duplication.
|
||||
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
|
||||
- Organize files systematically: each file should contain only related content, such as exported components, subcomponents, helpers, static content, and types.
|
||||
|
||||
Naming Conventions
|
||||
- Use lowercase with dashes for directories (e.g., components/auth-wizard).
|
||||
- Favor named exports for functions.
|
||||
|
||||
We don't use typescript, javascript only (except when really required for config file for instance).
|
||||
|
||||
Syntax and Formatting
|
||||
- Use the "function" keyword for pure functions to benefit from hoisting and clarity.
|
||||
- Always use the Vue Composition API script setup style. If a legacy file still used
|
||||
|
||||
UI and Styling
|
||||
- Use Nuxt UI components (https://ui.nuxt.com/components) and Tailwind for components and styling.
|
||||
- Implement responsive design with Tailwind CSS; use a mobile-first approach.
|
||||
- Build UI components using atomic design principles, organizing them from smallest to largest (e.g., atoms, molecules, organisms, pages).
|
||||
|
||||
Performance Optimization
|
||||
- Leverage VueUse functions where applicable to enhance reactivity and performance.
|
||||
- Wrap asynchronous components in Suspense with a fallback UI made with <USkeleton/> components.
|
||||
- Use dynamic loading for non-critical components.
|
||||
|
||||
Key Conventions
|
||||
- Optimize Web Vitals (LCP, CLS, FID) using tools like Lighthouse or WebPageTest.
|
||||
- Implement proper error boundaries or try-catch mechanisms to handle errors gracefully, especially in asynchronous operations.
|
||||
Reference in New Issue
Block a user