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

EULA link and checkbox for "send marketing messages" #273

Merged
merged 10 commits into from
Feb 6, 2024

Conversation

rnr
rnr previously approved these changes Feb 2, 2024
rnr
rnr previously approved these changes Feb 2, 2024
case .unknown:
Text("This field not support")
}
}
}

@ViewBuilder
private func plaintext(config: FieldConfiguration) -> some View {
Copy link
Contributor

Choose a reason for hiding this comment

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

the config parameter name is conflicting with self.config. How about renaming it to fieldConfig?

Comment on lines +88 to +92
.onAppear {
checkBox?.text = "\(sendMarketing)"
}
.onChange(of: sendMarketing) { newValue in
checkBox?.text = "\(newValue)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to assign boolean text to text of the checkbox? I've commented the code and it was working fine.

Comment on lines 35 to 39
.filter {
$0.field.required &&
!$0.field.isHonorCode &&
$0.field.type != .checkbox
}
Copy link
Contributor

@saeedbashir saeedbashir Feb 6, 2024

Choose a reason for hiding this comment

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

Please format it like

fields.filter {
            $0.field.required &&
            !$0.field.isHonorCode &&
            $0.field.type != .checkbox
        }

because at other places the same pattern is being used in this file.

$0.field.type == .checkbox
}
}
var nonRequiredFields: [FieldConfiguration] {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about renaming it to optionalFields?

@@ -12,6 +12,9 @@
"SIGN_IN.EMAIL_OR_USERNAME" = "Email or username";
"SIGN_IN.PASSWORD" = "Password";
"SIGN_IN.FORGOT_PASS_BTN" = "Forgot password?";
"SIGN_IN.AGREEMENT" = "By signing in to this app, you agree to the [%@ End User License Agreement](%@) and [%@ Terms of Service and Honor Code](%@) and vou acknowledge that edX and each Member process your personal data in
Copy link
Contributor

Choose a reason for hiding this comment

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

type vou it should be you and edX should be replaced platform name from config.

@@ -26,6 +29,8 @@
"SIGN_UP.SHOW_FIELDS" = "Show optional Fields";
"SIGN_UP.SUCCESS_SIGNIN_LABEL" = "You've successfully signed in.";
"SIGN_UP.SUCCESS_SIGNIN_SUBLABEL" = "We just need a little more information before you start learning.";
"SIGN_UP.AGREEMENT" = "By creating an account, you agree to the [%@ End User License Agreement](%@) and [%@ Terms of Service and Honor Code](%@) and vou acknowledge that edX and each Member process your personal data inaccordance with the [Privacy Policy.](%@)";
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -12,6 +12,7 @@ private enum AgreementKeys: String {
case tosURL = "TOS_URL"
case cookiePolicyURL = "COOKIE_POLICY_URL"
case dataSellContentURL = "DATA_SELL_CONSENT_URL"
case eulaURL = "EULA_URL"
Copy link
Contributor

Choose a reason for hiding this comment

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

As you are here, could you please make the changes that AgreementKeys implements RawStringExtractable so we have same pattern with all config parsing.

@volodymyr-chekyrta volodymyr-chekyrta merged commit 48029c9 into openedx:develop Feb 6, 2024
3 checks passed
@forgotvas forgotvas deleted the feat/eula branch June 20, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants