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

Report form submissions via TurboNavigatorDelegate #162

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

zoejessica
Copy link
Contributor

@joemasilotti I've added support for reporting form submissions via TurboNavigatorDelegate here, since it's something we needed for internal work. @jayohms let me know that it's functionality they expose on the Android side, so it seems like a good candidate for us here too.

@jayohms
Copy link
Collaborator

jayohms commented Nov 20, 2023

Thanks @zoejessica! Let's expose both formSubmissionStarted and formSubmissionFinished to apps. It'll also be common for apps to use this to display a progress indicator (such as in the top app bar) when forms are being submitted and waiting for the network response.

@olivaresf
Copy link
Member

Looks good 👍🏻. I feel this is a good example of us slowly moving functions into the public API as needed.

@joemasilotti
Copy link
Member

+1 on adding the corresponding callback when the form completes. Otherwise, this looks good to me!

It also calls out that we need to document what happens when a form submission happens by default - clearing the snapshot cache of the main session.

@jayohms
Copy link
Collaborator

jayohms commented Nov 20, 2023

How difficult is it to add a progress indicator to the demo app between the started/finished events? The turbo-android demo app displays a progress indicator, which is a nice touch on modal/form screens and it'd show other devs how to do this without extra documentation.

@joemasilotti
Copy link
Member

@jayohms I added the other side of the form submission.

@joemasilotti
Copy link
Member

Going to merge this into the turbo-navigator branch now. Thanks folks!

@joemasilotti joemasilotti merged commit dbc4ca8 into turbo-navigator Dec 12, 2023
1 check passed
@joemasilotti joemasilotti deleted the turbo-navigator-form-submission branch December 12, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants