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

Adding the AddParentEmailModal #33976

Merged
merged 6 commits into from Apr 6, 2020
Merged

Adding the AddParentEmailModal #33976

merged 6 commits into from Apr 6, 2020

Conversation

bethanyaconnor
Copy link
Contributor

@bethanyaconnor bethanyaconnor commented Apr 1, 2020

First PR for the modal to add a parent email -- I'll follow up with a second one to add the controller. Screenshots below from Storybook so ignore the dark grey background.

spec

On load:
Screenshot 2020-04-01 at 12 11 23 PM

Invalid email:
Screenshot 2020-04-01 at 12 11 31 PM

Valid inputs:
Screenshot 2020-04-01 at 12 11 42 PM

Saving:
Screenshot 2020-04-01 at 12 11 48 PM

Links

Testing story

  • Unit tests
  • Storybook

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@bethanyaconnor bethanyaconnor marked this pull request as ready for review April 1, 2020 19:17
@bethanyaconnor bethanyaconnor requested a review from a team as a code owner April 1, 2020 19:17
</label>
<div>
<div style={styles.radioButton}>
<label style={styles.input}>
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we have labels without text, and why are the labels with the text not associated with their respective inputs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The labels without text are removed.

I'm not sure what you mean by the second bit.

Copy link
Contributor

@Hamms Hamms Apr 1, 2020

Choose a reason for hiding this comment

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

Labels can (edit: and should) be explicitly associated with the inputs they are labeling to support screen readers and provide some interfacing assistance (clicking the label focuses the input, etc).

You can either wrap the input in the label, like

<label>
  <input />
  {i18n.yes()}
</label>

or give the input an id and the label a matching for attribute, like

<input id="yes" />
<label for="yes">{i18n.yes()}</label>

See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label for more info

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I used the htmlFor attribute (React's version of for) for the labels

@dju90
Copy link
Contributor

dju90 commented Apr 1, 2020

We updated the text of the email opt-in this morning: do you mind changing it to "Can we email you with occasional updates on your child’s progress and projects, and updates about their course and computer science? (See our privacy policy)"

@bethanyaconnor
Copy link
Contributor Author

New screenshot with updated copy:
Screenshot 2020-04-02 at 9 56 06 AM

Copy link
Member

@daynew daynew left a comment

Choose a reason for hiding this comment

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

LGTM but I'm no react expert!

@bethanyaconnor bethanyaconnor merged commit 689680a into staging Apr 6, 2020
@bethanyaconnor bethanyaconnor deleted the parent-info-dialog branch April 6, 2020 18:29
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.

None yet

4 participants