Commit Graph

5411 Commits

Author SHA1 Message Date
Travis Ralston
a5f296457f Make the Manage Integrations Button defer scalar auth to the manager
This moves the responsibility of creating a URL to open from the button (and other components) to the integrations manager dialog itself.

By doing this, we also cut down on scalar API calls because we don't pick up on account information until the user opens the dialog.
2019-06-17 15:29:28 -06:00
Travis Ralston
7c80355ea7 Convert IntegrationsManager to a class 2019-06-17 15:26:58 -06:00
David Baker
10f6abfe17 Allow changing server if validation has failed
Show the server config section if there's an error and fix an if
case where we forgot to un-set the busy flag
2019-06-17 18:47:20 +01:00
Bruno Windels
a35c9ea585 provide default for missing device labels 2019-06-17 19:39:40 +02:00
Luca Weiss
c68074f532
Fix display of canonicalAlias in group room info
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
2019-06-16 21:52:25 +02:00
Michael Telatynski
2fc2e32e60 Add Upload All button to UploadConfirmDialog
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-16 11:43:13 +01:00
Michael Telatynski
fbe8d1c89b Switch DeactivateAccountDialog to Field and cleanups
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-16 10:42:46 +01:00
Michael Telatynski
3563b83762 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/authentication_password_field 2019-06-16 10:31:30 +01:00
Michael Telatynski
03c37821f6 clean up onVerticalArrow
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-15 15:10:34 +01:00
Bruno Windels
497ba1ecd4 prevent @room pills being applied multiple times when rerendering 2019-06-14 18:28:44 +02:00
Bruno Windels
eb4ff50c3c do parts creation only in PartCreator to not scatter dependencies 2019-06-14 18:28:44 +02:00
Michael Telatynski
6a10f0068d Use Alt-UP/DOWN for Composer History instead of random room change
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-14 12:26:52 +01:00
Michael Telatynski
876acc0f76 Merge branches 'develop' and 't3chguy/restore_composer_history' of github.com:matrix-org/matrix-react-sdk into t3chguy/restore_composer_history
# Conflicts:
#	src/components/views/rooms/MessageComposerInput.js
2019-06-14 12:26:05 +01:00
Bruno Windels
3cfdd518ee detect emote when sending (and trim "/me " for content) 2019-06-14 11:02:20 +02:00
Michael Telatynski
41b995df3c If oldContent matches newContent, skip sending the edit
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-13 22:56:32 +01:00
David Baker
06a11f4d45 Random blank lines 2019-06-13 18:31:04 +01:00
David Baker
e884cccabe Allow changing servers on nonfatal errors
Fixes https://github.com/vector-im/riot-web/issues/10016
2019-06-13 18:23:33 +01:00
Bruno Windels
48f5cf1523
Merge pull request #2966 from npny/npny/autocomplete-arrow-keys
Allow arrow keys navigation in autocomplete list
2019-06-13 15:38:36 +00:00
Bruno Windels
3d944b715e
Merge pull request #3097 from matrix-org/bwindels/edit-unsent
Edit unsent messages
2019-06-13 14:00:46 +00:00
Michael Telatynski
acb813372c Restore Composer History under shift-up & down
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-12 21:32:47 +01:00
Bruno Windels
41e41269dc use EditorStateTransfer to pass on state to newly mounted editor 2019-06-12 18:52:34 +02:00
J. Ryan Stinnett
413bff084c
Merge pull request #3087 from matrix-org/jryans/context-menu-clipping
Align message context menu to right and vertically where space available
2019-06-12 10:19:47 +01:00
J. Ryan Stinnett
a47a46bd9f
Merge pull request #3084 from matrix-org/jryans/update-action-bar-on-decrypt
Recheck message actions on decrypt
2019-06-10 16:53:35 +01:00
J. Ryan Stinnett
f89a4b688f Align message context menu vertically
This aligns the message context menu on either the top or the bottom of the
button that triggers, depending on which side has more space available to fit
the menu.

Fixes https://github.com/vector-im/riot-web/issues/9624
2019-06-10 16:29:22 +01:00
J. Ryan Stinnett
0355c91797 Align message context menu to right
This changes the message context menu to align the right edge of the menu with
the right edge of the button that opens it, which should keep all menu options
inside the viewport, even if they are very wide.

Part of https://github.com/vector-im/riot-web/issues/9624
2019-06-10 16:14:29 +01:00
David Baker
f620b712fb
Merge pull request #3083 from matrix-org/dbkr/remember_invited_room
Remember we were trying to accept an invite
2019-06-10 13:31:12 +01:00
J. Ryan Stinnett
73d2d78c33 Recheck message actions on decrypt
This changes the message action bar to force an update after an event decrypts,
since it's quite likely that changes the set of available actions.

Fixes https://github.com/vector-im/riot-web/issues/9991
2019-06-10 12:49:37 +01:00
David Baker
80812db466 Remember we were trying to accept an invite
When the user was on an invite page and clicked the sign up/sign in
buttons, remember that invite so we can show it again after they're
done signing up/in.

https://github.com/vector-im/riot-web/issues/9816
2019-06-10 10:24:06 +01:00
J. Ryan Stinnett
a1d0b8c5f3
Merge pull request #3080 from matrix-org/jryans/lowercase-letters
Clarify that only lowercase letters are allowed
2019-06-07 20:40:55 +01:00
Travis Ralston
795a273e26
Merge pull request #3067 from matrix-org/travis/fail-fast-but-not-too-fast
Fail more softly on homeserver liveliness errors
2019-06-07 07:43:45 -06:00
J. Ryan Stinnett
b2a9402d3f Clarify that only lowercase letters are allowed
We only allow lowercase letters in localparts.

Fixes https://github.com/vector-im/riot-web/issues/9983
2019-06-07 13:57:30 +01:00
Travis Ralston
6daf5a1d9b
Merge pull request #3076 from matrix-org/t3chguy/fix_community_add_room
Fix AddressPickerDialog adding wrong entry to selected list case
2019-06-06 17:25:26 -06:00
Michael Telatynski
b2c39ba842 Fix AddressPickerDialog adding wrong entry to selected list case
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-07 00:00:38 +01:00
David Baker
b365c9dfe6
Merge pull request #3074 from matrix-org/dbkr/fix_email_invite_address_match_check
Fix email invites address-match checking
2019-06-06 15:06:36 +01:00
David Baker
9816fe0ed7 Fix email invites address-match checking
Riot was always saying the email address that the invite was sent
to was not associated with your account.

Two fixes here:
 1. We mounted RoomPreviewBar with no invitedEmail prop and then
    changed the prop later, but RoomPreviewBar only checked for it
    on mount. Make sure we re-check when the props change.
 2. Pass oobData through RoomPreviewBar because we need to pass it
    to the RoomAvatar for 3pid invites.

https://github.com/vector-im/riot-web/issues/9816
2019-06-06 14:34:57 +01:00
J. Ryan Stinnett
aec3950a71
Merge pull request #3073 from matrix-org/jryans/twemoji-license
Add license info for Twemoji
2019-06-06 14:27:50 +01:00
J. Ryan Stinnett
20b57b855b Add license info for Twemoji
Fixes https://github.com/vector-im/riot-web/issues/9930
2019-06-06 14:20:13 +01:00
Michael Telatynski
db495e7162
Merge pull request #3070 from matrix-org/t3chguy/fuzzier-emojis
Be somewhat fuzzier when matching emojis to complete on space
2019-06-06 12:39:00 +01:00
Michael Telatynski
bd0e676b46 Switch ugly password boxes to Field or styled input
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-06 09:16:28 +01:00
Michael Telatynski
25a994e575 pull toLowerCase(...).replace(...) out of the loop
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-06 08:45:32 +01:00
Michael Telatynski
878f0a4753 Be somewhat fuzzier when matching emojis to complete on space
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-06 08:39:24 +01:00
J. Ryan Stinnett
5581b56cfe Restrict reactions to a single emoji
While the protocol supports more complex strings, in Riot we only want to
display single emoji.

Fixes https://github.com/vector-im/riot-web/issues/9916
2019-06-05 18:35:43 +01:00
J. Ryan Stinnett
c8cd1f30dd Fix live updates to reaction row buttons
This makes the reaction row buttons take the current count as prop as an easy
way of ensuring they always trigger an update when the count changes.

Fixes https://github.com/vector-im/riot-web/issues/9954
2019-06-05 14:54:26 +01:00
Travis Ralston
85858c731c
Merge pull request #3065 from matrix-org/travis/fix-logout
Don't refresh custom status on logout
2019-06-05 07:25:08 -06:00
Pierre Boyer
8158567640 Remove left/right autocomplete navigation for MessageEditor 2019-06-05 10:49:49 +02:00
Bruno Windels
940b2a7ef2
Merge pull request #3058 from matrix-org/bwindels/redactions-local-echo
Don't show "can't redact" dialog on network error, with redaction having local echo & queuing now.
2019-06-05 07:49:51 +00:00
Travis Ralston
e2fdeec71a Fail more softly on homeserver liveliness errors
This performs liveliness checks on the auth pages to try and show a friendlier error. Earlier checks in the app startup are expected to not block the app from loading on such failures.

See https://github.com/vector-im/riot-web/issues/9828
2019-06-04 23:42:38 -06:00
Travis Ralston
6b2dbdf7ba Don't refresh custom status on logout
The RoomTile gets remounted during logout due to the room stores being obliterated, however this causes the render() function to check if it should be showing custom status. If you have custom status enabled, and the person has a status set, the function errors due to no MatrixClient being available.

Fixes https://github.com/vector-im/riot-web/issues/9940
2019-06-04 15:34:11 -06:00
Bruno Windels
62ad40d1d9
spelling
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-06-04 14:53:01 +00:00
Bruno Windels
629b776820 clarify why we dont need dialog on network error 2019-06-04 16:11:49 +02:00
J. Ryan Stinnett
bea845a80d
Merge pull request #3059 from matrix-org/jryans/read-receipts-relations-send-review
Advance read receipts into trailing events without tiles
2019-06-04 14:35:14 +01:00
Pierre Boyer
a4dec88c65 Add back on..Arrow functions. Add left/right key navigation in MessageEditor 2019-06-04 13:57:15 +02:00
Bruno Windels
a11deffe5e only show "can't redact" dialog when not a network error
as the redaction is queued now and might be sent later
2019-06-04 13:32:14 +02:00
Pierre Boyer
97d4d1b73a Update composer to correctly call countCompletions and moveSelection 2019-06-04 13:07:19 +02:00
Pierre Boyer
bb133c1ebc Merge onUpArrow and onDownArrow into more general moveSelection 2019-06-04 13:06:47 +02:00
Pierre Boyer
6e4c3bfe56 Remove now unused code 2019-06-04 12:18:29 +02:00
Pierre Boyer
6cb59f7071 Allow left/right arrow keys to navigate through the autocompletion list 2019-06-04 11:58:16 +02:00
Will Hunt
d752389cfd
Renove SettingsStore 2019-06-03 23:31:28 +01:00
Travis Ralston
635b1ff612
Merge pull request #2928 from Half-Shot/hs/custom-notif-sounds
Custom notification sounds for rooms
2019-06-03 14:31:38 -06:00
Will Hunt
721607b696
Remove whitespace 2019-06-03 21:19:58 +01:00
J. Ryan Stinnett
96b213e7cb Advance read receipts into trailing events without tiles
This changes read receipt sending logic to allow it advance further into events
without tiles (such as edits or reactions) that may exist after the last
displayed event.

By allowing the read receipt to advance past such events, this also marks as
read any related notifications. For example, edits trigger notifications by
default since they are `m.room.message` events, and with this change, such edit
notifications can finally be marked read.

Part of https://github.com/vector-im/riot-web/issues/9745
2019-06-03 18:25:35 +01:00
Will Hunt
300095f50f Remove labs flag for custom notif sounds 2019-06-03 17:35:15 +01:00
J. Ryan Stinnett
b309ebf99d Allow source tile handler for replacements
If the debugging mode of showing hidden events in the timeline is enabled, we
should also show replacements using the same view source tile as we do for
reactions. This allows easy debugging of replacement event data and also makes
the edit event look visually distinct from regular messages.

Fixes https://github.com/vector-im/riot-web/issues/9937
2019-06-03 16:29:20 +01:00
Travis Ralston
ad84144543
Merge pull request #3053 from matrix-org/travis/bc-labs
Convert breadcrumbs from labs to real setting
2019-06-03 07:10:51 -06:00
Travis Ralston
a71b4f5b4c Appease the linter 2019-06-03 00:17:08 -06:00
Travis Ralston
7f0282a2e8 Convert breadcrumbs from labs to real setting
Fixes https://github.com/vector-im/riot-web/issues/9391
2019-06-03 00:15:33 -06:00
Travis Ralston
dd42e87c3c Add local echo on badges in breadcrumbs
Fixes https://github.com/vector-im/riot-web/issues/9890
2019-06-03 00:07:32 -06:00
Travis Ralston
ecc0552e89 ToUpper the country code 2019-06-01 09:12:09 -06:00
Travis Ralston
c12ef8829c Remove debugging 2019-05-31 21:26:22 -06:00
Travis Ralston
3f646f13dd Add option to change the default country code
Fixes https://github.com/vector-im/riot-web/issues/9926
2019-05-31 21:25:13 -06:00
Travis Ralston
16a46be00f Cache shouldLoadBackupStatus in state 2019-05-31 09:20:13 -06:00
Travis Ralston
1c84abae44 Fix logout dialog for low bandwidth 2019-05-31 09:14:49 -06:00
Bruno Windels
716719187d only capture enter if something was selected in completions 2019-05-31 15:05:09 +02:00
Will Hunt
9369e964fa Merge remote-tracking branch 'upstream/develop' into hs/custom-notif-sounds 2019-05-31 10:44:30 +01:00
Travis Ralston
a935e26ee3 Add flag to config to always show labs settings 2019-05-30 19:57:37 -06:00
Travis Ralston
0d47222132 Add LB setting to new user settings
Put under labs out of concern for https://github.com/vector-im/riot-meta/issues/66
2019-05-30 19:57:17 -06:00
Travis Ralston
d81804e0fe Merge branch 'develop' into matthew/low_bandwidth 2019-05-30 19:42:09 -06:00
J. Ryan Stinnett
1e3e9f4f87 Remove username on HS input label
Removes redundant HS name on the username input that duplicates the header above
it.

Fixes https://github.com/vector-im/riot-web/issues/9884
2019-05-29 17:48:16 +01:00
Bruno Windels
a5eca6cf79 override font for usercontent download link 2019-05-29 11:02:38 +02:00
J. Ryan Stinnett
f0d67e0454 Revert "Merge pull request #3019 from matrix-org/travis/sr/fix-timeline"
This reverts commit 9a1a9825b0, reversing
changes made to 62dc83310a.
2019-05-28 12:22:22 +01:00
Bruno Windels
e1d1c8f99c
Merge pull request #2968 from npny/npny/autocomplete-prevent-send-on-enter
Hide autocomplete on Enter key press instead of sending message
2019-05-28 09:17:28 +00:00
Bruno Windels
afd656ae2c
Merge pull request #3025 from matrix-org/bwindels/edit-keyboard-nav
Message editing: arrow key (up/down) navigation between editable events
2019-05-27 15:12:40 +00:00
Bruno Windels
25e2c747ed focus main composer after cancel or saving edit 2019-05-27 16:26:21 +02:00
Bruno Windels
e193522db1 PR feedback: put findPrev/NextEditableEvent in one function with flag 2019-05-27 16:22:55 +02:00
Slavi Pantaleev
3f60b4336f Do not try to request thumbnails with non-integer widths
Issue described in https://github.com/vector-im/riot-web/issues/9690.

With certain `window.devicePixelRatio` values
(e.g.  `1.5789473684210527`), the calculated thumb width/height
would be a non-integer value.

Passing such values to `client.mxcUrlToHttp()` causes it to
generate URLs to the thumbnail API with non-integer values.
As per the spec, non-integer values are forbidden for that API and a
400 HTTP response is returned (`Query parameter b'width' must be an
integer`).

Fixing matrix-js-sdk's `mxcUrlToHttp()` to sanitize such values
would also be a good idea and likely fix more than just matrix-react-sdk
and riot-web. Still, it feels like matrix-react-sdk should play nice
as well, and not request thumbnails for weird widths/heights.

Signed-off-by: Slavi Pantaleev <slavi@devture.com>
2019-05-27 11:06:10 +03:00
Bruno Windels
fbb79e4686 don't navigate to next/prev message when editor has modifications
to prevent losing modifications by accident
2019-05-24 14:46:34 +02:00
Bruno Windels
bd3dbd1a89 remove edit history from main composer 2019-05-24 14:42:57 +02:00
Bruno Windels
3591eedcfa move between editable events with arrow keys 2019-05-24 14:42:33 +02:00
Bruno Windels
3468cef654
Merge pull request #3013 from matrix-org/bwindels/editor-formatting
Message editing: preserve and re-apply formatting
2019-05-24 07:34:05 +00:00
Travis Ralston
ea1c778bb1 Fix copyright 2019-05-22 23:35:05 -06:00
Travis Ralston
14dc4b47fa Merge branch 'develop' into travis/feature/wellknown2 2019-05-22 23:05:54 -06:00
Travis Ralston
9a1a9825b0
Merge pull request #3019 from matrix-org/travis/sr/fix-timeline
Make the timeline less noisy for screen readers (mk II)
2019-05-22 19:18:40 -06:00
Travis Ralston
a7d2309286 Convert ternary to multiple if statements for clarity 2019-05-22 16:36:14 -06:00
Travis Ralston
62dc83310a
Merge pull request #3020 from matrix-org/travis/sr/edit
Label message edit field as such for screen readers
2019-05-22 16:30:45 -06:00
Travis Ralston
d571709fe8
Apply suggestions from code review
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-05-22 16:29:37 -06:00
Travis Ralston
2537a58162
Merge pull request #3014 from matrix-org/anoa/key_backup_checkmark
Move checkmark to the front of key backup message
2019-05-22 16:14:09 -06:00
Travis Ralston
09d195b2d1 Fix events not being spoken in the most complicated way possible
There's details in the comment body of this diff.

See https://github.com/vector-im/riot-web/issues/9747
2019-05-22 15:55:16 -06:00
Travis Ralston
c55f083a28 Always mute timestamp from screen readers
The short time is still read out (eg: 15:24), however by ignoring the anchor we prevent the reader from saying the title of the containing span. This prevents readers saying "Wed May 22, 2019 at 15:24 15:24".

See https://github.com/vector-im/riot-web/issues/9747
2019-05-22 15:25:34 -06:00
Travis Ralston
8f6884ec15 Mute timestamps for irrelevant updates
Other fix for https://github.com/vector-im/riot-web/issues/5697

See https://github.com/vector-im/riot-web/issues/9747
2019-05-22 15:18:57 -06:00
Travis Ralston
6edf760943 Mute avatars and read receipts on event tiles
This reduces overall noise from the screen reader. It was reading the alt attribute from the sender avatar, which was just a mxid. The read receipts were just nonsensical noise.

Fixes https://github.com/vector-im/riot-web/issues/2716
Fixes https://github.com/vector-im/riot-web/issues/5697
See https://github.com/vector-im/riot-web/issues/9747
2019-05-22 15:18:51 -06:00
Travis Ralston
85a024175b Hide flair from screen readers
To have less noise when they run over the sender profile.

See https://github.com/vector-im/riot-web/issues/9747
2019-05-22 15:18:46 -06:00
Travis Ralston
6c0213bb3d
Revert "Make the timeline less noisy for screen readers" 2019-05-22 10:54:51 -06:00
Travis Ralston
983214f4bf
Merge pull request #3007 from matrix-org/travis/sr/mute-timeline
Make the timeline less noisy for screen readers
2019-05-22 09:55:23 -06:00
Andrew Morgan
d0deffac3d Move checkmark to the front of key backup message 2019-05-22 15:19:42 +01:00
Bruno Windels
53b6586986 re-apply markdown when saving a message 2019-05-22 16:19:07 +02:00
Bruno Windels
ff61376c07
Merge pull request #3004 from matrix-org/bwindels/update-link-previews-after-edit
Message editing: update link previews after editing
2019-05-22 14:17:34 +00:00
Bruno Windels
6b1134bdf0 add matrix foundation copyright header 2019-05-22 16:16:32 +02:00
David Baker
03d092c574
Merge pull request #3010 from matrix-org/dbkr/uiauth_send_email
js-sdk interactive auth now sends email token
2019-05-22 14:24:14 +01:00
David Baker
90eb3ce9ec js-sdk interactive auth now sends email token
We previously sent it in componentWillMount of the email token
auth component which definitely gets us on react's naughtly list.
We now pass the js-sdk a callback it can call at the appropriate
time to send the token (https://github.com/matrix-org/matrix-js-sdk/pull/926).

We should make password reset and adding email addresses work the
same way, but currently they don't even use the interactive-auth
helpers(!) so they're unaffected.

https://github.com/vector-im/riot-web/issues/9586
2019-05-22 11:51:26 +01:00
J. Ryan Stinnett
4b4d09266e
Merge pull request #3005 from matrix-org/jryans/notif-error
Only show reactions in main message timeline
2019-05-22 09:15:04 +01:00
Travis Ralston
a551ef1a72 Label message edit field as such for screen readers
See https://github.com/vector-im/riot-web/issues/9747
2019-05-21 20:00:15 -06:00
Travis Ralston
68c4ee9374 Mute timestamps for irrelevant updates
Other fix for https://github.com/vector-im/riot-web/issues/5697

See https://github.com/vector-im/riot-web/issues/9747
2019-05-21 18:57:16 -06:00
Travis Ralston
4779144b2e Mute avatars and read receipts on event tiles
This reduces overall noise from the screen reader. It was reading the alt attribute from the sender avatar, which was just a mxid. The read receipts were just nonsensical noise.

Fixes https://github.com/vector-im/riot-web/issues/2716
Fixes https://github.com/vector-im/riot-web/issues/5697
See https://github.com/vector-im/riot-web/issues/9747
2019-05-21 18:56:46 -06:00
Travis Ralston
5ae23fdb27 Hide flair from screen readers
To have less noise when they run over the sender profile.

See https://github.com/vector-im/riot-web/issues/9747
2019-05-21 18:55:01 -06:00
Travis Ralston
c2c55e06e6 Add voice labels for quick add room buttons
See https://github.com/vector-im/riot-web/issues/9747
2019-05-21 12:16:34 -06:00
J. Ryan Stinnett
238e967470 Only show reactions in main message timeline
This fixes an error that crashed that notifications panel because it was trying
to read reactions, even though we currently don't aggregate them there. This
change is more explicit about exactly which views should try to show reactions.

Fixes https://github.com/vector-im/riot-web/issues/9713
2019-05-21 18:27:10 +01:00
Travis Ralston
907c7ed119
Merge pull request #2994 from matrix-org/travis/screenreader/topleftmenu
Update TopLeftMenu for accessibility: Keyboard shortcut, reduced screen reader noise
2019-05-21 09:52:26 -06:00
Bruno Windels
1a5bcb4908 don't need this as we prevent unneeded updates in shouldComponentUpdate 2019-05-21 16:56:26 +02:00
Bruno Windels
72c1725f98 this is already done as part of _applyFormatting 2019-05-21 16:56:05 +02:00
J. Ryan Stinnett
18d444d2e7 Remove reacted with text when shortcode missing
If we don't have the shortcode for some emoji, don't show any "reacted with X"
text in the reaction tooltip.

Fixes https://github.com/vector-im/riot-web/issues/9786
2019-05-21 15:08:11 +01:00
Bruno Windels
2d4d608ed6
Merge pull request #2997 from matrix-org/bwindels/pill-avatars
Message editing: render avatars for pills in the editor
2019-05-21 12:11:06 +00:00
Matthew Hodgson
30a485bddd
Merge pull request #2995 from matrix-org/matthew/twemoji
Replace emojione with twemoji + emojibase
2019-05-21 11:32:53 +01:00
Bruno Windels
b00a38a1e5 apply mx_EventTile_content to editor, so it gets the same right margin
this way we don't have to include it in the magic number
2019-05-21 12:18:20 +02:00
Travis Ralston
aac87c4635 Move focusing to the context menu create call 2019-05-20 21:07:55 -06:00
Travis Ralston
3476be3327 Merge branch 'develop' into travis/feature/wellknown2 2019-05-20 19:50:02 -06:00
Michael Telatynski
e2476acd0a Close copy tooltip in edge cases correctly
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-05-20 21:44:05 +01:00
Matthew Hodgson
d3f06763b3
Merge branch 'develop' into matthew/twemoji 2019-05-20 16:38:44 +01:00
J. Ryan Stinnett
1bc9badeac Limit reaction sender tooltip to 6 people
This limits the number of senders shown in the reaction sender tooltip shown
when hovering a reaction to 6 people followed by "and N others" for the rest.

Fixes https://github.com/vector-im/riot-web/issues/9722
2019-05-20 16:02:10 +01:00
J. Ryan Stinnett
0e5f0f24cc Extract MELS-style comma separated list to shared utility
This allows other UI components to use the same formatting for a long list.
2019-05-20 15:21:18 +01:00
Bruno Windels
230e53fe2f move most of room avatar handling to Avatar, to reuse in editor pills 2019-05-20 15:33:26 +02:00
Bruno Windels
5edfd01cb2 remove unused _getInitialLetter 2019-05-20 14:49:59 +02:00
Bruno Windels
e58d844e5b move getInitialLetter to Avatar so we can reuse it for editor pills 2019-05-20 14:20:36 +02:00
Bruno Windels
1368a5eb80
Merge pull request #2996 from matrix-org/bwindels/composerdesign
Message editing: apply design
2019-05-20 08:42:41 +00:00
Bruno Windels
710338c01f pass member and room to editor pills to get avatar url 2019-05-20 10:28:26 +02:00
Bruno Windels
0c0052d06e re-apply formatting when editor is closed 2019-05-20 10:19:29 +02:00
Matthew Hodgson
81338306b0 fix lint 2019-05-19 21:00:14 +01:00
Matthew Hodgson
64e2de5b47 make autocomplete work again 2019-05-19 20:56:07 +01:00
Matthew Hodgson
dbc6815abf make EmojiProvider and stripped-emoji.json work 2019-05-19 20:48:18 +01:00
Matthew Hodgson
c63419f8a2 typos 2019-05-19 16:31:25 +01:00
Matthew Hodgson
a8297a7698 fix build 2019-05-19 16:11:12 +01:00
Matthew Hodgson
dc72641264 replace emojione with twemoji. completely untested & debugged & unoptimised 2019-05-19 15:23:43 +01:00
J. Ryan Stinnett
3a87f53a3c
Merge pull request #2993 from matrix-org/jryans/devtools-event-source-in-timeline
Add debug feature to show hidden events in timeline
2019-05-18 19:37:58 +01:00
Travis Ralston
2a187810fd Restructure TopLeftMenu for accessibility and autofocus it
We use a trick with refs to automatically focus the element, also making use of mx_HiddenFocusable to hide the unnecessary outline. 

The menu itself has been restructured to hide some elements from screen readers (reduce noise) and to have a single unordered list. Screen readers mention when the user "enters" a list, and each item was previously saying "enter list <action>" when it should have just been "<action>".

By focusing automatically, the keyboard can be used to go up/down the menu as may be expected by keyboard users.
2019-05-17 15:32:03 -06:00
Travis Ralston
c5757d8303 Support CTRL+I for opening TopLeftMenu 2019-05-17 15:29:16 -06:00
Travis Ralston
f1aa2875e1 Hide avatars from screen readers by default
To avoid having them read out the user's ID
2019-05-17 15:25:59 -06:00
J. Ryan Stinnett
5144907983 Fix indent 2019-05-17 17:44:11 +01:00
J. Ryan Stinnett
45cdf880b1 Change setting style 2019-05-17 17:43:08 +01:00
J. Ryan Stinnett
3a405701a3 Debug: Show all events 2019-05-17 16:34:01 +01:00
Bruno Windels
5adae63555 don't apply formatting to body when showing editor in TextualBody
it throws
2019-05-17 16:01:30 +01:00
Travis Ralston
7a244b85c1
Merge pull request #2986 from matrix-org/travis/sr/reactions
Mute screen readers over reactions
2019-05-17 08:40:53 -06:00
Bruno Windels
578a183f49 hide the action bar while editing 2019-05-17 15:35:28 +01:00
Bruno Windels
62b8973e72 cancel the edit when pressing escape 2019-05-17 15:35:14 +01:00
Bruno Windels
ddefeae136 update design of editor to look as close to original tile (and design)
the buttons below the composer are overlayed onto the previous event.
In case of the last event, for now we make them not overflow, but make the
tile grow. The design says it should overlay on the main composer for the last
event tile, postponing that for a bit though as not sure what is the best way
to do that.
2019-05-17 15:33:11 +01:00
Bruno Windels
9a3752c571 show message editor in textual body instead of replacing event tile 2019-05-17 15:30:07 +01:00
J. Ryan Stinnett
43c9e6d942 Reactions / editing tooltip tweaks 2019-05-17 15:10:35 +01:00
J. Ryan Stinnett
603e6b7055 Adjust edited tooltip to use shared styles 2019-05-17 12:19:02 +01:00
J. Ryan Stinnett
059988ff5c Extract tooltip styling to a shared class
We want to use the same styling with edited tooltip as well, so this extracts
the shared bits.
2019-05-17 12:11:01 +01:00
J. Ryan Stinnett
3da1f73ea4 Add a basic tooltip showing who reacted
This adds a first attempt at tooltip showing who reacted to a message. It
doesn't limit senders or position the tooltip nicely, but the info is there at
least.

Part of https://github.com/vector-im/riot-web/issues/9722
2019-05-17 12:11:01 +01:00
Bruno Windels
c48ecb66d9
Merge pull request #2990 from matrix-org/bwindels/editedmarker
Message editing: show (edited) marker on edited messages, with tooltip
2019-05-17 11:04:09 +00:00
Bruno Windels
4a6725d4c2 Message editing: show (edited) marker on edited messages, with tooltip 2019-05-17 11:36:36 +01:00
Bruno Windels
ca2e6d8eb2 Message editing: shift+enter for newline, enter to send 2019-05-17 10:22:02 +01:00
Travis Ralston
82bd893f03 Mute screen readers over reactions 2019-05-16 16:36:23 -06:00
Michael Telatynski
d7c6869188 Apply Flex voodoo
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-05-16 21:55:17 +01:00
Travis Ralston
0c7aa39273 Merge branch 'develop' into travis/feature/wellknown2 2019-05-16 12:59:50 -06:00
Travis Ralston
8c326bff9e
Merge pull request #2964 from matrix-org/travis/wk/simplify-phases
Refactor "Next" button into ServerConfig components
2019-05-16 12:46:35 -06:00
Bruno Windels
245f48a22c set caret on mount as we usually do, so FF doesn't enter 2 newlines 🤯 2019-05-16 18:39:20 +01:00
J. Ryan Stinnett
006d5d7591 Fix crash for null reactions set 2019-05-16 13:57:02 +01:00
J. Ryan Stinnett
e942939be9 Listen for removed relations
The JS SDK has learned how to remove relations when cancelled, so we should also
listen for those as well.

Part of https://github.com/vector-im/riot-web/issues/9731
2019-05-16 13:03:07 +01:00
J. Ryan Stinnett
2e7e71556b Annotations by sender is now a Set 2019-05-16 12:45:41 +01:00
J. Ryan Stinnett
0e369bd12e
Merge pull request #2977 from matrix-org/jryans/encrypted-reactions
Use `getRelation` helper
2019-05-16 09:45:09 +01:00
J. Ryan Stinnett
33885cb864 Use getRelation helper
Use the `getRelation` helper to ensure we always read relation info from the
wire content as required in E2E rooms.
2019-05-16 09:25:33 +01:00
Travis Ralston
6f22acc3c6
Merge pull request #2979 from aaronraimist/imageview-tooltip
Add tooltips to rotate and close buttons in ImageView (#9686)
2019-05-15 21:14:20 -06:00
Aaron Raimist
c38b5cabb1
Allow the strings to be translated
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-15 22:11:51 -05:00
Aaron Raimist
bfd37d8089
Add tooltips to rotate and close buttons in ImageView (#9686)
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-15 22:06:02 -05:00
Travis Ralston
60a13652df
Merge pull request #2965 from matrix-org/travis/wk/tooltip
Render underlines and tooltips on custom server names in auth pages
2019-05-15 14:13:44 -06:00
Travis Ralston
6e3b06f364 Human de-linting 2019-05-15 13:56:15 -06:00
Bruno Windels
085f2d199d focus editor after clicking edit 2019-05-15 17:17:35 +01:00
Will Hunt
2994d99378
Merge branch 'develop' into hs/custom-notif-sounds 2019-05-15 16:09:55 +01:00
Bruno Windels
d73f547f55 reapply pills, link preview, code highlighting, ... after edit 2019-05-15 15:55:03 +01:00
Bruno Windels
6366371c0d add * to fallback messages for edits 2019-05-15 15:54:05 +01:00
Bruno Windels
b081a3156f dont show edit button for messages that are not your own 2019-05-15 15:53:49 +01:00
Will Hunt
d752de0972 Improve UX 2019-05-15 15:52:42 +01:00
Bruno Windels
5805a88ab9 adjust to js-sdk changes of marking original event as replaced 2019-05-15 11:54:26 +01:00
Bruno Windels
edc100163f
Merge pull request #2952 from matrix-org/bwindels/message-edit-editor
Initial support for editing messages
2019-05-15 09:23:01 +00:00
Bruno Windels
d83e278f6b PR feedback, cleanup 2019-05-15 09:46:08 +01:00
Michael Telatynski
9b40913838
Merge pull request #2957 from matrix-org/t3chguy/invite_perms
Check permission to invite before showing invite buttons/disable them
2019-05-14 23:15:59 +01:00
Will Hunt
277c4ab809
Merge branch 'develop' into hs/custom-notif-sounds 2019-05-14 21:07:03 +01:00
Will Hunt
46132a2463 Merge branch 'hs/custom-notif-sounds' of github.com:Half-Shot/matrix-react-sdk into hs/custom-notif-sounds 2019-05-14 21:05:55 +01:00
Will Hunt
626cb46915 Cleanup interface buttons 2019-05-14 21:05:22 +01:00
Travis Ralston
4c1ac38dd4 Merge branch 'develop' into travis/feature/wellknown2 2019-05-14 10:53:01 -06:00
Travis Ralston
92c67cdcab
Merge pull request #2963 from matrix-org/travis/permalink-without-room
Support a backup room ID in PermalinkCreator
2019-05-14 10:28:26 -06:00
Bruno Windels
dc21faa240 send edit also in n.new_content field
so we can have fallback content in the regular content for clients
that don't support edits. Note that we're not reading m.new_content
yet as it's going to be a bit of a headache to change this.

So for now just sending the edit in both the normal content and
the m.new_content subfield, so all events out there already
are well-formed
2019-05-14 16:32:08 +01:00
Bruno Windels
45991bc3de replace original event if there have been previous edits 2019-05-14 15:39:24 +01:00
Bruno Windels
e2388afb51 consistent naming between serialize and deserialize modules 2019-05-14 15:39:24 +01:00
Bruno Windels
036cb02c0e add feature flag 2019-05-14 15:39:24 +01:00
Bruno Windels
759a4a54ef send the actual m.replace event from composer content 2019-05-14 15:38:16 +01:00
Bruno Windels
a3b02cf0cc make logging quiet 2019-05-14 15:38:16 +01:00
Bruno Windels
4ff37ca046 don't show model for now 2019-05-14 15:38:16 +01:00
Bruno Windels
9e0816c51c find caret offset and calculate editor text in same tree-walking algo
instead of having the same logic twice
2019-05-14 15:38:16 +01:00
Bruno Windels
7ebb6ce621 WIP commit, newlines sort of working 2019-05-14 15:38:16 +01:00
Bruno Windels
8d97c0033e catch this for now as caret behaviour is still a bit flaky 2019-05-14 15:38:16 +01:00
Bruno Windels
64b171198c rerender through callback instead of after modifying model
this way rendering is centralized and we can better rerender
from interaction in the autocompleter
(we didn't have access to caret before)
2019-05-14 15:38:16 +01:00
Bruno Windels
317e88bef2 initial hacky hookup of Autocomplete menu in MessageEditor 2019-05-14 15:38:16 +01:00
Bruno Windels
7507d0d7e1 complete proptypes 2019-05-14 15:38:16 +01:00
Bruno Windels
a765fdf98a run autocomplete after mounting
componentWillReceiveProps doesn't run after mount,
and is deprecated as well.

Update state after both on componentDidMount and componentDidUpdate
2019-05-14 15:38:16 +01:00
Bruno Windels
a2f1f49972 update the DOM manually as opposed through react rendering
react messes up the DOM sometimes because of, I assume, not
being aware of the changes to the real DOM by contenteditable.
2019-05-14 15:38:16 +01:00
Bruno Windels
6be6492cd2 initial parsing of pills for editor 2019-05-14 15:38:16 +01:00
Bruno Windels
76bb56a2bf initial hookup editor code with react component 2019-05-14 15:38:16 +01:00
Bruno Windels
6599d605cd wire up editor component (somewhat hacky) 2019-05-14 15:38:16 +01:00
J. Ryan Stinnett
66aabdca9e
Merge pull request #2962 from matrix-org/jryans/gif-autoplay
Always thumbnail for GIFs
2019-05-14 14:07:58 +01:00
J. Ryan Stinnett
f19e70c219 Add comment about thumbnailing for GIFs 2019-05-14 13:55:38 +01:00
Pierre Boyer
a62f68bd39 Hide autocomplete on Enter key press instead of sending message 2019-05-14 13:44:01 +02:00
Travis Ralston
25e3f7888e newline for the linter 2019-05-13 18:31:43 -06:00
Travis Ralston
e4576dac28 Render underlines and tooltips on custom server names in auth pages
See https://github.com/vector-im/riot-web/issues/9290
2019-05-13 17:16:40 -06:00
Travis Ralston
ee33a4e9ba Refactor "Next" button into ServerConfig components
TODO still remains about making ModularServerConfig extend ServerConfig instead of duplicating everything.

See https://github.com/vector-im/riot-web/issues/9290
2019-05-13 16:30:34 -06:00
Travis Ralston
1584ab42c2 Support a backup room ID in PermalinkCreator
In the case of room upgrades, it is possible the client is trying to render the room create event, but the user has never been in the old room. This results in an error because the PermalinkCreator cannot possibly figure out a room ID. 

Instead, we'll feed the creator an alternate room ID to try if the room object can't be provided.

Fixes https://github.com/vector-im/riot-web/issues/9636
2019-05-13 14:12:58 -06:00
J. Ryan Stinnett
7881369b98 Always thumbnail for GIFs
When displaying a GIF, we always want to thumbnail so that we can properly
respect the user's GIF autoplay setting (which relies on thumbnailing to produce
the static preview image).

Fixes https://github.com/vector-im/riot-web/issues/9658
2019-05-13 18:28:57 +01:00
J. Ryan Stinnett
9d9a41b263 Save content.info as a local for readability 2019-05-13 18:00:52 +01:00
Travis Ralston
83737654ff Merge branch 'develop' into travis/feature/wellknown2 2019-05-13 09:20:10 -06:00
Travis Ralston
201fef8b11
Merge pull request #2947 from matrix-org/travis/password-score-config
Add configuration flag to disable minimum password requirements
2019-05-13 09:19:23 -06:00
J. Ryan Stinnett
f5aa32bc96
Merge pull request #2954 from matrix-org/jryans/aggregations
Send and undo reaction events
2019-05-13 15:20:28 +01:00
J. Ryan Stinnett
e22bd45608 Clarify ReactionsRow forceUpdate usage 2019-05-13 15:00:43 +01:00
J. Ryan Stinnett
af9fdbaeeb Rework reactionsCreated in EventTile to use state
This changes to use component state instead of `forceUpdate`, so that it's more
obvious why an update is happening here.
2019-05-13 14:52:55 +01:00
J. Ryan Stinnett
24209905e8 Test settings later for performance 2019-05-13 14:41:49 +01:00
David Baker
59cefbaa44
Typo
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-05-13 14:24:56 +01:00
David Baker
34990d1c89 Fix bug where email was not required where it shouldn't have been
See comment!

Fixes https://github.com/vector-im/riot-web/issues/9681
2019-05-13 14:17:09 +01:00
Travis Ralston
4ffd826e76 Flip logic for unsafe->safe 2019-05-12 22:53:06 -06:00
Will Hunt
e8c8762e34
Merge branch 'develop' into hs/custom-notif-sounds 2019-05-13 03:09:59 +01:00
Travis Ralston
99e2ac7255
Merge pull request #2956 from matrix-org/t3chguy/fix_memberinfo_invite
Fix invite via MemberInfo
2019-05-12 18:47:17 -06:00
Will Hunt
64a384477e Resolve issues 2019-05-12 17:14:21 +01:00
Will Hunt
2023b3d905 Merge remote-tracking branch 'upstream/develop' into hs/custom-notif-sounds 2019-05-12 16:55:36 +01:00
Michael Telatynski
3cd9c152c2 Check permission to invite before showing invite buttons/disable them
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-05-11 19:45:24 +01:00
Michael Telatynski
0530a64f19 Fix invite via MemberInfo. Thank U JetBrains for solving this one for me <3
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-05-11 18:46:13 +01:00
Michael Telatynski
249f3d972b Close Room Settings upon Leave Room
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-05-10 20:58:32 +01:00
Travis Ralston
6a941aca91
Merge pull request #2941 from matrix-org/travis/guests/block-ui
Use validated server config for login, registration, and password reset
2019-05-10 11:21:21 -06:00
J. Ryan Stinnett
33513a95d7 Change to componentDidUpdate to process first reaction
This changes to "did update" and also calls the reaction change handler to
ensure that we update the state of my reactions (to know which were sent by
you).
2019-05-10 17:59:17 +01:00
J. Ryan Stinnett
dc4fccd291 Send and redact reaction events
This updates both the reaction row and action bar UIs to send and redact
reaction events as appropriate based on user interactions.

Fixes https://github.com/vector-im/riot-web/issues/9574
Fixes https://github.com/vector-im/riot-web/issues/9572
2019-05-10 17:19:27 +01:00
J. Ryan Stinnett
39bd0d8bb3 Listen for additional reactions in existing collection
The various reaction UI bits will now listen for `Reactions.add` for new
reactions just like with redactions.

Part of https://github.com/vector-im/riot-web/issues/9572
2019-05-10 17:19:27 +01:00
J. Ryan Stinnett
37d2f60045 Listen for reaction collections when they are created
The `EventTile` for events without reactions now use `Event.relationsCreated` to
listen for a future time where they come in to being.
2019-05-10 17:19:27 +01:00
J. Ryan Stinnett
ce35741030 Remove redundant key vs. content in ReactionDimension
This simplifies `ReactionDimension` by using the emoji string everywhere instead
of keeping a separate text string as well. It should improve readability as
well, as the reaction events also have a field `key` which was the emoji
content, which was easy to confuse.
2019-05-10 17:19:27 +01:00
J. Ryan Stinnett
6a59143ffb Update reactions when redacted
This updates the reaction state in the reaction row and action bar when a
reaction is redacted.

Part of https://github.com/vector-im/riot-web/issues/9574
2019-05-10 17:19:27 +01:00
J. Ryan Stinnett
8fdb59a909 Use basic read path from JS SDK for reactions
This displays existing reactions correctly in the action bar and reaction row,
but it doesn't yet update after a new reaction is sent.
2019-05-10 17:19:27 +01:00
Michael Telatynski
cd5a460b2b Iterate PR based on feedback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-05-09 22:30:45 +01:00
Michael Telatynski
16c027dc61 Merge branches 'develop' and 'devtools_serverlist' of github.com:matrix-org/matrix-react-sdk into devtools_serverlist 2019-05-09 22:27:37 +01:00
J. Ryan Stinnett
576241236c Extract ReactionDimension out of MessageActionBar
The reactions bits were cluttering up `MessageActionBar` so they have now been
extracted to a separate component.
2019-05-08 13:53:41 +01:00
Will Hunt
efc93abb50
Merge branch 'develop' into hs/custom-notif-sounds 2019-05-07 20:04:29 +01:00
J. Ryan Stinnett
2b2bfbeaaf Relax password requirements to score of 3 out of 4
This makes it a bit easier to meet the requirements while still requiring a
fairly strong value. The progress bar displays a score of 3 as reaching 100% for
simplicity.

Fixes https://github.com/vector-im/riot-web/issues/9642
2019-05-07 12:59:53 +01:00
J. Ryan Stinnett
0316deb6c5 Restore access to message quote option on first click
This repairs access to the "Quote" option of the message context menu by passing
down a getter so that we always access the most recent tile and reply thread
instances. This ensures the context menu uses the newest information about the
current event when determining menu options to show.

Fixes https://github.com/vector-im/riot-web/issues/9639
2019-05-07 12:59:53 +01:00
Travis Ralston
c636f890b5 Add configuration flag to disable minimum password requirements
The configuration flag is intentionally long and annoying - the vast majority of people should not need this. The flag is intended to be used in development environments where accounts are often registered with no intention of them sticking around.
2019-05-06 09:55:27 -06:00
Travis Ralston
4ada66d319 Fix rogue instance of old hsUrl property 2019-05-03 11:34:30 -06:00
Travis Ralston
0b1a0c77b7 Make login pass around server config objects
Very similar to password resets and registration, the components pass around a server config for usage by other components. Login is a bit more complicated and needs a few more changes to pull the logic out to a more generic layer.
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
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
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
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
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
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
Will Hunt
0f2cd6ea73 Stick behind a feature flag 2019-04-21 18:01:26 +01:00
Will Hunt
776210c135 Use settings store 2019-04-19 22:31:51 +01:00
Will Hunt
d33df45c5e Linting 2019-04-19 22:06:56 +01:00
Will Hunt
63ab7736ca Add a fancy room tab and uploader 2019-04-19 16:27:30 +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
0a463472b3 update prop types (and fix typo) 2019-04-17 19:05:52 +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