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

Revise notification flows #5827

Merged
merged 17 commits into from
Dec 7, 2023
Merged

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Nov 8, 2023

Closes #5811

The solution here is to make all (event) notifications follow these rules:

  • Success notifications have title and subtitle, clicking returns to or opens app
  • Failure notifications have title and subtitle and "Show details" action, clicking returns to or opens app, clicking action shows errors screen (on top of current task)
  • Clicking notification or action dismisses notification

Why is this the best possible solution? Were any other approaches considered?

For each case, there are probably better solutions, but for now we want to get on solid ground and avoid any weird problems from notification flows (like that encountered in the issue). The biggest sacrifice we're making here is that we're removing ways for users to fix problems that the notifications are flagging (like failed match exactly syncs). However, these were half baked anyway as they would only work if the user was currently in the correct project and could cause issues if they were midway through form entry.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Should only change the behaviour of notifications. It'd be good to try and find if the new flows allow any weird navigation scenarios.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • added a comment above any new strings describing it for translators
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@seadowg seadowg marked this pull request as ready for review November 9, 2023 11:08
@@ -66,8 +66,7 @@ class AutoSendTest {

testDependencies.scheduler.runDeferredTasks()

mainMenuPage
.clickViewSentForm(1)
mainMenuPage.clickViewSentForm(1)
Copy link
Member

Choose a reason for hiding this comment

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

What's the point of checking this here if we do not check the status (success/failed)? No matter if sending failed or not the form will be there.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's still checking that the form moves to "Sent" which is valuable, but I see your point that it doesn't check that the form ends up with the correct status. I'll have a look into if this is tested elsewhere, and if not add coverage here.

Copy link
Member Author

Choose a reason for hiding this comment

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

A bunch of other tests fail if I mess with code that updates instance statuses after sending so I think this is ok for now.

@grzesiek2010 grzesiek2010 merged commit f3d4089 into getodk:master Dec 7, 2023
6 checks passed
@seadowg seadowg deleted the fix-notifications branch December 7, 2023 09:47
@dbemke
Copy link

dbemke commented Jan 17, 2024

Tested with Success!

Verified on Androids: 10

Verified cases:

  • success notification
  • failure notification
  • clicking notification when another project is opened
  • clicking notification while in different parts of the app

@srujner
Copy link

srujner commented Jan 17, 2024

Tested with Success!

Verified on Androids: 13

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.

Form opened twice after going to notifications
4 participants