Skip to content

Commit

Permalink
fix(frontend): UX improvements (#2126)
Browse files Browse the repository at this point in the history
Motivation
----------
Here are some improvements, some of them highlighted during the
bi-weekly presentation.

How to test
-----------
1. Visit http://localhost:3000/payment
2. E.g. if the amount is invalid, the tiles won't jump to another
   location in the browser
3. Better naming "Verwendungszweck"
4. Nested routing, button "Cockpit" stays active
  • Loading branch information
roschaefer authored Sep 17, 2024
1 parent 9b44f89 commit 82377bf
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@media #{map.get($display-breakpoints, 'md-and-up')} {
.cockpit {
grid-template-columns: 380px 380px;
grid-template-columns: 400px 400px;
max-width: 1200px;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-card-text>
{{ $t('paymentLink.subtitle') }}
</v-card-text>
<v-btn href="/payment" color="primary" block border>
<v-btn href="/cockpit/payment" color="primary" block border>
{{ $t('paymentLink.callToAction') }}
</v-btn>
</v-card>
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/components/sepa-iban/SepaIban.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,25 @@
</p>
</template>
</CockpitCard>
<CockpitCard v-if="qr">
<CockpitCard>
<template #header>
<h2>
{{ $t('sepaIban.qr.title') }}
</h2>
</template>
<template #default>
<template v-if="qr" #default>
<p class="pb-4">
{{ $t('sepaIban.qr.explanation') }}
</p>
<div class="d-flex justify-center">
<VueQrcode :value="qr" :options="{ width: 140 }"></VueQrcode>
</div>
</template>
<template v-else #default>
<p>
{{ $t('sepaIban.qr.invalid') }}
</p>
</template>
</CockpitCard>
<CockpitCard>
<template #header>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"amount": "Betrag in Euro",
"BIC": "BIC",
"IBAN": "IBAN",
"reference": "Referenz",
"reference": "Verwendungszweck",
"title": "Kontodaten"
},
"explanation": {
Expand All @@ -137,6 +137,7 @@
},
"qr": {
"explanation": "Alternativ kannst du auch diesen QR Code mit deiner Banking-App scannen.",
"invalid": "Bitte gib einen gültigen Betrag ein, um einen QR-Code anzuzeigen.",
"title": "QR Code scannen"
}
},
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"amount": "Amount in Euro",
"BIC": "BIC",
"IBAN": "IBAN",
"reference": "Reference",
"reference": "Purpose",
"title": "Account details"
},
"explanation": {
Expand All @@ -137,6 +137,7 @@
},
"qr": {
"explanation": "Alternatively, you can also scan this QR code with your banking app.",
"invalid": "Please enter a valid amount to display a QR code.",
"title": "Scan QR Code"
}
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/cockpit/__snapshots__/Page.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ exports[`Cockpit Page > without apollo error > renders 1`] = `
<a
class="v-btn v-btn--block v-theme--light v-btn--border bg-primary v-btn--density-default v-btn--size-default v-btn--variant-elevated"
data-v-f97d716a=""
href="/payment"
href="/cockpit/payment"
>
<span
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 82377bf

Please sign in to comment.