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

Generalize the code so that app code can be used for many releases/cities #293

Closed
christophhanser opened this issue Jul 18, 2019 · 12 comments
Labels
Quality Improvement Refactoring, Linting etc.

Comments

@christophhanser
Copy link

Until now, we branched for Accra.
It is however to have one core of code for a generic app and the differences between Accra and Cochabamba and further cities are configured in specific files.

@amenk
Copy link
Contributor

amenk commented Sep 23, 2019

See https://github.com/trufi-association/trufi-app/compare/accra

First step would be to pull the differing hard coded constants to a properties file, then build flavors could be created - one for each city. But of course this doesn't scale very well to lots and lots of cities. Also it might make sense to do this on country level, not on city level.

@mdoelker
Copy link
Contributor

Plan is to build a "core" flutter package that can then be included by concrete implementations that only provide assets and configuration. This is something we hope to have more progress on over the upcoming weeks.

@RaimundWege
Copy link
Contributor

RaimundWege commented Oct 7, 2019

I will start with the trufi_core implementation in a few days. The sooner the better because every new features or fixes will be have an impact on the complexity of this task. My plan is to copy (or fork to get the latest updates) the current trufi app repository and rebuild it as dart package. On this way we can keep the git history. The trufi_core package will contain an example App which will be actually a copy of the trufi app but with the trufi_core as dependency so its just a lightweight container. When this works I will create a branch in the trufi_app repository an replace all logic with our new trufi_core package.

@amenk
Copy link
Contributor

amenk commented Oct 13, 2019

@RaimundWege
Sounds good. When is this planned to happen? Before, during or after the Hackathon? As you plan to work with a copy of the repository, a freeze to prevent bigger modifications of the main repo might be necessary to avoid the need for redoing changes after the split.

@amenk
Copy link
Contributor

amenk commented Oct 13, 2019

" The trufi_core package will contain " (I understand you meant trufi_app here ?)

@RaimundWege
Copy link
Contributor

@amenk yesterday I've spent some time to maintain the trufi app e.g. AndroidX migration and dependency updates. In this week I will start to transform the app to a flutter plugin with an example app. I hope I will finish this task before our hackathon starts but no guarantee. To get the latest changes I will do that in a new branch until its done.

@RaimundWege
Copy link
Contributor

I've a first compiling version of the new trufi_core plugin. You can follow the progress in #338.

@amenk
Copy link
Contributor

amenk commented Oct 19, 2019

Nice! I manged to compile as well, but it cannot load assets/images/from_marker.svg - but you probably know this already.

I started drafting some points that seem to be necessary to build upton trufi-core (will there be something like trufi-template as well?)

https://gist.github.com/amenk/d7524a717140102eda65f434e2fa1b4e

amenk added a commit to AddisMap/trufi-core that referenced this issue Nov 2, 2019
amenk added a commit to AddisMap/trufi-core that referenced this issue Nov 2, 2019
@amenk
Copy link
Contributor

amenk commented Nov 15, 2019

@RaimundWege I think it's better to discuss trufi-association/trotro-app#4 here?

@amenk
Copy link
Contributor

amenk commented Nov 20, 2019

There is a trufi icon in the "Read our Blog" menu in the app menu. How can this be customized in a app using trufi_core?

@RaimundWege
Copy link
Contributor

@amenk good point. We should pass an icon into our core widget.

@md-weber md-weber added the Quality Improvement Refactoring, Linting etc. label Apr 15, 2021
@md-weber
Copy link
Contributor

Regarding we have now the core in place and separated I believe this Issue can be closed, feel free to open it again if something is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Quality Improvement Refactoring, Linting etc.
Projects
None yet
Development

No branches or pull requests

5 participants