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

Display total "Time remaining counter" instead of single timer for single test #487

Merged
merged 13 commits into from
Feb 23, 2022

Conversation

aanorbel
Copy link
Member

Fixes ooni/probe#1936

Proposed Changes

  • Set TestRunBroadRequestReceiver.runtime to summation of TestAsyncTask.testSuites runtime.
  • Set progress max value to equal previousTestsRuntime + currentTestProgress
  • Calculate timeLeft from new values available.
. . .
Screenshot_20220217_142916 Screenshot_20220217_143358 Screenshot_20220217_143413

Copy link
Contributor

@bassosimone bassosimone left a comment

Choose a reason for hiding this comment

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

My review could be broadly split into two parts:

  1. I have asked for changes that overall seek to improve naming and documentation;

  2. I have highlighted a bunch of places where I think we could possibly refactor and make the code a bit more abstract. I think they make sense but my limited Android skills could be failing me and I may be actually providing suggestions that make increase rather than decrease the complexity of the code. In which case, please, let me know and I'll keep in mind the lessons learned today for future reviews.

Thank you for preparing this diff!

@hellais
Copy link
Member

hellais commented Feb 21, 2022

The PR looks good to me. I did some light testing of it and I noticed the following two issues (that I believe are not related to this PR though):

When in dark mode the experimental icon has the wrong background color:

Screenshot 2022-02-21 at 12 08 27

When in dark mode the status bar has the wrong color:

Screenshot 2022-02-21 at 12 08 22

@aanorbel
Copy link
Member Author

Hi @hellais , I will check the coloring for the progress bar.

@aanorbel
Copy link
Member Author

Screenshot 2022-02-21 at 12 08 27

Hello @hellais , this problem comes specifically from ExperimentalSuite() and anim/experimental.json which is not theme aware. I would have to make various changes at a later time to make the resource change with theme.

It is worth noting that this problem exists in all previous versions of the app.

@hellais
Copy link
Member

hellais commented Feb 23, 2022

Ok I documented the animation background color issue here: ooni/probe#2038. For the rest we can proceed with merging this!

@aanorbel
Copy link
Member Author

Sure

Copy link
Contributor

@bassosimone bassosimone left a comment

Choose a reason for hiding this comment

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

🐳

aanorbel and others added 2 commits February 23, 2022 21:15
* abstracted progress max to task

* modified TestRunBroadRequestReceiver to publish progress to livedata component
@aanorbel aanorbel merged commit c92aa8e into master Feb 23, 2022
@aanorbel aanorbel deleted the issues/1936 branch February 23, 2022 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display total "Time remaining counter" instead of single timer for single test
3 participants