-
Notifications
You must be signed in to change notification settings - Fork 0
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
Single page form file restructure #530
base: main
Are you sure you want to change the base?
Conversation
517a9f4
to
13d17fd
Compare
We no longer have a 2-page donation form so this prefix is now redundant. Ticket: https://phabricator.wikimedia.org/T378075
The version of Bulma we use now uses deprecated sass functions. We can't update to the next version of Bulma and we plan to eventually remove it altogether. In the interim I've turned off deprecation warnings from the sass compiler. We will eventually need to turn this back on as our site will break when Dart Sass hits v3. Ticket: https://phabricator.wikimedia.org/T378075
The donation form being a single page now means that functions to handle it are in the wrong place. This moves them to the top level component and passes them as props into the sections and summaries. Changelist - Integrated Street Autocomplete and removed toggles. - Created sub-pages for the 2 remaining donation forms. - Moved submit handling out of the data sections and into the new sub pages. - Moved form summary, error summary, and submit buttons into a separate form section. - Moved tests from form sections into donation sub form tests. - useReceiptModel is shared so moved it into shared/composables. - Added tests for DonationReceipt AddressFields. - Moved salutation locale adjustment into the store and added tests. Ticket: https://phabricator.wikimedia.org/T378075
13d17fd
to
49f82a2
Compare
We had different widths for each of the different fields which was making the form look ragged. This increases the max-width to line them all up. Also adds flex wrap to the row alignment radio fields so they don't burst out of the content box. Ticket: https://phabricator.wikimedia.org/T378075
49f82a2
to
90162b9
Compare
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.
Looks great, thanks for the cleanup & the alignment fixes
@@ -6,7 +6,7 @@ | |||
> | |||
<h2 id="donation-form-subheading" class="form-subtitle">{{ $t( 'donation_form_address_subheading' ) }}</h2> | |||
<p id="donation-form-tagline">{{ $t( 'donation_form_section_address_tagline' ) }}</p> | |||
<form @submit.prevent="submit" id="donation-form" action="/donation/add" method="post"> | |||
<form id="donation-form" action="/donation/add" method="post"> |
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.
This is not a standalone form and should never be submitted. The action and method are leftovers from a time where we still did progressive enhancement. Now this form is just a wrapper that could even be omitted (if that doesn't hurt accessibility). At least we should do <form action="#" method="get">
to avoid accidental submissions to our end point (triggered by browser behavior/plugin or external JS).
This change does not have to be in this PR, I just stumbled across this because of the event change.
* for it. If you're thinking of improving it, please don't. There | ||
* is already a proposal for improving it here: | ||
* | ||
* https://phabricator.wikimedia.org/T317388 |
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.
Thanks for fixing this! It's currently broken in prod
Remove single page prefix from components
We no longer have a 2-page donation form so this
prefix is now redundant.
Silence Sass deprecation warnings
The version of Bulma we use now uses deprecated sass
functions. We can't update to the next version of Bulma
and we plan to eventually remove it altogether. In the
interim I've turned off deprecation warnings from the
sass compiler. We will eventually need to turn this back
on as our site will break when Dart Sass hits v3.
Move form functions into donation form
The donation form being a single page now means that
functions to handle it are in the wrong place. This
moves them to the top level component and passes them
as props into the sections and summaries.
Changelist
the new sub pages.
a separate form section.
Improve alignment on donation form fields
We had different widths for each of the different
fields which was making the form look ragged. This
increases the max-width to line them all up.
Also adds flex wrap to the row alignment radio fields
so they don't burst out of the content box.
Ticket: https://phabricator.wikimedia.org/T378075