GSoC: Rewrite ODK Collect's widgets using the new "widget framework"

In ODK Collect, we've recently made changes to the app to try and improve its usability, aesthetics and also the UI code itself. This has included introducing new ways to define "question widgets" (see WIDGETS.md).

We now need to revise each of the existing widgets - this means updating their layout, code and tests. Steps that should be completed for each widget (there are 30+) are:

  1. Re-write (and potentially expand) the tests for the widget following the style in WIDGETS.md. As in the examples, the tests shouldn't end up extending from other test classes but we should definitely be using (and expanding on) the shared test helpers. If there are Espresso tests for the widget then these should be replaced by Robolectric tests. This is an opportunity to try and apply TDD/BDD style testing.
  2. The widget should add an implementation of onCreateAnswerView that replaces any calls to addAnswerView. As much as possible, the UI should be defined in XML rather than in Java.
  3. The actual design of the layout should be reviewed and improved if there are opportunities. Using this style guide and the Material Design docs can be helpful for this.
  4. TextView objects should be made to use our standard typography styles (found in typography.xml). If we don't have a custom style for something on the Material Typographic Scale then one should be added.
  5. Any components that can be converted to Material Components should be.

Of course if there are other things you feel like can be improved on or changed then we don't want to just stick to these steps! It'd also be good to look for opportunities where widgets/tests could be combined or inheritance could be replaced by composition/configuration. The goal here is to improve the widget code and improve their test coverage but in doing so it should be easier to both add and change widgets in the future.

Requirements: Android, Java
Repository: https://github.com/opendatakit/collect
Difficulty: Hard
Mentors: Callum Stott (@seadowg)

5 Likes

Hi @seadowg, the link for WIDGETS.md isn't working, it says "Oops! That page doesn’t exist or is private."

Whoooops. Fixed. Thanks for the heads up on that!

Hie @seadowg! I was looking at the project and what I inferred is that the work would be focussed on rewriting the widgets and replacing the test coverage with Roboelectric tests, as our goal is to make unit tests run faster.
Apart from this, we can also look into improving the UI of the widgets, following the collect style guidelines that are very compiled here, and making the use of material components wherever possible. I was also thinking whether we are allowed to make changes in the UI of the app as well or not, as I found that we can implement material components like app bar and navigation drawers, and there is a scope that after proper research it may add up to improve the user experience of collect.

There's always room for iterating on the UI! I'd actively encourage looking for opportunities for improvements when reworking the widget tests and layouts. That siad, as with any application with existing users, it's important to be careful making changes to UI/UX as they might disrupt existing workflows.

1 Like

Yes Thanks for replying @seadowg! I will take care of that and will go ahead after proper discussion.

Hi everyone!
I have written the draft proposal for the project. Thanks so much @seadowg for your valuable suggestions on my proposal initially. However, I am still in the process of improving my proposal. Any comments from your side are welcome.

Thanks for posting! I'll be able to have another look through by Monday afternoon (UK time)

1 Like

Hi, group!
My name is QiQin Zhao(go by Royce). This is my final draft proposal for the project. I would really appreciate if anyone could take a look and give me some feedbacks. Any comments are welcome! Thank you for your time.

@royceZhao the document isn't public. You need to make it so anyone with the link can view it (and comment so you can get feedback).

@seadowg Sorry for the inconvenience. I have changed it, you should be able to view it now.

[Not sure why my previous responses are labeled as flags]
@seadowg Thank you so much for your comments!!!
This is my bad. I know I have pasted the deadline to submit the final revised proposal. I am sorry that I remember a wrong deadline. I thought it due tonight 11PM, but it turns out be today 11AM.
But, I have made changes on my original proposal based on your advices. If you have time, would you like to take a look? I have heightened these changes with orange background.
Again, I apologize for my mistake.
I really like this project and hope to help contribute for the community.

Revised Proposal

Sorry I wasn't able to take a look as it was the middle of the night in my timezone (I'm in GMT+1 currently)