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

Making the "Ready to Send" screen more actionable #5693

Merged
merged 19 commits into from
Sep 26, 2023

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Jul 25, 2023

Closes #5605

What has been done to verify that this works as intended?

I've tested the changes manually and added automated tests.

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

There is nothing important to discuss here. I've created a custom view for the new element to make testing easier and isolated.

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?

It's rather an isolated change so testing the list of forms to make sure the banner is displayed correctly would be enough.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • 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

@grzesiek2010 grzesiek2010 marked this pull request as ready for review July 25, 2023 21:15
# Forms ready to send banner
##############################################
-->
<string name="last_form_sent_seconds_ago">Last form sent: %d second(s) ago</string>
Copy link
Member Author

Choose a reason for hiding this comment

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

I could have used Quantity strings instead of adding (s) but we usually use the latter because it's easier. Supporting so many languages and keeping such strings translated correctly would be difficult.

Copy link
Member

@lognaturel lognaturel Aug 1, 2023

Choose a reason for hiding this comment

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

In this case I think we should go for the quantity string. Many workflows involve looking at this screen a LOT. I think we want it to look as clean as we can. CC @alyblenkin

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree! I took a screengrab below – it isn't great for readability.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I've improved that.

@seadowg
Copy link
Member

seadowg commented Aug 1, 2023

@alyblenkin probably good for you to have a look at this before I dive into a code review

@seadowg seadowg removed their request for review August 1, 2023 15:54
@alyblenkin
Copy link
Collaborator

I think this is looking good!

This is very picky, but is it possible to align the text?
Screenshot 2023-08-01 at 9 29 27 AM

It doesn't read well with the (s), but it looks like that's easier from the comment above and better for translations.
Screenshot_20230801-172300_ODK Collect

@grzesiek2010
Copy link
Member Author

This is very picky, but is it possible to align the text?

@alyblenkin
I'm not sure if I understand what you want to change there. Could you explain?

@alyblenkin
Copy link
Collaborator

Maybe this is a better screenshot to explain what I mean
Screenshot 2023-08-09 at 7 58 02 AM

@grzesiek2010
Copy link
Member Author

Ah thanks now I see, ok it's fixed.

Copy link
Collaborator

@alyblenkin alyblenkin left a comment

Choose a reason for hiding this comment

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

Looks great!

@grzesiek2010 grzesiek2010 force-pushed the COLLECT-5605 branch 4 times, most recently from 3a63570 to 2c49cc1 Compare August 29, 2023 12:41
Copy link
Member

@seadowg seadowg left a comment

Choose a reason for hiding this comment

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

Just a couple of tweaks to tests here so this is ready for QA!


@Test
fun `numberOfSentInstances should represent the real number of instances with STATUS_SUBMITTED in the database`() {
scheduler.runBackground()
Copy link
Member

Choose a reason for hiding this comment

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

It surprised me that you didn't also have to call runForeground to have data updated by the foreground part of the task. It looks like FakeScheduler runs the foreground part for you though as it splits "background" and "foreground" on a slightly different level (the way the Scheduler was called really). Do you think we should change it so that runForeground would be required here? I could go either way on it really!

Copy link
Member Author

Choose a reason for hiding this comment

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

The real implementation works in such a way that the foreground part is triggered automatically once the background one is done so I think in tests it can be like that too unless we need to do something in between. For now, we don't need that so I think we can leave it as-is.

@dbemke
Copy link

dbemke commented Sep 12, 2023

@grzesiek2010 Can you define "more actionable”? When the new banner is shown – what does it mean displayed correctly? Is it connected with auto send options etc.? Does the PR include also the new snackbar "Look like you are offline…” ?

@dbemke
Copy link

dbemke commented Sep 12, 2023

It seems that the banner is refreshed only if the user reopens "Ready to send" ( goes to the main menu and back to "Ready to send").
When a first form was sent in a new project and there is one more form to send the banner is not shown unless "Ready to send" is reopened. The screenshot shows "Ready to send" after sending the first form in a project - no banner.
justSentFIRSTformNOTeopenRTS
If the user reopens "Ready to send" and sends some more forms e.g. in the screenshot the last form was just sent the banner doesn't change and there is still information about 1 form to send although it was already sent which might be very confusing for the user.
justSENTform

If don't keep activities setting is on the banner and the time is refreshed after sending without reopening "Ready to send"

@alyblenkin
Copy link
Collaborator

@grzesiek2010 Can you define "more actionable”? When the new banner is shown – what does it mean displayed correctly? Is it connected with auto send options etc.? Does the PR include also the new snackbar "Look like you are offline…” ?

@dbemke - By actionable we mean easier for the user to understand the status of when their forms were last sent and which ones still need to be actioned, so they can make an informed decision within this page. Right now it's hard for the user to remeber when they last sent their forms without leaving the page and checking their "Sent" forms. We've talked about having a snackbar to indicate when the user is offline however, it's a bit more complicated to implement, so we aren't showing it as part of this issue.

If the user reopens "Ready to send" and sends some more forms e.g. in the screenshot the last form was just sent the banner doesn't change and there is still information about 1 form to send although it was already sent which might be very confusing for the user. If don't keep activities setting is on the banner and the time is refreshed after sending without reopening "Ready to send"

Agreed, this would be a very confusing state. The activity banner should still be at the top to indicate the last sent form. The second line say "0 forms to send" instead of displaying the empty state with the banner.

@grzesiek2010
Copy link
Member Author

It seems that the banner is refreshed only if the user reopens "Ready to send" ( goes to the main menu and back to "Ready to send").

All those problems should be fixed.

@dbemke
Copy link

dbemke commented Sep 14, 2023

After the fix when the user sends forms in "Ready to send" the banner is updated but if a form was sent with a big sized file (sending takes some time) in "Start new form" and then goes to "Ready to send" after the form was sent there is still info about 1 form to send.

bigsizeFile

Steps to reproduce:

  • In "Start new form" send a form with a big file.
  • Go to "Ready to Send" (the form is still there being sent).
  • Wait until the form was sent and check the banner.

@grzesiek2010
Copy link
Member Author

@dbemke I'm not able to reproduce but I've added one change so please give it a try maybe now it works well.

@dbemke
Copy link

dbemke commented Sep 15, 2023

Just had a quick look at the fix and seems to be working well. We'll finish testing the PR after Central testing is finished.

@dbemke
Copy link

dbemke commented Sep 26, 2023

The banner takes too much space if RTL is applied. There isn't the information how many forms are ready to send.

Steps to reproduce:

  1. In Collect settings auto send is set to off and RTL language.
  2. Finalize some forms.
  3. Go to Ready to send
    bannerRTl

@grzesiek2010
Copy link
Member Author

The banner takes too much space if RTL is applied. There isn't the information how many forms are ready to send.

Fixed.

@srujner
Copy link

srujner commented Sep 26, 2023

Tested with Success!

Verified on device with Android 13

Verified cases:

  • Regression Check on Form lists;
  • Sending finalized Forms, Editing saved Forms, Viewing sent Forms, Deleting saved Forms;
  • All issues from comments has been fixed;
  • Very long list of forms
  • Sort by name, by date added
  • Change language and use sorting options
  • RTL language
  • Use search bar
  • Screen rotation
  • Try to multiclik on form list;
  • Light and Dark theme.

@dbemke
Copy link

dbemke commented Sep 26, 2023

Tested with Success!

Verified on device with Android 10

@grzesiek2010 grzesiek2010 merged commit ab1af33 into getodk:master Sep 26, 2023
6 checks passed
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.

Making the "Ready to Send" screen more actionable
6 participants