Commit Graph

15572 Commits (11828c40e546a5a1485857b37c1aab6d7731eba9)

Author SHA1 Message Date
J. Ryan Stinnett aec14e64fa Throttle validation in response to user input
This avoids the case of the password complexity progress jumping wildly for
every character you type.
2019-04-25 14:29:10 +01:00
J. Ryan Stinnett 67d7091dcd Password score progress should be full width in tooltip 2019-04-25 14:29:10 +01:00
J. Ryan Stinnett a20d23daf3 Remove older password length check
Now that we have a fancier password complexity check, remove the older minimum
length to avoid the feeling of two password style guides fighting each other.
2019-04-25 14:29:10 +01:00
J. Ryan Stinnett 4f41161a47 Check password complexity during registration
This adds a password complexity rule during registration to require strong
passwords. This is based on the `zxcvbn` module that we already use for key
backup passphrases.

In addition, this also tweaks validation more generally to allow rules to be
async functions.
2019-04-25 14:29:10 +01:00
J. Ryan Stinnett 008ca3543b Migrate passwords on registration to new validation
In addition to migrating password fields, this also removes the remaining
support for old-style validation in registration now that all checks have been
converted.
2019-04-25 14:29:10 +01:00
J. Ryan Stinnett aaf745ae2a Migrate phone number on registration to new validation 2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 9064875312 Migrate email on registration to new validation 2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 1cbb4be6f7 Add support for validating more strictly at submit time
When submitting a form, we want to validate more strictly to check for empty
values that might be required. A separate mode is used since we want to ignore
this issue when visiting a field one by one to enter data.

As an example, we convert the pre-existing logic for the username requirement
using this new support.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett a7c37733b8 Rebalance margins in validation tooltip 2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 778697abf1 Use input element's value directly
Since we're keeping the input as a ref anyway, let's use that rather than
requiring the value to be passed to `validate`. This allows others to call
`validate` as well.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 5d95c31875 Focus the first invalid field
This adjusts the submission step to focus the first invalid field and redisplay
validation. This also rearranges the older style field error handling on
registration which is slated for removal once we convert all fields to the new
style.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 62a01e7a37 Track per-field validity with new-style validation
This updates the registration form to include the new-style validation state
when deciding whether the entire form is valid overall.

In addition, this tweaks the validation helper to take functions instead of
strings for translated text. This allows the validation helper to be create once
per component instead of once every render, which improves performance.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 37e09b5569 Add check and x icons for validation feedback
Adds icons from the Feather set with the same color as text. Tweaks validation
item spacing to match the design.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 87f13cfe55 Add focus handling to validation
Update the Field component and validation handling to show / hide validation
feedback on focus / blur events.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 338d83ab55 Add validation feedback helper
This adds a general validation feedback mechanism for checking input values. An
initial example is wired up for the username input on registration.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett 37ecf2a623 Remove unused ref from Field component
The `fieldInput` ref is no longer used now that we have controlled components
everywhere.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett a803af3a88
Merge pull request #2931 from jryans/connect-key-backup-more
Also say "Connect ..." on remaining key backup buttons
2019-04-24 15:59:51 +01:00
J. Ryan Stinnett 4784d5e9f2 Also say "Connect ..." on remaining key backup buttons
This updates the remaining buttons shown when a backup exists but is not trusted
so that they all now say "Connect this device to Key Backup" instead of "Use Key
Backup".

This is a follow up to https://github.com/matrix-org/matrix-react-sdk/pull/2917
and was agreed with Riot iOS team
https://github.com/vector-im/riot-ios/pull/2375#issuecomment-485788118.

Fixes https://github.com/vector-im/riot-web/issues/9542
2019-04-24 11:05:27 +01:00
J. Ryan Stinnett 2ddaa06e67 Rebuild strings 2019-04-24 11:01:32 +01:00
J. Ryan Stinnett 0e5e622dc9
Merge pull request #2929 from z3ntu/user-select
Mark a few CSS classes as not selectable
2019-04-23 18:57:56 +01:00
Luca Weiss 12f92c49a6
Mark a few CSS classes as not selectable
Should be enough to make copy-pasting not a nightmare.

For vector-im/riot-web#7460

Also remove an instance where the vendor prefixes were used, but a build
step adds those automatically

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
2019-04-23 19:52:48 +02:00
J. Ryan Stinnett 9917bed942
Merge pull request #2883 from YaoiFangirl420/cleanup_message_composer
Cleanup message composer render() method
2019-04-18 10:14:01 +01:00
Bruno Windels 0fbe10a816
Merge pull request #2925 from matrix-org/bwindels/stylepreviewbar
Redesigned room preview bar
2019-04-18 08:50:56 +00:00
Bruno Windels faecceb3b4 remove manual order so component order follows markup order 2019-04-18 09:20:26 +02:00
Bruno Windels dd911d18cb dont show right panel when previewing a room without invite, as its empty 2019-04-17 19:29:39 +02:00
Bruno Windels 0a463472b3 update prop types (and fix typo) 2019-04-17 19:05:52 +02:00
Bruno Windels 190143ca6c dispatch for user screen 2019-04-17 18:26:07 +02:00
Bruno Windels d5cc835a93 PR feedback 2019-04-17 18:23:49 +02:00
Travis Ralston 9f494fcc58
Merge pull request #2907 from matrix-org/anoa/no_big_pills_pls
Prevent user pills containing only emoji from embiggening
2019-04-17 10:15:16 -06:00
J. Ryan Stinnett 232fd8656b
Merge pull request #2923 from rosston/alt-enter-mac
Make alt-enter insert new line on macOS
2019-04-17 16:19:57 +01:00
J. Ryan Stinnett 65784afb91
Merge pull request #2924 from jryans/password-on-server-name
Test `defaultServerName` before showing it on forgot password
2019-04-17 15:23:03 +01:00
Bruno Windels c5986395ef propagate env to e2e tests so they can get correct branch of e2e tests 2019-04-17 14:13:12 +02:00
Bruno Windels 66e10e904d remove obsolete translations 2019-04-17 11:46:20 +02:00
Bruno Windels 8e750e18d7 add class for message case for e2e tests 2019-04-17 11:46:04 +02:00
Bruno Windels 22874f62ab Merge branch 'develop' into bwindels/stylepreviewbar 2019-04-17 11:06:21 +02:00
Bruno Windels 1100320351 make non-member inviter name also bold 2019-04-17 11:02:58 +02:00
Bruno Windels 86620839ae make username clickable 2019-04-17 10:57:45 +02:00
J. Ryan Stinnett adc23faf4b Test `defaultServerName` before showing it on forgot password
The Forgot Password screen wasn't checking the default server name for a value
before showing it, leading to a possible "Your Matrix account on <blank>"
message.

Fixes https://github.com/vector-im/riot-web/issues/9507
2019-04-17 09:35:45 +01:00
Bruno Windels 8a371080d7 colored inviter name and layout 2019-04-17 10:22:35 +02:00
Bruno Windels eeaa7143ac move name coloring out of sender profile
so we can reuse it in room preview bar
2019-04-17 10:21:30 +02:00
Travis Ralston e0c976e96e Merge branch 'develop' into cleanup_message_composer 2019-04-16 11:18:52 -06:00
Bruno Windels 56ade1ead5 WIP on showing inviter avatar 2019-04-16 18:48:47 +02:00
Bruno Windels f9a2b76966 show room name where available when header isn't visible (no preview) 2019-04-16 17:50:20 +02:00
Bruno Windels eeb9b4b2e3 don't show re-join upon kicked when we know you can't 2019-04-16 17:23:45 +02:00
Bruno Windels dbb73439e4 also return Joining when internally busy looking something up 2019-04-16 17:23:24 +02:00
Bruno Windels 523311b50c saner order for message case detection (can't be joining when kicked) 2019-04-16 17:23:01 +02:00
Travis Ralston 65020a56c1
Merge pull request #2922 from matrix-org/travis/merge-config
Add a function to append/overwrite objects in the config on the fly
2019-04-16 09:14:24 -06:00
Bruno Windels e40757a801 make sure long subtitles dont overflow 2019-04-16 16:19:50 +02:00
Ross Brandes 15e68c3ba1
Make alt-enter insert new line on macOS
Alt-enter is a common macOS shortcut for inserting a new line in an
input that has a separate action tied to the enter key.

Signed-off-by: Ross Brandes <ross.brandes@gmail.com>
2019-04-15 21:15:38 -04:00
Travis Ralston a11cf88e07 Add a function to append/overwrite objects in the config on the fly
Intended to be used to overwrite settings which may be calculated rather than provided.
2019-04-15 14:46:00 -06:00