Skip to content

Conversation

Roene-JustBetter
Copy link
Member

This will add a loader on a button when we are waiting for request for example inside the checkout. When you add loader on a button it will get a loader:
Scherm­afbeelding 2025-08-08 om 10 51 02

Jade-GG
Jade-GG previously approved these changes Aug 12, 2025
@royduin
Copy link
Member

royduin commented Aug 13, 2025

Why did you go for the loader icon instead of #922?


<x-rapidez::tag
is="{{ $tag }}"
:v-bind:class="$loader ? '{ \'button-loading\': $root.loading }' : ''"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this with @indykoning.

    {{ $attributes->merge([
        ':disabled' => $attributes->has('href') || $attributes->has(':href') || !$disableWhenLoading ? null : '$root.loading',
        'v-bind:class' => $loader ? '{ "button-loading": $root.loading }' : null
    ]) }}

Is not working.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In more details the blade compiler seems to fail due to the { within the {{ ...->merge creating a corrupted php file akin to

    {{ $attributes->merge([
        ':disabled' => $attributes->has('href') || $attributes->has(':href') || !$disableWhenLoading ? null : '$root.loading',
        'v-bind:class' => $loader ? ') 'button-loading' => false
     }}

@royduin
Copy link
Member

royduin commented Aug 27, 2025

Please sync with master and double check the screenshot changes.

@royduin royduin marked this pull request as draft August 27, 2025 13:00
@Roene-JustBetter Roene-JustBetter marked this pull request as ready for review September 23, 2025 13:44
@royduin royduin merged commit bdfaa74 into master Oct 10, 2025
@royduin royduin deleted the feature/add-loading-for-buttons branch October 10, 2025 10:01
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.

6 participants