Skip to content

feat(vue-starter-template): enhance BaseButton and checkout flow #2563

Open
Maciej D (mdanilowicz) wants to merge 1 commit into
mainfrom
fix/GH-2562
Open

feat(vue-starter-template): enhance BaseButton and checkout flow #2563
Maciej D (mdanilowicz) wants to merge 1 commit into
mainfrom
fix/GH-2562

Conversation

@mdanilowicz

Copy link
Copy Markdown
Contributor

closes #2562

This pull request adds a loading state to the order placement flow in the Vue starter template, improving user feedback and preventing duplicate order submissions. The main changes include updating the BaseButton component to support loading and disabled states, integrating a loading indicator and overlay into the checkout page, and adding new i18n strings for the loading state.

Checkout process improvements:

  • Added an isPlacingOrder state in checkout/index.vue to prevent duplicate order submissions and display a loading overlay while an order is being placed. The order button is now disabled and shows a spinner and loading text during this process. [1] [2] [3]

Component updates:

  • Enhanced BaseButton.vue to support loading and disabled props, display a spinner when loading, and update button accessibility attributes accordingly. [1] [2]

Internationalization:

  • Added the placingOrder string to checkout.json in English, German, and Polish locales for improved localization of the loading state. [1] [2] [3]

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontends-starter-template-extended Ready Ready Preview, Comment Jul 9, 2026 11:08am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Vue starter template’s checkout UX by adding a “placing order” loading state that blocks interactions during order submission, reducing duplicate submissions and improving user feedback.

Changes:

  • Added isPlacingOrder state to the checkout page to guard against duplicate order placement and show a loading overlay.
  • Extended FormBaseButton (BaseButton.vue) with loading/disabled props and a built-in spinner.
  • Added checkout.placingOrder i18n strings for en-GB, de-DE, and pl-PL.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
templates/vue-starter-template/app/pages/checkout/index.vue Adds “placing order” state, disables the order button, and shows blocking overlays during submission.
templates/vue-starter-template/app/components/form/BaseButton.vue Adds loading/disabled props and renders a spinner while loading.
templates/vue-starter-template/i18n/en-GB/checkout.json Adds placingOrder translation string.
templates/vue-starter-template/i18n/de-DE/checkout.json Adds placingOrder translation string.
templates/vue-starter-template/i18n/pl-PL/checkout.json Adds placingOrder translation string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 34 to +39
<button
:class="[variantClasses[variant], sizeClasses[size]]"
class="px-4 rounded inline-flex justify-center items-center gap-1 disabled:bg-surface-surface-disabled disabled:bg-text-bg-surface-surface-disabled"
class="px-4 rounded inline-flex justify-center items-center gap-2 disabled:cursor-not-allowed disabled:opacity-70 disabled:bg-surface-surface-disabled disabled:bg-text-bg-surface-surface-disabled"
:type="type"
:disabled="disabled || loading"
:aria-busy="loading"
Comment on lines +140 to +146
<div class="w-1/2 relative">
<div
v-if="isPlacingOrder"
class="absolute inset-0 z-10 flex items-center justify-center bg-surface-surface/70 backdrop-blur-[1px] cursor-wait"
role="status"
:aria-label="$t('checkout.placingOrder')"
>
@mdanilowicz Maciej D (mdanilowicz) self-assigned this Jul 9, 2026
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.

[BUG] Add loading indicator and form blocking on checkout order placement

2 participants