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

refactored the fragments of SetupUpiPinActivity to compose screen #1600

Closed

Conversation

NiranjanNlc
Copy link
Contributor

@NiranjanNlc NiranjanNlc commented Mar 31, 2024

Issue Fix

Fixes #1596 and #1597

Screenshots

Screenshot.mp4

Description

Using the bottom to top approach ,
I was refacoring the fragments of SetupUpiPinActivity to consume compose screen , now migrated whole SetupUpiPinActivity to compose screen
I could not go up to bank activity , so I am testing UI by making some change on the existing activity only .

  • 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

  • If you have multiple commits please combine them into one commit by squashing them.

@PratyushSingh07
Copy link
Collaborator

@NiranjanNlc adding to @therajanmaurya review, please take into account the following points as well:

  • always for the commit & PR guidelines and make sure you have formatted your code before pushing it here.

  • The last box/field is of improper shape. Please fix this
    image

  • Use MfOutlinedTextField instead of Outlined text field. As you can see that the focused color isn't black
    image\

  • Refactor BasicTextField into a resusable component. I can see that you have used it at lot of places

  • The heading is absent from this screen. Please use MifosTopBar
    image

  • Dont add unnecessary spaces between lines . Omit whitespaces wherever possible

@NiranjanNlc NiranjanNlc force-pushed the setUpUpi_FragmentsToComposeScreen branch from 0250bd1 to f195a90 Compare April 22, 2024 00:34
@NiranjanNlc
Copy link
Contributor Author

@PratyushSingh07 ,
I stick with OutlineText rather than MfsOutlinedText , since i had to make custom visual transformation.
Others done as suggested .

@NiranjanNlc
Copy link
Contributor Author

@therajanmaurya can this be reviewed again??

@NiranjanNlc NiranjanNlc marked this pull request as draft April 22, 2024 01:07
@NiranjanNlc NiranjanNlc marked this pull request as ready for review April 22, 2024 01:07
@PratyushSingh07 PratyushSingh07 marked this pull request as draft May 30, 2024 20:06
@NiranjanNlc NiranjanNlc force-pushed the setUpUpi_FragmentsToComposeScreen branch from 2f3cb89 to 77aef4c Compare June 3, 2024 04:22
@NiranjanNlc NiranjanNlc force-pushed the setUpUpi_FragmentsToComposeScreen branch from 77aef4c to f72f7d7 Compare June 3, 2024 05:55
@NiranjanNlc NiranjanNlc marked this pull request as ready for review June 3, 2024 06:06
.fillMaxWidth()
.padding(8.dp), verticalAlignment = Alignment.Bottom
) {
BasicTextField(modifier = Modifier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use MFoutlined text field?

}

@Composable
fun CharView2(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give an appropriate name

Comment on lines +169 to +171
fun showToast(context: Context, message: String?) {
Toaster.showToast(context, message)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use compose snackbar

Comment on lines +44 to +54
fun setupUpiPinSuccess(mSetupUpiPin: String?) {
setUpViewModel.setupUpiPin(bankAccountDetails, mSetupUpiPin)
bankAccountDetails!!.isUpiEnabled = true
bankAccountDetails!!.upiPin = mSetupUpiPin
Toaster.showToast(this, Constants.UPI_PIN_SETUP_COMPLETED_SUCCESSFULLY)
val intent = Intent()
intent.putExtra(Constants.UPDATED_BANK_ACCOUNT, bankAccountDetails)
intent.putExtra(Constants.INDEX, index)
setResult(RESULT_OK, intent)
finish()
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should have been handled in the compose UI itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: migrate fragment of SetUpUpiPinActivity to compose screen
4 participants