-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.x] Changed breakpoints | Frontend fixes checkout #125
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,52 @@ | ||
<div class="grid gap-5 lg:grid-cols-2"> | ||
<graphql-mutation | ||
:query="config.queries.setExistingShippingAddressesOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
customer_address_id: cart.shipping_addresses[0]?.customer_address_id, | ||
}" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setShippingAddressesOnCart" | ||
v-slot="setShippingAddress" | ||
> | ||
<graphql-mutation | ||
:query="config.queries.setExistingShippingAddressesOnCart" | ||
:query="config.queries.setExistingBillingAddressOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
customer_address_id: cart.shipping_addresses[0]?.customer_address_id, | ||
customer_address_id: cart.billing_address?.customer_address_id, | ||
}" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setShippingAddressesOnCart" | ||
v-slot="setShippingAddress" | ||
mutate-event="setBillingAddressOnCart" | ||
v-slot="setBillingAddress" | ||
> | ||
<div> | ||
<graphql-mutation | ||
:query="config.queries.setExistingBillingAddressOnCart" | ||
:variables="{ | ||
cart_id: mask, | ||
customer_address_id: cart.billing_address?.customer_address_id, | ||
}" | ||
:callback="updateCart" | ||
:error-callback="checkResponseForExpiredCart" | ||
mutate-event="setBillingAddressOnCart" | ||
v-slot="setBillingAddress" | ||
> | ||
<div> | ||
<template v-for="userAddress in $root.user.addresses"> | ||
<x-rapidez-ct::card.address | ||
v-bind:key="userAddress.id" | ||
v-bind:address="userAddress" | ||
v-bind:billing="setBillingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:shipping="setShippingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:check="setBillingAddress.variables.customer_address_id === userAddress.id || setShippingAddress.variables.customer_address_id === userAddress.id" | ||
class="w-full sm:min-w-[350px]" | ||
<div class="grid gap-5 lg:grid-cols-2"> | ||
<template v-for="userAddress in $root.user.addresses"> | ||
<x-rapidez-ct::card.address | ||
v-bind:key="userAddress.id" | ||
v-bind:address="userAddress" | ||
v-bind:billing="setBillingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:shipping="setShippingAddress.variables.customer_address_id === userAddress.id" | ||
v-bind:check="setBillingAddress.variables.customer_address_id === userAddress.id || setShippingAddress.variables.customer_address_id === userAddress.id" | ||
class="w-full sm:min-w-[350px]" | ||
> | ||
<x-rapidez-ct::button.link | ||
v-if="!cart.is_virtual && setShippingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setShippingAddress.variables, 'customer_address_id', userAddress.id) && setShippingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setShippingAddress.mutating}" | ||
> | ||
<x-rapidez-ct::button.link | ||
v-if="!cart.is_virtual && setShippingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setShippingAddress.variables, 'customer_address_id', userAddress.id) && setShippingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setShippingAddress.mutating}" | ||
> | ||
@lang('Select as shipping') | ||
</x-rapidez-ct::button.link> | ||
@lang('Select as shipping') | ||
</x-rapidez-ct::button.link> | ||
|
||
<x-rapidez-ct::button.link | ||
v-if="setBillingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setBillingAddress.variables, 'customer_address_id', userAddress.id) && setBillingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setBillingAddress.mutating}" | ||
> | ||
@lang('Select as billing') | ||
</x-rapidez-ct::button.link> | ||
</x-rapidez-ct::card.address> | ||
</template> | ||
</div> | ||
</graphql-mutation> | ||
<x-rapidez-ct::button.link | ||
v-if="setBillingAddress.variables.customer_address_id !== userAddress.id" | ||
v-on:click.prevent="() => window.app.$set(setBillingAddress.variables, 'customer_address_id', userAddress.id) && setBillingAddress.mutate()" | ||
v-bind:class="{'blur pointer-events-none': setBillingAddress.mutating}" | ||
> | ||
@lang('Select as billing') | ||
</x-rapidez-ct::button.link> | ||
</x-rapidez-ct::card.address> | ||
</template> | ||
</div> | ||
</graphql-mutation> | ||
</div> | ||
</graphql-mutation> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
resources/views/checkout/partials/buttons/new-address.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<button v-on:click.prevent="toggleEdit" class="flex flex-col items-center justify-center gap-y-2 font-medium bg-ct-disabled rounded max-sm:hidden"> | ||
<button v-on:click.prevent="toggleEdit" class="flex flex-col items-center justify-center gap-y-2 font-medium bg-ct-disabled rounded max-md:hidden"> | ||
<span>+</span> | ||
<span>@lang('Add new address')</span> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<login v-slot="{ email, password, go, loginInputChange, emailAvailable, logout }"> | ||
<x-rapidez-ct::card.inactive> | ||
<div class="grid gap-4 sm:gap-5 md:grid-cols-2 md:items-end"> | ||
<template v-if="!loggedIn"> | ||
@include('rapidez-ct::checkout.partials.sections.login.logged-out') | ||
</template> | ||
<template v-else> | ||
<template v-if="!loggedIn"> | ||
@include('rapidez-ct::checkout.partials.sections.login.logged-out') | ||
</template> | ||
<template v-else> | ||
<div class="grid gap-4 sm:gap-5 md:grid-cols-2 md:items-end"> | ||
@include('rapidez-ct::checkout.partials.sections.login.logged-in') | ||
</template> | ||
</div> | ||
</div> | ||
</template> | ||
</x-rapidez-ct::card.inactive> | ||
</login> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<div {{ $attributes->class('mt-10 space-y-5 md:mt-[52px] md:w-[370px]') }}> | ||
<div {{ $attributes->class('mt-10 space-y-5 lg:mt-[52px] lg:w-[340px] xl:w-[370px]') }}> | ||
{{ $slot }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div {{ $attributes->class('flex flex-col mx-auto max-w-4xl w-full') }}> | ||
{{ $slot }} | ||
<div class="mt-5 grid content-center items-start gap-8 sm:grid-cols-2"> | ||
<div class="mt-5 grid content-center items-start gap-8 lg:grid-cols-2"> | ||
{{ $columns }} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
@props(['tag' => ($isAnchor = $attributes->filter(null)->hasAny('href', ':href', 'v-bind:href')) ? 'a' : 'p']) | ||
<x-tag is="{{ $tag }}" {{ $attributes->class('font-medium relative group') }}> | ||
@if ($isAnchor) | ||
<x-heroicon-o-arrow-left class="lg:absolute max-lg:mb-5 left-0 top-1/2 h-4 lg:-translate-x-full lg:-translate-y-1/2 lg:pr-6 text-ct-inactive group-hover:text-ct-primary transition" /> | ||
<x-heroicon-o-arrow-left class="xl:absolute max-xl:mb-5 left-0 top-1/2 h-4 xl:-translate-x-full xl:-translate-y-1/2 xl:pr-6 text-ct-inactive group-hover:text-ct-primary transition" /> | ||
@endif | ||
{{ $slot }} | ||
</x-tag> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the progress bar cause layout shifts? I thought it didn't use JS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you want v-cloak on the separate items instead of the wrapper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on what's shifting