-
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
Collapsible payment section #512
Conversation
b75e4f3
to
9c090f8
Compare
daebe90
to
bbac595
Compare
9c090f8
to
19ee912
Compare
bbac595
to
efc4dd7
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.
Hopefully this helps you get unblocked
tests/unit/components/pages/donation_form/single_page_form/PaymentSection.spec.ts
Outdated
Show resolved
Hide resolved
tests/unit/components/pages/donation_form/single_page_form/PaymentSection.spec.ts
Outdated
Show resolved
Hide resolved
tests/unit/components/pages/donation_form/single_page_form/PaymentSection.spec.ts
Outdated
Show resolved
Hide resolved
tests/unit/components/pages/donation_form/single_page_form/PaymentSection.spec.ts
Outdated
Show resolved
Hide resolved
tests/unit/components/pages/donation_form/single_page_form/PaymentSection.spec.ts
Outdated
Show resolved
Hide resolved
19ee912
to
ba8a78d
Compare
Tip you could rebase this with |
c384574
to
7ee7c8f
Compare
- Add initial state to PaymentSection - Display `summary`, `summary with payment type` and `full form` depending on existing payment information - Connect store to PaymentSection Ticket: https://phabricator.wikimedia.org/T368526 Co-authored-by: Gabriel Birke <[email protected]> Co-authored-by: Abban Dunne <[email protected]>
- Add property to Payment Component that displays the parts that should be shown, by default we show all parts - Show only payment type in PaymentSection with display state 'showSummaryAndPaymentType' Ticket: https://phabricator.wikimedia.org/T368526 Co-authored-by: Gabriel Birke <[email protected]>
7ee7c8f
to
d42550f
Compare
We discussed it in the daily and since the incomplete payment info is only shown to people who a) come from a mailing and b) immediately scroll to the bottom without filling the form, we decided to spin off this improvement into a separate ticket, T376311, and deploy the new form as-is. |
|
||
describe( 'Payment.vue', () => { | ||
let store: Store<any>; | ||
|
||
const getWrapper = (): VueWrapper<any> => { | ||
const getWrapper = ( displaySections: DisplaySectionCollection = [ 'amount', 'interval', 'paymentType' ] ): VueWrapper<any> => { |
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.
A handy way to avoid having to pass parameters to getWrapper is to set them manually in the test:
const wrapper = getWrapper();
await wrapper.setProps( { displaySections: [ 'amount', 'interval', 'paymentType' ] } );
@@ -0,0 +1,3 @@ | |||
export type DisplaySection = 'amount' | 'interval' | 'paymentType'; | |||
|
|||
export type DisplaySectionCollection = [ DisplaySection, ...DisplaySection[] ]; |
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.
👀
Make PaymentSection collapsible
summary
,summary with payment type
andfull form
depending on existing payment informationHide individual parts in Payment Components
Ticket: https://phabricator.wikimedia.org/T368526