4site-interactive-studios / engrid

The Unlicense
10 stars 4 forks source link

restore premium selection after amount/frequency change #302

Closed MichaelT372 closed 5 months ago

MichaelT372 commented 5 months ago

Restores the premium gift selection after the amount/frequency changes (if that premium is still available).

Test page: https://protect.worldwildlife.org/page/67513/donate/1?assets=remember-premium-selection

It does have jump between different premiums being selected, but it looks like that behaviour already exists on WWF's pages. Their main concern is fixing the premium changing when the frequency is changed via the checkbox near the submit button (when doing a one-time donation, there's an upsell to yearly and previously this changed their premium).

Since WWF have a slightly custom premium setup, it might be worth testing this with another client too? But I can't see that it would cause any issue.

Productive task: https://app.productive.io/2650-4site-interactive-studios-inc/tasks/7959493

bryancasler commented 5 months ago

What do you think about adding a small background color delay on the premium to prevent the visual "popping" that can happen when the value gets repopulated after an amount change? Recording: https://cln.sh/4Xd14xyw

[data-engrid-theme] .en__pg .en__pg__body{
   transition: background-color 200ms ease-in;
}