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

Portal frontend 31 #32

Merged
merged 29 commits into from
Aug 14, 2024
Merged

Portal frontend 31 #32

merged 29 commits into from
Aug 14, 2024

Conversation

SKairinos
Copy link
Contributor

@SKairinos SKairinos commented Aug 13, 2024

This change is Reviewable

Copy link
Contributor Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 9 files reviewed, 1 unresolved discussion


src/pages/register/IndyForm.tsx line 43 at r1 (raw file):

        }}
        onSubmit={submitForm(createIndependentUser, {
          exclude: ["password_repeat"],

also exclude meets_criteria

Copy link
Contributor Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 9 files reviewed, 2 unresolved discussions


src/pages/register/TeacherForm.tsx line 40 at r1 (raw file):

        }}
        onSubmit={submitForm(createTeacher, {
          exclude: ["user.password_repeat"],

also exclude meets_criteria

Copy link
Contributor Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 9 files reviewed, 5 unresolved discussions


src/pages/studentAccount/UpdateAccountForm.tsx line 94 at r1 (raw file):

              "Your account details have been changed successfully.",
            ]
            if (values.email !== initialValues.email) {

use isDirty helper


src/pages/studentAccount/UpdateAccountForm.tsx line 100 at r1 (raw file):

              )
            }
            if (values.password !== initialValues.password) {

use isDirty helper


src/pages/studentAccount/UpdateAccountForm.tsx line 125 at r1 (raw file):

            ? studentPasswordSchema()
            : indyPasswordSchema()
          if (form.values.current_password !== initialValues.current_password) {

use isDirty helper

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 9 files at r1, 5 of 5 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @SKairinos)


src/pages/studentAccount/DeleteAccountForm.tsx line 100 at r2 (raw file):

      <Typography fontWeight="bold">
        This can&apos;t be reversed. All classes you&apos;ve created will be
        permanently erased.

This second sentence doesn't make sense in the context of an indy deleting their account. Remove it from here for now and we'll make it conditional when we make this a reusable component later.

Code quote:

        This can&apos;t be reversed. All classes you&apos;ve created will be
        permanently erased.

src/pages/studentAccount/DeleteAccountForm.tsx line 129 at r2 (raw file):

              formControlLabelProps={{
                label:
                  "Please remove me from the newsletter and marketing emails too.",

Food for thought (we can make another task for it): Do we want to make this checkbox part of the form only if the user is subscribed to the newsletter? It doesn't make much sense to have it there if they're not subscribed, it might confuse or worry them.


src/pages/studentAccount/UpdateAccountForm.tsx line 137 at r2 (raw file):

                <>
                  <forms.FirstNameField />
                  <LastNameField />

why this and not forms.LastNameField?

Copy link
Contributor Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @faucomte97)


src/pages/studentAccount/DeleteAccountForm.tsx line 100 at r2 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

This second sentence doesn't make sense in the context of an indy deleting their account. Remove it from here for now and we'll make it conditional when we make this a reusable component later.

Done.


src/pages/studentAccount/DeleteAccountForm.tsx line 129 at r2 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

Food for thought (we can make another task for it): Do we want to make this checkbox part of the form only if the user is subscribed to the newsletter? It doesn't make much sense to have it there if they're not subscribed, it might confuse or worry them.

Totally agreed. I've added a TODO and ticket in the backlog.


src/pages/studentAccount/UpdateAccountForm.tsx line 137 at r2 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

why this and not forms.LastNameField?

forms. only contains form components that are reusable [across services]. forms.FirstNameField will use in the portal service and SSO service. However, LastNameField is a component only found in portal (see imports above)

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SKairinos)

@SKairinos SKairinos merged commit 50b4fa9 into development Aug 14, 2024
5 of 7 checks passed
@SKairinos SKairinos deleted the portal-frontend-31 branch August 14, 2024 11:01
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.

2 participants