-
Notifications
You must be signed in to change notification settings - Fork 79
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
Create simple mobile UI to replicate CLI #63
Comments
I have used Kivy before and it's pretty neat. The kv file syntax for UI generation is a bit niche though and something new to learn for those wishing to contribute. As an idea, I would like to consider making a very simple Vue (or React) PWA that could load the Python functions here using Pyodide (I.e. Python in the web browser using WebAssembly - cutting edge stuff!). Lots of people know Python and JavaScript frameworks, making this reach a wider audience of developers that could contribute. A simple example displaying this functionality: https://github.com/francoislanc/pyodide-vuejs-app-example The PWA could then be used on web and mobile - any OS! One question: is using osm-fieldwork on web a desirable use case, or is mobile the only intended purpose? |
As the main purpose of this UI is to work offline, perhaps this requires further thought. Kivy may be the best choice after all. |
Is developing natively for each platform out of the question? That will be for Android and iOS? |
All the code is in Python. I guess it'd be possible to embed python in a flutter app to not get locked into one platform. Kivy and the python-for-android projects look like a common way to do this, but I'm open to suggestions. Right now I have to pull the files off my phone and convert them on my laptop. In many countries people only own a tablet, so it's a goal to to support mobile only mappers. I actually tried to get osm-fieldwork running under Termux recently, but Termux has issues with some of the dependencies. |
Another option could be WASM with Python code embedded in a JavaScript PWA. I'm not sure how native development in Kotlin or Swift could work with the Python code here. Open to ideas! 😄 |
Hi @spwoodcock I'm thinking of mocking a simple Kivy UI for this purpose. I want to start with a basic button list of each program. When a button is clicked, it should expand into a form for the required fields. |
This is the planned internship task for the Outreachy intern, so doing something like creating comprehensive test cases would be preferred, but of course you are free to try any task you may like 😄 |
Hi @spwoodcock , It's still buggy and needs a lot of work, and has no UI design yet, but it can generate forms for the modules based on simple configurations and can also execute the modules based on formdata, with a logging window inside the application that shows the output. More details and screenshots are here https://github.com/owolabioromidayo/osm-fieldwork-kivy-mock. Would appreciate any feedback : ) |
Neat! It's a good start 😄 There is the start of the kivy app under Screenshots are very useful, thanks. |
Thank you! I made the screen a bit too wide in the screenshots but the kivy UI is dynamic. I have exported it to my phone, and there are some minor UI bugs to be worked on there. Should I work on it further and maybe get a PR into the |
Oh cool, sounds great! It would be good if you can work on a branch on your fork & have a go with the config and build script I already made. If anything needs updating, feel free too. But please don't make a PR until the first round of outreachy is complete, as the candidate has not been selected yet. I know the UI is a pretty fun project, so no worries if you want to have a go at it. But it would be more valuable to the team to get some very comprehensive test cases for osm-fieldwork instead 🙏 we still need a lot more test coverage, particularly tests for edge cases. To help with that it might be useful to read the docs for this repo & well acquaint yourself with the ODK ecosystem, particularly ODK Central. |
Understood 🫡. It is fun, sorry I got carried away there. I was trying to find more test cases to write but I thought some files were already covered. Thank you for the quick response! |
I don't think there is value including the ODK communication classes to the mobile app (as this is basically FMTM). The main functionality I can think of that would be useful for the app are:
|
A UI would be nice for ODK -> OSM file format conversion.
Additional info:
The text was updated successfully, but these errors were encountered: