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

Featute/Sign Up UI #58

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Featute/Sign Up UI #58

wants to merge 2 commits into from

Conversation

juanRodriguez17
Copy link

ISSUE [#6]

Description

  • Add Sign Up page in compose

Tasks

  • Add SignUpScreen
  • Add SignUp state to listen for changes and determine when show errors or not, and the enabling of the SIGN UP button
  • Add SignUpViewModel

Preview

device-2023-08-16-150431.mp4

Notes

&& password.isNotEmpty() && !showPasswordError &&
confirmPassword.isNotEmpty() && !showConfirmPasswordError
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

please don't forget to add a new line here

@Preview
@Composable
fun SignUpScreen(
viewModel: SignUpViewModel = SignUpViewModel(),
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we have any DI framework into the base yet? if so, might be better to use it. What do you think?

<string name="sign_up_name_error">Name not valid</string>
<string name="sign_up_confirm_password_label">Confirm Password</string>
<string name="sign_up_confirm_password_error">Passwords don\'t match</string>
<string name="sign_up_button">SIGN UP</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please capitalize only first letter Sign up. Then use .uppercase() in the code if needed

Copy link
Contributor

@hrodrick hrodrick left a comment

Choose a reason for hiding this comment

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

Nice work! Just left a comment

Comment on lines +20 to +21
import com.rootstrap.androidcomposebase.ui.pages.sign_up.SignUpScreen
import com.rootstrap.androidcomposebase.ui.pages.sign_up.SignUpViewModel
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this if not needed.

Comment on lines +4 to +11
val name: String = "",
val showNameError: Boolean = false,
val email: String = "",
val showEmailError: Boolean = false,
val password: String = "",
val showPasswordError: Boolean = false,
val confirmPassword: String = "",
val showConfirmPasswordError: Boolean = false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd rename:
name -> nameInput
email -> emailInput
password -> passwordInput
confirmPassword -> confirmPasswordInput

import kotlinx.coroutines.flow.update
import java.util.regex.Pattern

class SignUpViewModel : ViewModel() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

before merging wait for the previous PR
#57
and reuse the state management logic,
if need more context write to @agustinkoll-rootstrap

Copy link
Collaborator

@amaury901130 amaury901130 left a comment

Choose a reason for hiding this comment

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

wait for the previous PR
#57

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.

4 participants