-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Entry flow UX changes - Part 2 #177
Changes from all commits
d5a863f
f54b9ab
4d3d41c
a1e8873
61317a2
cacd212
5c70143
2d83a81
a078de4
3cabf1f
bd26dbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
.exited-panel { | ||
position: absolute; | ||
color: white; | ||
background-color: black; | ||
width: 100%; | ||
height: 100%; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,13 @@ class ProfileEntryPanel extends Component { | |
|
||
saveStateAndFinish = e => { | ||
e.preventDefault(); | ||
const has_agreed_to_terms = this.props.store.state.profile.has_agreed_to_terms || this.state.has_agreed_to_terms; | ||
if (!has_agreed_to_terms) return; | ||
const { has_changed_name, display_name } = this.props.store.state.profile; | ||
const hasChangedName = has_changed_name || this.state.display_name !== display_name; | ||
this.props.store.update({ | ||
profile: { | ||
has_agreed_to_terms: true, | ||
has_changed_name: hasChangedName, | ||
...this.state | ||
} | ||
|
@@ -74,20 +77,47 @@ class ProfileEntryPanel extends Component { | |
<div className="profile-entry__subtitle"> | ||
<FormattedMessage id="profile.header" /> | ||
</div> | ||
<input | ||
className="profile-entry__form-field-text" | ||
value={this.state.display_name} | ||
onChange={e => this.setState({ display_name: e.target.value })} | ||
required | ||
pattern={SCHEMA.definitions.profile.properties.display_name.pattern} | ||
title={formatMessage({ id: "profile.display_name.validation_warning" })} | ||
ref={inp => (this.nameInput = inp)} | ||
/> | ||
<label> | ||
<span className="profile-entry__display-name-label"> | ||
<FormattedMessage id="profile.display_name.label" /> | ||
</span> | ||
<input | ||
className="profile-entry__form-field-text" | ||
value={this.state.display_name} | ||
onChange={e => this.setState({ display_name: e.target.value })} | ||
required | ||
pattern={SCHEMA.definitions.profile.properties.display_name.pattern} | ||
title={formatMessage({ id: "profile.display_name.validation_warning" })} | ||
ref={inp => (this.nameInput = inp)} | ||
/> | ||
</label> | ||
<iframe | ||
className="profile-entry__avatar-selector" | ||
src={`/${this.props.htmlPrefix}avatar-selector.html#avatar_id=${this.state.avatar_id}`} | ||
ref={ifr => (this.avatarSelector = ifr)} | ||
/> | ||
{!this.props.store.state.profile.has_agreed_to_terms && ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gfodor does it make sense to hide the term checkbox after the user has agreed to it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think so |
||
<label className="profile-entry__terms"> | ||
<input | ||
className="profile-entry__terms__checkbox" | ||
type="checkbox" | ||
required | ||
value={this.state.has_agreed_to_terms} | ||
onChange={e => this.setState({ has_agreed_to_terms: e.target.checked })} | ||
/> | ||
<span className="profile-entry__terms__text"> | ||
<FormattedMessage id="profile.terms.prefix" />{" "} | ||
<a className="profile-entry__terms__link" target="_blank" href="/privacy"> | ||
<FormattedMessage id="profile.terms.privacy" /> | ||
</a>{" "} | ||
<FormattedMessage id="profile.terms.conjunction" />{" "} | ||
<a className="profile-entry__terms__link" target="_blank" href="/terms"> | ||
<FormattedMessage id="profile.terms.tou" /> | ||
</a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gfodor Linking to non-existent |
||
<FormattedMessage id="profile.terms.suffix" /> | ||
</span> | ||
</label> | ||
)} | ||
<input className="profile-entry__form-submit" type="submit" value={formatMessage({ id: "profile.save" })} /> | ||
</div> | ||
</form> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gfodor Terms copy needs your review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we can send this to legal once they get things wrapped up