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

Paywalls: disable the close button when an action is in progress #3474

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

aboedo
Copy link
Member

@aboedo aboedo commented Nov 27, 2023

Disabled and lowered the opacity of the close button while an action is in progress, to prevent a potentially bad UX state when you exit the paywall.

@aboedo aboedo requested a review from a team November 27, 2023 18:07
@aboedo aboedo self-assigned this Nov 27, 2023
Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

Hmm I'm slightly concerned about this change... Say there is an action that takes a while (for example, I believe sometimes the purchase flow takes a while to appear in iOS). This would avoid the user from closing the paywall right? I'm honestly not sure what would be better though...

@rkotzy
Copy link
Member

rkotzy commented Nov 27, 2023

I think the case when the purchase flow takes a long time that's exactly when you'd want to prevent someone from dismissing the view. It's like when you buy something on a website and the page says "Payment in process, don't go back or refresh your browser" 😅.

Swapping out the "X" for a loading indicator could be slick enhancement or even making an entire loading state so it's more clear that something is happening. I've seen apps swap out the title of the primary CTA button with a loading indicator and that looks good. Maybe we should give it more thought to make something 🪄

@rkotzy
Copy link
Member

rkotzy commented Nov 28, 2023

Nevermind - it looks like there already is a loading state with dimmed package buttons and a loading indicator over the CTA button.

@tonidero
Copy link
Contributor

Right, that's a good point... It just might be weird to have the user locked in the screen for a few seconds, but might be better than having the purchase flow appear suddenly later 👍

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (07de664) 86.06% compared to head (55aa292) 86.08%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3474      +/-   ##
==========================================
+ Coverage   86.06%   86.08%   +0.02%     
==========================================
  Files         237      237              
  Lines       17211    17211              
==========================================
+ Hits        14812    14816       +4     
+ Misses       2399     2395       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@NachoSoto NachoSoto left a comment

Choose a reason for hiding this comment

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

I think this makes sense as a default behavior. Users can always disable our close button and add their own otherwise.

@aboedo aboedo merged commit d99fd9e into main Dec 6, 2023
22 checks passed
@aboedo aboedo deleted the andy/fix_close_button_state_when_in_progress branch December 6, 2023 20:37
NachoSoto pushed a commit that referenced this pull request Dec 12, 2023
**This is an automatic release.**

### RevenueCatUI
* `Paywalls`: improve image caching (#3498) via NachoSoto (@NachoSoto)
* `Paywalls`: change style of CTA button to be consistent with other
platforms (#3507) via NachoSoto (@NachoSoto)
* `Paywalls`: open footer links on Safari on Catalyst (#3508) via
NachoSoto (@NachoSoto)
* `Paywalls`: fix compilation on Xcode < 14.3 (#3513) via NachoSoto
(@NachoSoto)
* Fix typo in zh-Hans localization of RevenueCatUI (#3512) via Francis
Feng (@francisfeng)
* `Paywalls`: fix PaywallViewControllerDelegate access from Objective-C
(#3510) via noncenz (@noncenz)
* `Paywalls`: open Terms and Privacy Policy links in-app (#3475) via
Andy Boedo (@aboedo)
* `Paywalls`: fix empty description when using `custom` package type and
`{{ sub_period }}` (#3495) via Andy Boedo (@aboedo)
* `Paywalls`: use `HEIC` images (#3496) via NachoSoto (@NachoSoto)
* Paywalls: disable the close button when an action is in progress
(#3474) via Andy Boedo (@aboedo)
* `Paywalls`: adjusted German translations (#3476) via Tensei (@tensei)
* Paywalls: Improve Chinese localization (#3489) via Andy Boedo
(@aboedo)
### Other Changes
* `CircleCI`: add git credentials to snapshot generation (#3506) via
NachoSoto (@NachoSoto)
* `StoreProduct`: improve `priceFormatter` documentation (#3500) via
NachoSoto (@NachoSoto)
* `Paywalls`: fix tests (#3499) via NachoSoto (@NachoSoto)
* `Optimization`: changed `first` to `first(where:)` (#3467) via
NachoSoto (@NachoSoto)
NachoSoto added a commit that referenced this pull request Jan 30, 2024
NachoSoto added a commit that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants