Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Social Login and login delight tweaks #5426

Merged
merged 24 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fc3542a
Extend Platform to support idpId for SSO flows
t3chguy Nov 19, 2020
a1351ea
Increase Dialog button mixin border-radius to 8px
t3chguy Nov 20, 2020
6f6e850
lowercase username placeholder in Password Login and Registration Form
t3chguy Nov 23, 2020
2263280
Improve no email warning during registration
t3chguy Nov 23, 2020
613710b
Iterate Auth copy
t3chguy Nov 23, 2020
1d53a5c
Initial support for MSC2858
t3chguy Nov 23, 2020
b1ca1eb
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into…
t3chguy Nov 24, 2020
f7d7182
Iterate Multi-SSO support
t3chguy Nov 24, 2020
2f64160
Remove backwards compatibility in ServerConfig for m.require_identity…
t3chguy Nov 24, 2020
225d541
Extend Field and InfoDialog with more configurability
t3chguy Nov 25, 2020
6a315e8
Improve auth error messages
t3chguy Nov 25, 2020
758b47c
Replace *ServerConfig and SignInToText with ServerPicker
t3chguy Nov 25, 2020
1b1c482
Iterate tests
t3chguy Nov 25, 2020
c408419
delint
t3chguy Nov 25, 2020
3bdedd7
fix another test
t3chguy Nov 25, 2020
8602545
Remove unused dialog, todo comments and other tiny tweaks
t3chguy Nov 26, 2020
5f03cbd
Iterate PR some more
t3chguy Nov 26, 2020
26e1cdb
Update i18n
t3chguy Dec 1, 2020
ba542f2
Merge branch 'develop' into t3chguy/socials
t3chguy Dec 1, 2020
eb25c39
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into…
t3chguy Dec 1, 2020
e0b6844
i18n
t3chguy Dec 1, 2020
d8e46c7
Merge remote-tracking branch 'origin/t3chguy/socials' into t3chguy/so…
t3chguy Dec 1, 2020
3fda7e3
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into…
t3chguy Dec 2, 2020
8593845
i18n
t3chguy Dec 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/views/dialogs/InfoDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default class InfoDialog extends React.Component {
onFinished: PropTypes.func,
hasCloseButton: PropTypes.bool,
onKeyDown: PropTypes.func,
fixedWidth: PropTypes.bool,
};

static defaultProps = {
Expand All @@ -54,6 +55,7 @@ export default class InfoDialog extends React.Component {
contentId='mx_Dialog_content'
hasCancel={this.props.hasCloseButton}
onKeyDown={this.props.onKeyDown}
fixedWidth={this.props.fixedWidth}
>
<div className={classNames("mx_Dialog_content", this.props.className)} id="mx_Dialog_content">
{ this.props.description }
Expand Down
27 changes: 20 additions & 7 deletions src/components/views/elements/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ interface IProps {
tooltipClassName?: string;
// If specified, an additional class name to apply to the field container
className?: string;
// On what events should validation occur; by default on all
validateOnFocus?: boolean;
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
validateOnBlur?: boolean;
validateOnChange?: boolean;
// All other props pass through to the <input>.
}

Expand Down Expand Up @@ -100,6 +104,9 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
public static readonly defaultProps = {
element: "input",
type: "text",
validateOnFocus: true,
validateOnBlur: true,
validateOnChange: true,
};

/*
Expand Down Expand Up @@ -137,17 +144,21 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
this.setState({
focused: true,
});
this.validate({
focused: true,
});
if (this.props.validateOnFocus) {
this.validate({
focused: true,
});
}
// Parent component may have supplied its own `onFocus` as well
if (this.props.onFocus) {
this.props.onFocus(ev);
}
};

private onChange = (ev) => {
this.validateOnChange();
if (this.props.validateOnChange) {
this.validateOnChange();
}
// Parent component may have supplied its own `onChange` as well
if (this.props.onChange) {
this.props.onChange(ev);
Expand All @@ -158,9 +169,11 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
this.setState({
focused: false,
});
this.validate({
focused: false,
});
if (this.props.validateOnBlur) {
this.validate({
focused: false,
});
}
// Parent component may have supplied its own `onBlur` as well
if (this.props.onBlur) {
this.props.onBlur(ev);
Expand Down