diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 1e09f94c4..024a3556e 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,26 +1 @@ -**Summary:** - -Summarize your issue in one sentence (what goes wrong, what did you expect to happen). - -**Steps to reproduce:** - -How can we reproduce the issue? - -**Expected behaviour:** - -What did you expect the app to do? - -**Observed behaviour:** - -What did you see instead? Describe your issue in detail here. - -**Device and Android version:** - -What make and model device (e.g., Samsung Galaxy S3) did you encounter this on? What Android -version (e.g., Android 4.0 Ice Cream Sandwich or Android 6.0 Marshmallow) are you running? Is it - the stock -version from the manufacturer or a custom ROM? - -**Screenshots:** - -Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher. \ No newline at end of file +### We're moving towards to use [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/) for issue tracking, and Join our [slack](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) channel `mifos-mobile` to discuss all things about Mifos Mobile development. and do not cross post your messages in multiple channels. ask your question in the appropriate channel. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f3fedaf4e..e190f528d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,16 @@ -Fixes #Issue_Number +Fixes - [Jira-#Issue_Number](https://mifosforge.jira.com/browse/MM-) + +Didn't create a Jira ticket, click [here](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/) to create new. Please Add Screenshots If there are any UI changes. -Please make sure these boxes are checked before submitting your pull request - thanks! +| Before | After | +|--------------------------------------------|----------------------------------------| +| | | -- [ ] Apply the `AndroidStyle.xml` style template to your code in Android Studio. -- [ ] Run the unit tests with `./gradlew check` to make sure you didn't break anything +Please make sure these boxes are checked before submitting your pull request - thanks! + +- [ ] Run the static analysis check `./gradlew check` or `ci-prepush.sh` to make sure you didn't break anything - [ ] If you have multiple commits please combine them into one commit by squashing them. \ No newline at end of file diff --git a/.github/workflows/feature_branch_ci.yml b/.github/workflows/feature_branch_ci.yml deleted file mode 100644 index 49117f243..000000000 --- a/.github/workflows/feature_branch_ci.yml +++ /dev/null @@ -1,186 +0,0 @@ -name: Workflow for feature branches - -on: - push: - branches: - - '*' - - '!development' - - '!master' - -concurrency: - group: build-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: read - pull-requests: write - -jobs: - setup: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - - uses: gradle/actions/setup-gradle@v4 - - - name: Cache Gradle and build outputs - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - build - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: ${{ runner.os }}-gradle- - - checks: - needs: setup - runs-on: ubuntu-latest - strategy: - matrix: - check: [ build_logic, spotless, detekt ] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - - name: Run ${{ matrix.check }} - id: run_check - run: | - if [ "${{ matrix.check }}" = "build_logic" ]; then - ./gradlew check -p build-logic - elif [ "${{ matrix.check }}" = "spotless" ]; then - ./gradlew spotlessCheck --no-configuration-cache --no-daemon - elif [ "${{ matrix.check }}" = "detekt" ]; then - ./gradlew detekt - fi - - - name: Upload Detekt Reports - if: ${{ matrix.check == 'detekt' && steps.run_check.outcome == 'success' }} - uses: actions/upload-artifact@v4 - with: - name: detekt-reports - path: | - **/build/reports/detekt/detekt.md - - - - - - dependency_guard: - needs: setup - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - - - name: Check Dependency Guard - id: dependencyguard_verify - continue-on-error: true - run: ./gradlew dependencyGuard - - - name: Prevent updating Dependency Guard baselines if this is a fork - id: checkfork_dependencyguard - if: steps.dependencyguard_verify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository - run: | - echo "::error::Dependency Guard failed, please update baselines with: ./gradlew dependencyGuardBaseline" && exit 1 - - # Runs if previous job failed - - name: Generate new Dependency Guard baselines if verification failed and it's a PR - id: dependencyguard_baseline - if: steps.dependencyguard_verify.outcome == 'failure' && github.event_name == 'pull_request' - run: | - ./gradlew dependencyGuardBaseline - - - name: Push new Dependency Guard baselines if available - uses: stefanzweifel/git-auto-commit-action@v5 - if: steps.dependencyguard_baseline.outcome == 'success' - with: - file_pattern: '**/dependencies/*.txt' - disable_globbing: true - commit_message: "🤖 Updates baselines for Dependency Guard" - - tests_and_lint: - needs: setup - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - - - name: Run tests - run: | - ./gradlew testDebug :lint:test :androidApp:lintRelease :lint:lint - - - name: Upload reports - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-and-lint-reports - path: | - **/build/reports/lint-results-*.html - **/build/test-results/test*UnitTest/**.xml - - - # Add `createProdDebugUnitTestCoverageReport` if we ever add JVM tests for prod - - name: Generate coverage reports for Debug variants (only API 30) - run: ./gradlew createDebugCombinedCoverageReport - - - name: Upload test reports - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-reports-${{ matrix.api-level }} - path: '**/build/reports/androidTests' - - - name: Display local test coverage (only API 30) - id: jacoco - uses: madrapps/jacoco-report@v1.6.1 - with: - title: Combined test coverage report - min-coverage-overall: 40 - min-coverage-changed-files: 60 - paths: | - ${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Upload local coverage reports (XML + HTML) (only API 30) - uses: actions/upload-artifact@v4 - with: - name: coverage-reports - if-no-files-found: error - compression-level: 1 - overwrite: false - path: '**/build/reports/jacoco/' - - build: - needs: [ checks, dependency_guard, tests_and_lint ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - - - name: Build APKs - run: ./gradlew :androidApp:assembleDebug - - - name: Check badging - run: ./gradlew :androidApp:checkReleaseBadging - - - name: Upload APKs - uses: actions/upload-artifact@v4 - with: - name: APKs - path: '**/build/outputs/apk/**/*.apk' \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..97e6d23ab --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,134 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[Slack](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA). + +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7dacd258..a7a36f495 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,85 +1,185 @@ -# Contribute to Self Service Android Application +# Contributing to Mifos Mobile -This guide details how to use issues and pull requests to improve Self Service Android Application. +Welcome to the Mifos Mobile contributing guide. This comprehensive document outlines how to contribute effectively to improve the Self Service Android Application, from reporting issues to submitting code changes. -## Building Self-Service Android Application. +The [Open Source Guides](https://opensource.guide/) website has a collection of resources for individuals, communities, and companies who want to learn how to run and contribute to an open source project. Contributors and people new to open source alike will find the following guides especially useful: -There are two steps, you have to follow when you are building the self-service android application. +- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) +- [Building Welcoming Communities](https://opensource.guide/building-community/) -1. Setting up the [Android Studio](https://github.com/openMF/self-service-app/wiki/Android-Studio-Setup) +## Code of Conduct -2. [Building up Code](https://github.com/openMF/self-service-app/wiki/Building-up-Code) on Android Studio. +Mifos has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated. -## Configure remotes +> \[!Note] +> **We're moving to Jira for issue tracking. Please use [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/?filter=allissues&jql=project%20%3D%20%22MM%22%20ORDER%20BY%20created%20DESC) for issue tracking.** +> **And Join our [slack](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) channel `mifos-mobile` to discuss all things about Mifos Mobile development. and do not cross post your messages in multiple channels. ask your question in the appropriate channel.** -When a repository is cloned, it has a default remote called `origin` that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you should add another remote named `upstream`: +## Get Involved -The easiest way is to use the https URL: +There are many ways to contribute to Mifos Mobile, and many of them do not involve writing any code. Here's a few ideas to get started: -`git remote add upstream https://github.com/openMF/self-service-app.git` +- Simply start using Mifos Mobile. Go through the [Getting Started](https://github.com/openMF/mifos-mobile/wiki) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#issues). +- Look through the [open issues](https://github.com/openMF/mifos-mobile/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](#triaging-issues-and-pull-requests). +- If you find an issue you would like to fix, [open a pull request](#pull-requests). Issues tagged as [_Good first issue_](https://github.com/openMF/mifos-mobile/labels/good%20first%20issue) are a good place to get started. +- Read through the [Wiki](https://github.com/openMF/mifos-mobile/wiki). If you find anything that is confusing or can be improved, you can click "Edit this page" at the top of most page, which takes you to the GitHub interface to make and propose changes. -or if you have ssh set up you can use that URL instead: +Contributions are very welcome. If you think you need help planning your contribution, please ping us on Slack at [#mifos-mobile](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) and let us know you are looking for a bit of help. -`git remote add upstream git@github.com:openMF/self-service-app.git` +### Join our Slack Channel & Jira -## Commit Style Guide +We have the [`#mifos-mobile`](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) channel on [Slack](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) to discuss all things about Mifos Mobile development. You can also be of great help by helping other users in the [`#mobile](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) channel. +also join [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/?filter=allissues&jql=project%20%3D%20%22MM%22%20ORDER%20BY%20created%20DESC) for issue tracking. - Mifos Self-Service Android application have a set of [Commit Style Guidelines](https://github.com/openMF/self-service-app/wiki/Commit-Style-Guide). we strictly following this guideline to track every change, any bug fixes, any enhancement, and any new feature addition. we are suggesting you, please follow these guidelines to help us managing every commit. +[![Slack](https://img.shields.io/badge/Slack-4A154B?style=flat-square&logo=slack&logoColor=white)](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) +[![Jira](https://img.shields.io/badge/jira-%230A0FFF.svg?style=flat-square&logo=jira&logoColor=white)](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/?filter=allissues&jql=project%20%3D%20%22MM%22%20ORDER%20BY%20created%20DESC) -## Issue tracker -The [issue tracker](https://github.com/openMF/self-service-app/issues) is only for obvious bugs, misbehavior, & feature requests in the latest stable or development release of Self-Service Android Application. When submitting an issue please conform to the issue submission guidelines listed below. Not all issues will be addressed and your issue is more likely to be addressed if you submit a pull request which partially or fully addresses the issue. +### Triaging Issues and Pull Requests -### Issue tracker guidelines +One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in. -**[Search](https://github.com/openMF/self-service-app/search?q=&ref=cmdform&type=Issues)** for similar entries before submitting your own, there's a good chance somebody else had the same issue or feature request. Show your support with `+1:` and/or join the discussion. Please submit issues in the following format and feature requests in a similar format: +- Ask for more information if you believe the issue does not provide all the details required to solve it. +- Suggest [labels](https://github.com/openMF/mifos-mobile/labels) that can help categorize issues. +- Flag issues that are stale or that should be closed. +- Ask for test plans and review code. -1. **Summary:** Summarize your issue in one sentence (what goes wrong, what did you expect to happen) -2. **Steps to reproduce:** How can we reproduce the issue? -3. **Expected behavior:** What did you expect the app to do? -4. **Observed behavior:** What did you see instead? Describe your issue in detail here. -5. **Device and Android version:** What make and model device (e.g., Samsung Galaxy S3) did you encounter this on? What Android version (e.g., Android 4.0 Ice Cream Sandwich) are you running? Is it the stock version from the manufacturer or a custom ROM? -5. **Screenshots:** Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher. -6. **Possible fixes**: If you can, link to the line of code that might be responsible for the problem. +## Our Development Process -## Pull requests +We uses [GitHub](https://github.com/openMF/mifos-mobile), [Slack](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA), [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/?filter=allissues&jql=project%20%3D%20%22MM%22%20ORDER%20BY%20created%20DESC) for issue tracking and development. The core team will be working directly there. All changes will be public from the beginning. -We welcome pull requests with fixes and improvements to Self-Service Android Application code, tests, and/or documentation. The features we would really like a pull request for are [open issues with the enhancements label](https://github.com/openMF/self-service-app/issues?labels=enhancement&page=1&state=open). +All pull requests will be checked by the continuous integration system, GitHub actions. There are unit tests, end-to-end tests, performance tests, style tests, and much more. -### Pull request guidelines +### Branch Organization -If you can, please submit a pull request with the fix or improvements including tests. +Mifos Mobile has one primary branch `development` and we use feature branches with deploy previews to deliver new features with pull requests. -* Fork the project on GitHub -* Create a feature branch -* Write tests and code -* Run the CheckStyle, PMD, Findbugs code analysis tools with the `gradlew check` to make sure you have written quality code. -* If you have multiple commits please combine them into one commit by squashing them. See [this article](http://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit) and [this Git documentation](http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) for instructions. -* Please follow the commit message [guidelines](https://github.com/openMF/self-service-app/wiki/Commit-Style-Guide) before making PR. -* Push the commit to your fork -* Submit a pull request with a motive for your change and the method you used to achieve it with the `development` branch. +## Issues -We will accept pull requests if: +When [opening a new issue](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/?filter=allissues&jql=project%20%3D%20%22MM%22%20ORDER%20BY%20created%20DESC), always make sure to fill out the issue template. **This step is very important!** Not doing so may result in your issue not being managed in a timely fashion. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template. -* The code has proper tests and all tests pass (or it is a test exposing a failure in existing code) -* It doesn't break any existing functionality -* It's quality code that conforms to standard style guides and best practices -* The description includes a motive for your change and the method you used to achieve it -* It is not a catch-all pull request but rather fixes a specific issue or implements a specific feature -* If it makes changes to the UI the pull request should include screenshots -* It is a single commit (please use `git rebase -i` to squash commits) +**Please don't use the GitHub issue tracker for questions.** If you have questions about using Mifos Mobile, use of our [slack channel](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA), and we will do our best to answer your questions. -All your pull requests must pass the CI build only then, it will be allowed to merge. -Sometimes, when the build doesn't pass you can use these commands in your local terminal and check for the errors,
+### Bugs -**We've commited to use Material3 design in our project. And added lint check for not to use any M2 libraries in our project.
** -**And when adding new library, please make sure to follow the naming convention and place in sequential order(A->Z).
** +We use [Jira](https://mifosforge.jira.com/jira/software/c/projects/MOBILE/boards/57) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you are certain this is a new, unreported bug, you can submit a [bug report](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=bug%2Cstatus%3A+needs+triage&template=bug.yml). -In MacOS, Windows or Linux, you should run the following commands before opening a PR, and make sure to pass all the commands: +- **One issue, one bug:** Please report a single bug per issue. +- **Provide reproduction steps:** List all the steps necessary to reproduce the issue. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort. + +If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend filing an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue. + +### Feature requests + +If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, +you can open a ticket on [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/). Alternatively, you can use the [GitHub](https://docusaurus.io/feature-requests) for more casual feature requests and gain enough traction before proposing on Jira. + +### Proposals + +If you intend to make any non-trivial changes to existing implementations, we recommend filing an issue with the [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/). This lets us reach an agreement on your proposal before you put significant effort into it. These types of issues should be rare. + +### Claiming issues + +We have a list of [beginner-friendly issues](https://github.com/openMF/mifos-mobile/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) to help you get your feet wet in the Mifos Mobile codebase and familiar with our contribution process. This is a great place to get started. + +Apart from the `good first issue`, the following labels are also worth looking at: + +- [`help wanted`](https://github.com/openMF/mifos-mobile/labels/help%20wanted): if you have specific knowledge in one domain, working on these issues can make your expertise shine. +- [`jira`](https://mifosforge.jira.com/jira/software/c/projects/MOBILE/boards/57): if you are looking for a specific issue, you can find it here. + +If you want to work on any of these issues, just drop a message saying "I'd like to work on this", and we will assign the issue to you and update the issue's status as "claimed". **You are expected to send a pull request within seven days** after that, so we can still delegate the issue to someone else if you are unavailable. + + +![jira-create-issue](https://github.com/user-attachments/assets/f2440bc1-a7d2-4815-92d3-549a72983df6) + +> \[!Note] +> To know more about [Jira](https://www.atlassian.com/software/jira/guides/getting-started/basics#step-4-create-an-issue) and how to create an issue, click [here](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/) + +## Development + +### Pre-requisites +- Install [Android Studio](https://developer.android.com/studio) +- Install [Git](https://git-scm.com/downloads) +- Install JDK 17 or higher + +For more information, see the [Development Setup](https://github.com/openMF/mifos-mobile/wiki/Set-up-an-environment) guide. + +### Building the Code + +Before you begin, you should have already downloaded the Android Studio SDK and set it up correctly. You can find a guide on how to do this here: [Setting up Android Studio](http://developer.android.com/sdk/installing/index.html?pkg=studio). + +To Setup the project, follow the steps below: +- [Fork the Repository](https://github.com/openMF/mifos-mobile/wiki/Project-Setup#step-1-fork-the-repository) +- [Clone Your Forked Repository on Android Studio](https://github.com/openMF/mifos-mobile/wiki/Project-Setup#step-2-clone-your-forked-repository) +- [Set Up Your Development Branch](https://github.com/openMF/mifos-mobile/wiki/Project-Setup#step-3-set-up-your-development-branch) + +### Code Conventions + +- **Most important: Look around.** Match the style you see used in the rest of the project. This includes formatting, naming files, naming things in code, naming things in documentation, etc. +- "Attractive" +- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most stylistic problems. If you are working locally, they should automatically fix some issues during every git commit. +- **For documentation**: Do not wrap lines at 80 characters - configure your editor to soft-wrap when editing documentation. + +Don't worry too much about styles in general—the maintainers will help you fix them as they review your code. + +## Pull Requests + +So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at. -**In order to enhance our development process, we have implemented Git hooks in our project. -To install these hooks locally, simply run the command `./gradlew installGitHooks`. -This will ensure that the Git hooks are installed on your local machine.**
+Working on your first Pull Request? You can learn how from this free video series: + +[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) + +Please make sure the following is done when submitting a pull request: + +1. **Keep your PR small.** Small pull requests (~300 lines of diff) are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. +2. **Use descriptive titles.** It is recommended to follow this [commit message style](#semantic-commit-messages). +3. **Test your changes.** Describe your [**test plan**](#test-plan) in your pull request description. + +All pull requests should be opened against the `development` branch. + +We have a lot of integration systems that run automated tests to guard against mistakes. The maintainers will also review your code and fix obvious issues for you. These systems' duty is to make you worry as little about the chores as possible. Your code contributions are more important than sticking to any procedures, although completing the checklist will surely save everyone's time. + +### Semantic Commit Messages + +See how a minor change to your commit message style can make you a better programmer. + +Format: `(): ` + +`` is optional. If your change is specific to one/two packages, consider adding the scope. Scopes should be brief but recognizable, e.g. `content-docs`, `theme-classic`, `core` + +The various types of commits: + +- `feat`: a new API or behavior **for the end user**. +- `fix`: a bug fix **for the end user**. +- `docs`: a change to the website or other Markdown documents in our repo. +- `refactor`: a change to production code that leads to no behavior difference, e.g. splitting files, renaming internal variables, improving code style... +- `test`: adding missing tests, refactoring tests; no production code change. +- `chore`: upgrading dependencies, releasing new versions... Chores that are **regularly done** for maintenance purposes. +- `misc`: anything else that doesn't change production code, yet is not `test` or `chore`. e.g. updating GitHub actions workflow. + +Do not get too stressed about PR titles, however. Your PR will be squash-merged and your commit to the `main` branch will get the title of your PR, so commits within a branch don't need to be semantically named. The maintainers will help you get the PR title right, and we also have a PR label system that doesn't equate with the commit message types. Your code is more important than conventions! + +Example: + +``` +feat(core): allow overriding of webpack config +^--^^----^ ^------------^ +| | | +| | +-> Summary in present tense. Use lower case not title case! +| | +| +-> The package(s) that this change affected. +| ++-------> Type: see above for the list we use. +``` + +### Test Plan + +A good test plan has the exact commands you ran and their output and provides screenshots or videos if the pull request changes UI. + +Tests are integrated into our continuous integration system, so you don't always need to run local tests. However, for significant code changes, it saves both your and the maintainers' time if you can do exhaustive tests locally first to make sure your PR is in good shape. There are many types of tests: + +In MacOS, Windows or Linux, you should run the following commands before opening a PR, and make sure to pass all the commands: * `./gradlew check -p build-logic` this checks build-logic configured properly.
* `./gradlew spotlessApply --no-configuration-cache` an check and apply formatting to any file.
@@ -89,23 +189,4 @@ This will ensure that the Git hooks are installed on your local machine.**
* `./gradlew build` to build the project.
* `./gradlew updateReleaseBadging` to update the badging for the project.
-*Or Run the `ci-prepush.sh` or `ci-prepush.bat` script to run all the above commands in one go.* - -### Best Practices for reporting or requesting for Issues/Enhancements: - - Follow the Issue Template while creating the issue. - - Include Screenshots if any (especially for UI related issues) - - For UI enhancements or workflows, include mockups to get a clear idea. - -### Best Practices for assigning an issue: -- If you would like to work on an issue, inform in the issue ticket by commenting on it. -- Please be sure that you are able to reproduce the issue, before working on it. If not, please ask for clarification by commenting or asking the issue creator. - -Note: Please do not work on issues which are already being worked on by another contributor. We don't encourage creating multiple pull requests for the same issue. Also, please allow the assigned person some days to work on the issue ( The time might vary depending on the difficulty). If there is no progress after the deadline, please comment on the issue asking the contributor whether he/she is still working on it. If there is no reply, then feel free to work on the issue. - - -### Best Practices to send Pull Requests: - - Follow the Pull request template. - - Commit messages should follow this template: `fix # - ` - - Pull request title shoud follow this template: `fix: ` - - Squash all your commits to a single commit. - - Create a new branch before adding and committing your changes ( This allows you to send multiple Pull Requests ) +*Or Run the `ci-prepush.sh` or `ci-prepush.bat` script to run all required checks in sequence.* diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/README.md b/README.md index acfb15803..20012708d 100644 --- a/README.md +++ b/README.md @@ -1,114 +1,71 @@ -

- -

- - +
+Mifos Mobile # Mifos-Mobile Android Application for MifosX An Android Application built on top of the MifosX Self-Service platform for end-user customers to view/transact on the accounts and loans they hold. Data visible to customers will be a sub-set of what staff can see. This is a native Android Application written in Kotlin. - -### Status - -| Master | Development | Chat | -|------------|-----------------|-----------------| -| ![Mifos-Mobile CI[Master]](https://github.com/openMF/mifos-mobile/workflows/Workflow%20for%20master/development%20branches/badge.svg?branch=master) | ![Mifos-Mobile CI[Development]](https://github.com/openMF/mifos-mobile/workflows/Workflow%20for%20master/development%20branches/badge.svg?branch=development) |[![Join the chat at https://mifos.slack.com/](https://img.shields.io/badge/Join%20Our%20Community-Slack-blue)](https://mifos.slack.com/)| - - -## Join Us on Slack - -Mifos boasts an active and vibrant contributor community, Please join us on [slack](https://join.slack.com/t/mifos/shared_invite/zt-2f4nr6tk3-ZJlHMi1lc0R19FFEHxdvng). Once you've joined the mifos slack community, please join the `#mifos-mobile` channel to engage with mifos-mobile development. If you encounter any difficulties joining our Slack channel, please don't hesitate to open an issue. This will allow us to assist you promptly or send you an invitation. - - - -## How to Contribute - -This is an OpenSource project and we would be happy to see new contributors. The issues should be raised via the GitHub issue tracker. -For Issue tracker guidelines please click here. All fixes should be proposed via pull requests. -For pull request guidelines please click here. For commit style guidelines please click here. - -### Branch Policy - -We have the following branches : - -* **development** - All the contributions should be pushed to this branch. If you're making a contribution, - you are supposed to make a pull request to _development_. - Please make sure it passes a build check on Github Workflows CI. - - It is advisable to clone only the development branch using the following command: +![Kotlin](https://img.shields.io/badge/kotlin-%237F52FF.svg?style=flat-square&logo=kotlin&logoColor=white) +![Kotlin Multiplatform](https://img.shields.io/badge/Kotlin%20Multiplatform-4c8d3f?style=flat-square&logo=kotlin&logoColor=white) +![Android](https://img.shields.io/badge/Android-3DDC84?style=flat-square&logo=android&logoColor=white) - `git clone -b ` +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) +[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/openMF/mifos-mobile/blob/development/LICENSE) +[![GitHub release](https://img.shields.io/github/release/Naereen/StrapDown.js.svg)](https://github.com/openMF/mifos-mobile/releases/) +[![GitHub issues](https://img.shields.io/github/issues/Naereen/StrapDown.js.svg)](https://github.com/openMF/mifos-mobile/issues/) - With Git 1.7.10 and later, add --single-branch to prevent fetching of all branches. Example, with development branch: +[![Workflow for master/development branches](https://github.com/openMF/mifos-mobile/actions/workflows/master_dev_ci.yml/badge.svg)](https://github.com/openMF/mifos-mobile/actions/workflows/master_dev_ci.yml) +[![Slack](https://img.shields.io/badge/Slack-4A154B?style=flat-square&logo=slack&logoColor=white)](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) +[![Jira](https://img.shields.io/badge/jira-%230A0FFF.svg?style=flat-square&logo=jira&logoColor=white)](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/?filter=allissues&jql=project%20%3D%20%22MM%22%20ORDER%20BY%20created%20DESC) - `git clone -b development --single-branch https://github.com/username/mifos-mobile.git` +
-* **ui-redesign** - All the contributions related to redesigning of the app should be pushed to this branch. If you're making a contribution, - you are supposed to make a pull request to _ui-redesign_. - Please make sure it passes a build check on Github Workflows CI. - - This branch will be merged with the development branch once the redesign is complete. - -* **master** - The master branch contains all the stable and bug-free working code. The development branch once complete will be merged with this branch. +> \[!Note] +> **We're moving towards to Jira for issue tracking. Please use [Jira](https://mifosforge.jira.com/jira/software/c/projects/MM/issues/?filter=allissues&jql=project%20%3D%20%22MM%22%20ORDER%20BY%20created%20DESC) for issue tracking.** +> **And Join our [slack](https://join.slack.com/t/mifos/shared_invite/zt-2wvi9t82t-DuSBdqdQVOY9fsqsLjkKPA) community channel `mifos-mobile` to discuss all things about Mifos Mobile development, and keep discussions focused and avoid cross-posting across channels.** ### Demo credentials -Fineract Instance: gsoc.mifos.community - -Username: `mifos` - -Password: `password` - -### Instruction to get the latest APK - -To get the latest apk of master/development branch from Github Artifacts, follow these steps: -1. Go to to the [Actions](https://github.com/openMF/mifos-mobile/actions?query=workflow%3A%22Workflow+for+master%2Fdevelopment+branches%22+event%3Apush) tab of this repository. -2. Select the latest workflow for master/development branch. -3. Click on hyperlink 'mifos-mobile' in Artifacts section. -4. Extract the downloaded file and get the apk. - -## Development Setup +- **Fineract Instance**: `gsoc.mifos.community` +- **Username**: `mifos` +- **Password**: `password` -Before you begin, you should have already downloaded the Android Studio SDK and set it up correctly. You can find a guide on how to do this here: [Setting up Android Studio](http://developer.android.com/sdk/installing/index.html?pkg=studio). +### How to Contribute +Thank you for your interest in contributing to the Mifos Mobile project by Mifos! We welcome all contributions and encourage you to follow these guidelines to ensure a smooth and efficient collaboration process. +To get started, please refer to the [Contribution Guide](https://github.com/openMF/mifos-mobile/wiki/Contribution-Guide) for detailed instructions on how to contribute to the project. -## Building the Code - -1. Clone the repository using HTTP: git clone https://github.com/openMF/mifos-mobile.git - -2. Open Android Studio. - -3. Click on 'Open an existing Android Studio project' - -4. Browse to the directory where you cloned the mifos-mobile repo and click OK. - -5. Let Android Studio import the project. +### Branch Policy +For development purposes, always pull from the **development** branch, as all contributions and updates are merged into this branch. Upon completion of development, changes are subsequently merged into the **master** branch, which represents the stable and bug-free version of the code. -6. Build the application in your device by clicking run button. +### Development Setup +Please refer to the [Development Setup Guide](https://github.com/openMF/mifos-mobile/wiki/Set-up-an-environment) for detailed instructions on configuring the development environment. -## Wiki +### Committing Your Changes +After making changes in your local repository, you will need to commit them to your GitHub repository. +If you are unfamiliar with the process of committing changes, please refer to the [Committing Your Changes](https://github.com/openMF/mifos-mobile/wiki/Committing-Your-Changes) guide. -View the [wiki](https://github.com/openMF/self-service-app/wiki) to see pages that provide details on the project. +### Squashing Your Commits +To ensure a clean and organized Git history, contributors are encouraged to squash their commits before merging. Instructions on how to squash commits can be found in the [Squashing Your Commits](https://github.com/openMF/mifos-mobile/wiki/Squashing-Your-Commits) guide. -## Specification +### Resolving Merge Conflicts +Occasionally, merge conflicts may arise when your pull request is being reviewed. These conflicts need to be resolved manually. +To learn how to resolve merge conflicts, please refer to the [Solving Merge Conflicts](https://github.com/openMF/mifos-mobile/wiki/Solving-Merge-Conflicts) guide. -See the [requirements](https://github.com/openMF/self-service-app/wiki/Design-&-Requirements) for an initial design mockup and documentation on the Fineract API. +### Instructions to Get the Latest APK -## PaymentHub Usecases +To download the latest APK navigate to the latest release [here](https://github.com/openMF/mifos-mobile/releases), and download the APK file from the assets section. -For Payment Hub usecases, check this [documentation](https://mifos.gitbook.io/docs/payment-hub-ee/overview/payment-hub-apis). Mifos Mobile utilises medium connector of Payment Hub. +### Wiki +To know more about the project details and architecture guidelines, visit our [Wiki](https://github.com/openMF/mifos-mobile/wiki). -## Note +### Code of Conduct -The UI design is currently being revamped. New design can be found [here](https://docs.google.com/presentation/d/1yFR19vGlKW-amxzGms8TgPzd1jWkrALPFcaC85EyYpw/edit#slide=id.g6c6ccd991d_0_42) +Mifos has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated. -## Contributors +### Contributors Special thanks to the incredible code contributors who continue to drive this project forward. - + mifos-mobile-contributors diff --git a/androidApp/release-badging.txt b/androidApp/release-badging.txt index e62dff556..43dd96603 100644 --- a/androidApp/release-badging.txt +++ b/androidApp/release-badging.txt @@ -1,4 +1,4 @@ -package: name='org.mifos.mobile' versionCode='1' versionName='0.0.1-beta.0.1445+20240906T175646Z' platformBuildVersionName='14' platformBuildVersionCode='34' compileSdkVersion='34' compileSdkVersionCodename='14' +package: name='org.mifos.mobile' versionCode='1' versionName='2024.12.5-beta.0.5' platformBuildVersionName='14' platformBuildVersionCode='34' compileSdkVersion='34' compileSdkVersionCodename='14' sdkVersion:'26' targetSdkVersion:'34' uses-permission: name='android.permission.INTERNET' @@ -12,7 +12,6 @@ uses-permission: name='android.permission.VIBRATE' uses-permission: name='android.permission.POST_NOTIFICATIONS' uses-permission: name='android.permission.WAKE_LOCK' uses-permission: name='com.google.android.c2dm.permission.RECEIVE' -uses-permission: name='com.google.android.gms.permission.AD_ID' uses-permission: name='android.permission.ACCESS_ADSERVICES_ATTRIBUTION' uses-permission: name='android.permission.ACCESS_ADSERVICES_AD_ID' uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE' diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt index 5fa0cdc27..66d7682cb 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt @@ -76,7 +76,7 @@ class HomeActivity : ComponentActivity() { val navController = rememberNavController() val appState = rememberMifosMobileState(networkMonitor = networkMonitor) - val darkTheme= isSystemInDarkTheme() + val darkTheme = isSystemInDarkTheme() val navDestination = when (uiState) { is Success -> if ((uiState as Success).userData.isAuthenticated) { PASSCODE_GRAPH diff --git a/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Color.kt b/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Color.kt index b08093456..dae68a6ce 100644 --- a/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Color.kt +++ b/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Color.kt @@ -37,4 +37,4 @@ val LightSurfaceTint = Color(0xFF325CA8) val DarkSurfaceTint = Color(0xFFAEC6FF) val lightScrim = Color(0x80FFFFFF) -val darkScrim = Color(0x80000000) \ No newline at end of file +val darkScrim = Color(0x80000000)