sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

[Request] Customizable text button to dismiss modal #99

Closed matthewweldon closed 4 years ago

matthewweldon commented 5 years ago

Really like this framework. I have a small request.

My ask would be a customizable text button at the bottom of the modal to say something like "Ask me later" or "Not Now"

A use case that is common in my experience is a soft-ask for permissions that is intended to be brought up again later if the user wanted to skip for now.

By putting the close button at the top in your implementation, a more prominent CTA to "Skip for now" is less obvious and makes the modal feel a little stiff for UX.

So let's say I was making the UX for a Package Tracker app with optional notifications on every tracking number the user adds:

In this app, I could present the modal up during initial user onboarding, explaining I need notifications. The user decides "Not Now" the first time they see SPPermission, but the close button isn't present. The close button might imply this is the main time to ask for permissions, or that we won't ask again but what I'm really trying to tell the user is "Not Now, you can do this later"

If later on they tap on a "Notify Me about this Package" button in my app, the SPPermission modal appears again but only for the specific permission the user needed to enable for notifications. Maybe this time the close button is fine.

This might seems a little nit picky, but I think the ability to customize the text on the close action (wherever it is) would be nice.

This action would likely require a delegate method, because handling the skip should be an option. As an example this text could say "Never ask me again" which would tell the app to not bring this modal up again, unless specifically asked for by the user, or something like "I don't want push notifications" etc.

ivanvorobei commented 5 years ago

good idea! I am added it in next version

anthonycastelli commented 5 years ago

Any Progress on this?

ivanvorobei commented 5 years ago

@anthonycastelli for now I am do paid projects and can't do it. I am try do in month.

ivanvorobei commented 4 years ago

If actually for now? I can do it.