Skip to content
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

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

Sperling-0
Copy link
Contributor

@Sperling-0 Sperling-0 commented Sep 24, 2024

  • Make PaymentSection collapsible

    • Add initial state to PaymentSection
    • Display summary, summary with payment type and full form depending on existing payment information
    • Connect store to PaymentSection
  • Hide individual parts in Payment Components

    • 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

@Sperling-0 Sperling-0 changed the base branch from main to combine-donation-pages September 24, 2024 16:05
@moiikana moiikana force-pushed the combine-donation-pages branch 2 times, most recently from daebe90 to bbac595 Compare September 26, 2024 14:48
Copy link
Member

@Abban Abban left a 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

@moiikana
Copy link
Contributor

Tip

you could rebase this with git rebase --onto combine-donation-pages collapsible-payment-section^

@Sperling-0 Sperling-0 force-pushed the collapsible-payment-section branch 6 times, most recently from c384574 to 7ee7c8f Compare September 30, 2024 14:21
Sperling-0 and others added 2 commits September 30, 2024 16:45
- 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]>
@Sperling-0 Sperling-0 marked this pull request as ready for review September 30, 2024 15:27
@moiikana
Copy link
Contributor

moiikana commented Oct 2, 2024

Bildschirmfoto vom 2024-10-02 18-20-19
I don't remember whether we discussed something in the daily about that, but in the payment summary at the bottom there is still the "via"/"per" text showing up wrongly (when the payment type is not selected yet).

This is happening in the components in the summary_content/ folder.

Besides that this looks good to go

@gbirke
Copy link
Member

gbirke commented Oct 2, 2024

Bildschirmfoto vom 2024-10-02 18-20-19 I don't remember whether we discussed something in the daily about that, but in the payment summary at the bottom there is still the "via"/"per" text showing up wrongly (when the payment type is not selected yet).

This is happening in the components in the summary_content/ folder.

Besides that this looks good to go

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> => {
Copy link
Member

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[] ];
Copy link
Member

Choose a reason for hiding this comment

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

👀

@Abban Abban merged commit 491dfd7 into combine-donation-pages Oct 8, 2024
2 checks passed
@Abban Abban deleted the collapsible-payment-section branch October 8, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants