8000 BIT-157: Create account screen by jubie-livefront · Pull Request #28 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

BIT-157: Create account screen #28

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

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

jubie-livefront
Copy link
Collaborator
@jubie-livefront jubie-livefront commented Sep 12, 2023

🎟️ Tracking

BIT-157

🚧 Type of change

  • 🚀 New feature development

📔 Objective

This PR implements a draft of the create account page. The UI is not final, and will be further stylized in later PRs.
Also worth noting - functionality for the interactive buttons (toggles & show/hide password) will be handled in later PRs.

📋 Code changes

  • CreateAccountView: The UI of the create account screen.
  • CreateAccountProcessor, CreateAccountState, CreateAccountAction: Files used to support the functionality of the landing screen.

📸 Screenshots

Screenshot 2023-09-14 at 10 25 28 AM

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@bitwarden-bot
Copy link
bitwarden-bot commented Sep 12, 2023

Logo
Checkmarx One – Scan Summary & Detailsf0b8995f-8953-4c4d-b2af-c95b542a07bb

No New Or Fixed Issues Found

@github-actions
Copy link
Contributor
github-actions bot commented Sep 12, 2023
1 Warning
⚠️ Total coverage less than 80%

Code coverage

Total coverage: 47.97%

Powered by Slather

Generated by 🚫 Danger

Copy link
Member
@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

Awesome!
🎨 Could the screenshot be uploaded again? There seems to be a problem with that, or at least it's not showing on my end.
🎨 Also, could the strings be updated to use the localization file keys given that #27 has now been merged?

Comment on lines 58 to 74
/// The password strength indicator and label indicating the importance of remembering the master password.
private var passwordStrengthIndicator: some View {
VStack {
HStack {
Text("Important: Your master password cannot be recovered if you forget it! 12 characters minimum.")
.foregroundColor(Color(asset: Asset.Colors.textSecondary))
.font(.system(.footnote))

Spacer()
}

RoundedRectangle(cornerRadius: 2)
.frame(height: 8)
.foregroundColor(Color(asset: Asset.Colors.separatorOpaque))
}
.padding(.bottom, 16)
}
Copy link
Member

Choose a reason for hiding this comment

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

🎨 Could this be extracted to its own file so it can be a reusable control? Additionally, it could internally update the color based on the strength level (I guess this color changing will happen in a different PR).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call 👍 And correct, the color changing will be handled in a different PR.

Comment on lines 15 to 28
func makeBody(configuration: Configuration) -> some View {
HStack {
VStack {
Toggle(configuration)
.labelsHidden()
.tint(Color(asset: Asset.Colors.primaryBitwarden))
}
.padding(.trailing, 4)

description()

Spacer()
}
}
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Is the VStack necessary? Given that it has only one child.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! Removing the VStack.

private var passwordStrengthIndicator: some View {
VStack {
HStack {
Text("Important: Your master password cannot be recovered if you forget it! 12 characters minimum.")
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Could we move the 12 as a constant of default minimum characters for password declared somewhere else? It will be reused in other places in the app.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done! ✅

@jubie-livefront
Copy link
Collaborator Author
jubie-livefront commented Sep 14, 2023

Awesome!
🎨 Could the screenshot be uploaded again? There seems to be a problem with that, or at least it's not showing on my end.
🎨 Also, could the strings be updated to use the localization file keys given that #27 has now been merged?

Yes, absolutely! Please let me know if you're still having issues seeing the newly uploaded screenshot.

- Creates PasswordStrengthIndicator view
- Updates strings to used localized string
- Creates Constants enum for constant values
@@ -138,7 +120,7 @@ struct CreateAccountView: View {
DescriptiveToggleStyle(
description: {
VStack(alignment: .leading) {
Text("By activating this switch you agree to the following:")
Text(Localizations.acceptPolicies)
.foregroundColor(Color(asset: Asset.Colors.textSecondary))
.font(.system(.footnote))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing the "Terms of Service, Privacy Policy" string will be handled in BIT-271 when those links are implemented. @fedemkr

Copy link
Collaborator
@matt-livefront matt-livefront left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉

@jubie-livefront jubie-livefront merged commit 7997124 into main Sep 15, 2023
@jubie-livefront jubie-livefront deleted the jubie/BIT-157-create-account-form branch September 15, 2023 14:09
vvolkgang pushed a commit that referenced this pull request Feb 24, 2025
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
0