Commit Graph

12449 Commits (6e3b06f3646b83d4e271e51ca894c718474d8c27)

Author SHA1 Message Date
Travis Ralston b6e027f5cb Make password resets use server config objects
Like registration, the idea is that the object is passed around between components so they can take details they need.
2019-05-03 11:33:36 -06:00
Travis Ralston 00ebb5e1fd Make registration work with server configs
The general idea is that we throw the object around between components so they can pull off the details they care about.
2019-05-03 11:33:36 -06:00
Travis Ralston 6b45e60314 Update ServerTypeSelector for registration to use a server config 2019-05-03 11:32:59 -06:00
Travis Ralston 636cb8a5cc Have ServerConfig and co. do validation of the config in-house
This also causes the components to produce a ValidatedServerConfig for use by other components.
2019-05-03 11:32:59 -06:00
Travis Ralston e8a94ca3cf
Merge pull request #2942 from matrix-org/travis/simplify-login-form
Always default to the registration form
2019-05-03 11:23:52 -06:00
Travis Ralston 35ad68751b Remove unused skipServerDetails prop from registration 2019-05-03 11:13:36 -06:00
J. Ryan Stinnett df4e6a3913 Check for `room` in all `Room.timeline*` handlers
All `Room.timeline*` handlers must currently test for `room` first if they
expect it to exist. It is emitted not only for rooms, but also for timeline sets
without rooms, such as for notifications.

Almost all such handlers were correctly testing as needed, but it was missing
from `RoomBreadcrumbs`.

While that's quite confusing, we can start by testing for `room` when we expect
to have one.

Fixes https://github.com/vector-im/riot-web/issues/9630
2019-05-03 17:59:28 +01:00
Travis Ralston 1620ccac53 Always default to the registration form
Fixes https://github.com/vector-im/riot-web/issues/8886
2019-05-02 23:55:40 -06:00
Travis Ralston a7a50351d1
Merge pull request #2798 from matrix-org/travis/tombstone-notif
Support changing options for .m.rule.tombstone push rule
2019-05-02 09:47:41 -06:00
Travis Ralston 8fe8b8ab18
Merge pull request #2939 from matrix-org/travis/remove-timeline-crash
Remove timeline explosion rageshake prompt
2019-05-02 09:46:03 -06:00
J. Ryan Stinnett 87f737b8a3 Increment an existing reaction
This allows you to increment an existing reaction below a message by clicking on
it.

At the moment, this is not linked to the action bar, so they each are using
local state. We'll likely want to add some mechanism so that we can local echo
to both of these UI areas at the same time, but that can be done separately.

Fixes https://github.com/vector-im/riot-web/issues/9486
2019-05-02 12:05:17 +01:00
J. Ryan Stinnett 15c5893278 Display existing reactions below the message
This displays the existing reactions a message has from all users below the
message.

Since we don't currently have an API to actually get these events yet,
adds a temporary hook that looks for a specific message to inject some sample
data. This helps build out the UI for now and can be removed once it exists.

Fixes https://github.com/vector-im/riot-web/issues/9573
2019-05-02 12:05:17 +01:00
J. Ryan Stinnett 44e9ca6c52 Extract `isContentActionable` to a separate helper
This moves the check about whether an event is actionable (for the purpose of
replies, edits, reactions, etc.) to shared utils module.
2019-05-02 12:05:17 +01:00
Travis Ralston 5a204edf90 Remove timeline explosion rageshake prompt
Concludes https://github.com/vector-im/riot-web/issues/8593

We are no longer seeing this error being triggered, and are considering it fixed. As a result, the dialog can be removed to reduce the amount of dead code in the project.
2019-05-01 13:37:57 -06:00
J. Ryan Stinnett f4b783e802 Fix lint errors in TimelinePanel 2019-05-01 14:30:50 +01:00
J. Ryan Stinnett 784599d9e9 Add primary reactions to action bar
This adds the primary reactions to the action bar. They act as toggles where you
can only select one from each group at a time.

Note that currently we aren't actually sending the reaction at all. That's left
for a separate task.

Fixes https://github.com/vector-im/riot-web/issues/9576
2019-04-30 18:09:10 +01:00
J. Ryan Stinnett 00ca930d2e Extract actionable content check to helper 2019-04-30 17:51:18 +01:00
J. Ryan Stinnett 7f62cdf124 Add reactions feature flag 2019-04-30 17:51:18 +01:00
J. Ryan Stinnett 561ecc5ebe Rebuild strings 2019-04-30 13:36:37 +01:00
J. Ryan Stinnett 6db12f84df
Merge pull request #2936 from jryans/preview-bar-fire
Add important info to new preview bar
2019-04-30 10:20:09 +01:00
J. Ryan Stinnett b7642b38a7 Show the room avatar for invites
This changes to the room avatar instead of the inviter's avatar.
2019-04-30 09:56:44 +01:00
J. Ryan Stinnett e71896420e Show only a static inviter name with full MXID
This removes the clickable inviter behaviour, as it was too confusing to reveal
the user info sidebar and also hide the invite. Keeping both on screen would be
okay, but seems a bit too complex to resolve right before RC.

In addition, this adds the full inviter MXID to ensure it's clear who invited
you.
2019-04-30 09:56:44 +01:00
J. Ryan Stinnett ad6be3cc1b Change invite preview text for DMs
Use more specifc text for when previewing an invite to a direct message room.
2019-04-29 17:48:48 +01:00
J. Ryan Stinnett 338dc602f0 Explicitly mention the room name in all preview bar cases
Adjusts all cases of the room preview bar to mention the room name explicitly
when possible.
2019-04-29 16:34:57 +01:00
J. Ryan Stinnett 739c8c0314 Promote reply button up to message action bar
This moves the reply action out of the existing options menu and up to the
message action bar for easier access.
2019-04-29 15:53:03 +01:00
J. Ryan Stinnett 8ef9fe951d Update styling of message action bar for multiple buttons
This applies the new design for multiple buttons in the message action bar,
paving the way for more things to appear here.

In addition, this changes the existing options button to use the three vertical
dots icon. Some theme colors are also tweaked to align with what they were meant
to be from the unified palette.
2019-04-29 15:20:51 +01:00
J. Ryan Stinnett ed8bbc7082 Extract message options button to action bar
This adds a new action bar component to hold multiple per-message actions. This
existing options button has moved to this new component, and is currently the
only action.
2019-04-29 15:20:50 +01:00
J. Ryan Stinnett 530c92e03d Rename event edit button to options button
This naming is clearer as it doesn't really edit at all (it shows a context
menu). This should also be less confusing with actual editing when it arrives.
2019-04-29 15:20:50 +01:00
Hubert Chathi 443a15eeb9 actually clear bit 63 instead of bit 55 2019-04-25 11:04:48 -04:00
J. Ryan Stinnett af17829229 Blur active field before submit validation 2019-04-25 14:29:10 +01:00
J. Ryan Stinnett 26f732723e Animate tooltips when hiding as well as showing
This uses the same animation style as on show, but twice as fast.
2019-04-25 14:29:10 +01:00
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 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 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 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 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 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
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
Travis Ralston f6154bc7cd
Merge pull request #2921 from eyetime-international-ltd/hotfix/fix_static_title
use SdkConfig brand name instead of static "Riot"
2019-04-15 11:46:15 -06:00
Travis Ralston 26928a48e3
Merge pull request #2898 from matrix-org/travis/upgrades/permalinks
Use dedicated permalink creators in search results with multiple rooms
2019-04-15 11:27:58 -06:00
Bruno Windels 36951dd7b7 cleanup spinner props and use always preview bar when room operation is in progress 2019-04-15 18:49:00 +02:00
Bruno Windels 7459e19f06 fix lint 2019-04-15 17:56:36 +02:00
Bruno Windels fd6c594a8f put auth buttons in preview bar 2019-04-15 17:52:17 +02:00
Bruno Windels 1d0c402093 improve error messages, etc 2019-04-15 17:11:17 +02:00
J. Ryan Stinnett 2054d53782 Tweaked wording after discussing with @lampholder 2019-04-15 15:10:48 +01:00
J. Ryan Stinnett bded275f6a Clarify messaging when key backup exists but is unused
This makes the key backup panel much more explicit about the case where an
existing backup does exist, but this device just isn't using it. You can join
the device to the backup and restore from it by going through the restore
workflow.

Fixes https://github.com/vector-im/riot-web/issues/9446
2019-04-15 15:10:48 +01:00
J. Ryan Stinnett 9a59b0d390 Clarify that use backup means restore
"Use key backup" feels like it's telling me I haven't set it up at all. This
changes to "Restore ..." which seems more reassuring.

Fixes https://github.com/vector-im/riot-web/issues/9438
2019-04-15 15:10:48 +01:00
Bruno Windels 6bc659c93b layout for error codes 2019-04-15 15:25:34 +02:00
Bruno Windels 1b2fba3fe2 move p tags for subtitles out of switch 2019-04-15 15:22:08 +02:00
Bruno Windels 942669ae65 look at join rules to see if join button should still be shown in some error cases 2019-04-15 15:16:50 +02:00
Bruno Windels b09c7f97e9 implement most of new messages 2019-04-15 14:44:00 +02:00
J. Ryan Stinnett c0cf6a35c6
Merge pull request #2919 from jryans/key-backup-this-device
Fix key backup status when missing device
2019-04-15 12:44:08 +01:00
Thomas Karner e256dd6b05 use SdkConfig brand name instead of static "Riot"
Signed-off-by: Thomas Karner <thomas.karner@bytepoets.com>
2019-04-15 09:13:18 +02:00
Travis Ralston 9478ccc683 Add missing newline 2019-04-14 20:46:32 -06:00
YaoiFangirl420 f7462371b1 Rename: Avatar -> ComposerAvatar
To avoid confusion with other components that also might be named Avatar

Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
YaoiFangirl420 3dae9f3d58 Move FormattingButton to separate component
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
YaoiFangirl420 817f1d482f Move format bar rendering to separate method
To reduce the complexity in render(), move the format bar rendering to a
separate method

Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
YaoiFangirl420 419cb4e8b2 Define Stickerpicker inline
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
YaoiFangirl420 485ad6a3f0 Make UploadButton a separate component
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
YaoiFangirl420 452f0e6dcc Generate placeholder text in separate method
To make the MessageComposer render() method a bit less busy

Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
YaoiFangirl420 cfb9172121 Tighten up code around call buttons
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
YaoiFangirl420 6aa9f068b3 Tighten controls code in MessageComposer
Make the user avatar a separate function component, make the logic for
laying out components a little more concise

Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
YaoiFangirl420 d08fbb4872 Make call buttons into separate components
Make the call/voice-call/hangup buttons separate react components
to reduce the amount of complexity on MessageComposer.

Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-13 01:45:15 -07:00
Travis Ralston 0479901daa Load data for permalink creators once 2019-04-12 10:38:39 -06:00
Travis Ralston e8d141fc3c
Merge pull request #2908 from matrix-org/travis/upgrades/linkback
Add a link in room settings to get at the tombstoned room if it exists
2019-04-12 10:21:39 -06:00