Fix: Web form spinner continuously visible on page load (#414)

Commit: 83ca62a39a3fefecbbd354e3761e0fefd562c522
Date: 2025-10-20 19:17:32 +0000
Author: PascalHavelange

Commit Message

Fix: Web form spinner continuously visible on page load (#414)

## Problem
The save button spinner was continuously visible on all web forms (e.g., CollectionTranslation, Items, etc.) instead of being hidden by default and only showing during form submission.

## Root Cause
The `x-ui.loading` component was not properly merging the `style` attribute passed to it. When `style="display: none;"` was passed from the `x-form.actions` component, it was being ignored, causing the spinner to always be visible.

## Solution
1. Updated `resources/views/components/ui/loading.blade.php` to use `$attributes->merge()` to properly merge all attributes including inline styles
2. Improved the JavaScript in `resources/views/components/form/actions.blade.php` to use a more specific selector (`.submit-spinner`) and set `display: flex` instead of `display: block` for better alignment

## Impact
- All web forms using the `x-form.actions` component now properly hide the spinner on page load
- Spinner only appears during actual form submission
- Affected pages: Collections, Items, Contexts, Countries, Languages, Partners, Projects, CollectionTranslations, ItemTranslations

## Testing
- Verified PHP linting passes with Laravel Pint
- Web forms should now show spinner only when submitting

Co-authored-by: Pascal HAVELANGE <havelangep@hotmail.com>

Files Changed


This documentation was automatically generated from Git commit data.