-
Notifications
You must be signed in to change notification settings - Fork 718
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
feat(feature:about): Migrate about module to CMP #2761
base: kmp-impl
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HekmatullahAmin And there are a lot of compose library available to show open source library usages like google OSS use those instead, we no need to use WebView anymore
feature/about/src/commonMain/kotlin/org/mifos/mobile/feature/about/ui/PrivacyPolicyScreen.kt
Outdated
Show resolved
Hide resolved
feature/about/src/commonMain/kotlin/org/mifos/mobile/feature/about/ui/PrivacyPolicyScreen.kt
Outdated
Show resolved
Hide resolved
@HekmatullahAmin we can use this https://github.com/mikepenz/AboutLibraries |
d9c013a
to
e420472
Compare
Hi @niyajali , I’ve implemented the changes as you suggested. Regarding the openUrl() function, it’s actually an expect function that provides platform-specific implementations to navigate to the given URL. About the library you mentioned, I brought it up during the stand-up, and Mr. @therajanmaurya advised against adding any external libraries for now. As for the openUrl implementation, I’ve commented it out because it uses Intent, which requires a Context. For a small app I worked on previously, I passed an Application instance, and it worked. However, for mifos-mobile, I can’t pass the AndroidApp instance to the openUrl function. Another potential approach could be adding a custom Application for the about module and updating its manifest, but I don’t think that would be the best solution either. Let me know your thoughts! |
I want to keep the ticket scope as less as possible and we will implement the intent library in different ticket |
fdbbc8e
to
7739aa6
Compare
- Implemented `openUrl` function for every platform. - Used `Intent` for Android to handle URL opening. - Added platform-specific implementations for Native, Desktop, and wasmJs.
7739aa6
to
6aa7d84
Compare
@niyajali If you're happy with this PR, please approve it so it can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, here's the few things we have to maintain all over the project, make sure you've followed the same..
@HekmatullahAmin @Nagarjuna0033 @revanthkumarJ
-
LazyColumn State:
- Always pass the
LazyColumn
state as a function parameter wherever it is used.
- Always pass the
-
Keys for LazyColumn Items:
- Ensure that every item in a
LazyColumn
has a uniquekey
provided.
- Ensure that every item in a
-
Consistent Padding/Spacing:
- Use
16.dp
for padding and spacing consistently across the project where applicable.
- Use
-
Named Arguments:
- Always use named arguments when calling functions/class to improve readability and maintainability.
-
State Hoisting:
- Maintain and hoist state from the top-level composable to ensure better state management.
And use the above mentioned library for licence, I’ll discuss with the @therajanmaurya and explain the situation. No need to worry about this; I’ll handle it. Once the changes are implemented, let me know, and we’ll proceed with merging this PR.
|
||
import android.app.Application | ||
|
||
class AndroidApp : Application() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we're creating another application for one feature, we can't do that..
Hi @niyajali , Thanks for reviewing my PR! I’ve made sure to apply the necessary changes based on the project guidelines you shared. Specifically: I really appreciate you sharing these best practices. Regarding the License, this is not in the scope of my PR. As seen in the aboutUsNavGraph, the navigateToOssLicense function is simply assigned and will be handled elsewhere. So, this part doesn't require changes from my side. But I will work on another PR and will implement the library you suggested me. As for why I created another application, that was just for testing purposes. In my PR, I had commented them out, and now, I have deleted them entirely. ![]() |
Fixes - Jira-#126
Didn't create a Jira ticket, click here to create new.
Please Add Screenshots If there are any UI changes.
AboutScreen.mp4
Please make sure these boxes are checked before submitting your pull request - thanks!
Run the static analysis check
./gradlew check
orci-prepush.sh
to make sure you didn't break anythingIf you have multiple commits please combine them into one commit by squashing them.