Commit graph

811 commits

Author SHA1 Message Date
Zoe
0f2e2ea069 Update shield display rules 2020-03-27 13:44:54 +00:00
Aaron Raimist
76104edeca
Mark room as read when escape is pressed
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2020-03-24 21:37:45 -05:00
Michael Telatynski
27ec81f1a2 Migrate RoomView to React Contexts in the hope for better temporal stability
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-22 09:41:14 +00:00
Michael Telatynski
064b533a4b Merge branches 'develop' and 't3chguy/shortcuts3' of github.com:matrix-org/matrix-react-sdk into t3chguy/shortcuts3
 Conflicts:
	src/components/structures/RoomView.js
2020-03-20 16:06:07 +00:00
Michael Telatynski
1c0c3c4695 Watch for show-RR settings changes, use room-specific and fix margins
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-20 09:29:59 +00:00
Michael Telatynski
2b40bb905a Add shortcut CmdOrCtrl+. to toggle right panel. Gets rid of forced-update on right panel changes which may not be the ones we care about.
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-20 00:18:24 +00:00
Michael Telatynski
a9f414dafe Remove unused SearchableEntityList.js
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-13 23:23:23 +00:00
Michael Telatynski
87e717cd39 Fix Quote on search results page
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-02-28 23:12:10 +00:00
Travis Ralston
9be61497fb Handle errors when previewing rooms more safely
Fixes https://github.com/vector-im/riot-web/issues/12500

See https://github.com/matrix-org/synapse/issues/6992 for additional context.
2020-02-25 16:11:07 -07:00
J. Ryan Stinnett
8e39bd8885 Remove unused CIDER setting watcher
This setting watcher for CIDER seems unused and logs a warning at the moment, so
this change removes it.
2020-02-24 12:36:25 +00:00
Zoe
41f4b38fe8 Do not show alarming red shields on large encrypted rooms for your own device
Fixes: https://github.com/vector-im/riot-web/issues/12214
2020-02-03 16:53:32 +00:00
J. Ryan Stinnett
81ee27f41e Replace device with session in UI text
This replaces "device" with "session" throughout user-visible text at the React
layer. Variable names and comments are left as-is for now.
2020-01-29 15:52:32 +00:00
Zoe
1964e18315 Fix issue where we don't notice if our own devices shouldn't be trusted 2020-01-27 16:40:56 +00:00
David Baker
3d7137d4ad Setup flow for cross-signing on login / registration
Still outstanding:
 * Keep password from login / registration
 * Confirmation on skip button

Fixes https://github.com/vector-im/riot-web/issues/11902
2020-01-24 19:11:57 +00:00
Michael Telatynski
2c40b73ff6
Merge pull request #3910 from matrix-org/t3chguy/cross-signing-composer
Cross Signing redesign for composer
2020-01-24 13:18:09 +00:00
Zoe
1d686fe49e
Merge pull request #3908 from matrix-org/zip/11935-room-list-decoration
Room list reflects encryption state
2020-01-24 11:14:53 +00:00
Zoe
395c82b1e5
Update src/components/structures/RoomView.js
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2020-01-24 11:04:40 +00:00
Michael Telatynski
1747a62118 add missing awaits 2020-01-23 11:55:08 +00:00
Michael Telatynski
6c3ac2d0c4 Add Reject & Ignore user button to invites view 2020-01-23 11:50:59 +00:00
Zoe
d68db74efe Room list reflects encryption state 2020-01-23 10:46:05 +00:00
Michael Telatynski
b7d1c17ad1 simple optimization to bail out of check on first failure 2020-01-22 16:56:27 +00:00
Zoe
908630c0d9 *rude grumbling noises about @dbkr* 2020-01-17 11:30:45 +00:00
Zoe
d02185e4af whoops, the number of unverified users matters to the logic 2020-01-17 10:22:53 +00:00
Zoe
510b08c88b changed logic to reflect the task 2020-01-17 10:18:50 +00:00
Zoe
8efc45b31a no need to verify our own devices for every room 2020-01-17 10:04:34 +00:00
Zoe
82c5349c4e Updated to properly handle logic 2020-01-16 16:31:50 +00:00
Zoe
9ac3cb6fd0 Merge remote-tracking branch 'origin/develop' into zip/11225-shields-distinguish-encrypt-from-verify 2020-01-16 11:23:57 +00:00
Zoe
ff05041a5a Update room shield icons to represent encrypted but unverified chats in less alarmed tones 2020-01-16 11:10:23 +00:00
Travis Ralston
5fd27a10bb Merge branch 'develop' into travis/sourcemaps 2020-01-13 11:19:41 -07:00
David Baker
63942d5200 Fix listener leak on RoomView
It looks like this was causing entire detached DOM trees to leak
in memory by react's internal fibers holding onto them from the
component.
2020-01-10 11:12:52 +00:00
Travis Ralston
727ce892de Fix remaining RoomView conflict
RoomContext was pulled out to its own file.
2020-01-09 14:17:33 -07:00
Travis Ralston
3e5cc9550b Fix import merge conflicts, removing any that aren't needed anymore
Many imports were removed as part of refactoring work, so here we are.
2020-01-09 14:17:33 -07:00
Travis Ralston
fde32f13a5 [CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop 2020-01-09 14:15:09 -07:00
Michael Telatynski
d31c863563 Remove all usages of slate in favour of CIDER
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-06 00:15:48 +00:00
Michael Telatynski
e9ebfa100f Do not show Top Unread Messages Bar and Jump to bottom button if searching 2019-12-26 20:32:25 +00:00
Michael Telatynski
1098fc939a
Merge pull request #3771 from matrix-org/t3chguy/ReactDOM.findDOMNode
stop using ReactDOM.findDOMNode in componentWillUnmount, use refs
2019-12-23 17:16:47 +00:00
Michael Telatynski
17f5849985 stop using ReactDOM.findDOMNode in componentWillUnmount, use refs 2019-12-23 12:24:49 +00:00
Travis Ralston
0d2cb6e731 Import haveTileForEvent() from the right place 2019-12-22 21:23:07 -07:00
Travis Ralston
d002c2ccde Merge branch 'travis/babel7-wp-es6-export' into travis/sourcemaps-es6 2019-12-22 21:20:13 -07:00
Travis Ralston
042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston
d56f0f2a25 Convert many imports to handle ES6 exports
Reliant upon https://github.com/matrix-org/matrix-react-sdk/pull/3761
2019-12-22 21:04:42 -07:00
Travis Ralston
4aec432b30 Convert the more complicated CommonJS exports to ES6-style 2019-12-22 21:01:03 -07:00
Travis Ralston
344dac4fb9 Convert CommonJS exports to ES6-compatible exports
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
2019-12-22 21:01:02 -07:00
Michael Telatynski
937b32663c Migrate away from Legacy React Contexts 2019-12-17 17:26:12 +00:00
Michael Telatynski
d28a892bb0 Stop using KeyboardEvent.keyCode as it is deprecated 2019-12-16 17:14:03 +00:00
J. Ryan Stinnett
2df72bfde2 Update room / user decoration for cross-signing 2019-12-13 17:57:26 +00:00
Travis Ralston
225695ab5c Fix exports for rate limited functions and MatrixClientPeg
MatrixClientPeg in particular doesn't work very well with this.
2019-12-12 19:33:08 -07:00
Travis Ralston
7230d51cca
Merge pull request #3703 from matrix-org/travis/right-panel-v2
Refactor RightPanel to match expected behaviour
2019-12-11 10:50:45 -07:00
Michael Telatynski
d22985f12e Migrate string refs over to createRef
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-08 12:16:17 +00:00
Michael Telatynski
4c55f3c5b5 Remove unused refs
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-08 12:12:06 +00:00
Travis Ralston
bbdff701b4 Actually render the right panel in the new system 2019-12-05 23:40:25 -07:00
Travis Ralston
6e882251bd Break the right panel completely
This lays a foundation for redirecting all the traffic through the new store, but for now the core parts of the app need to stop caring if the right panel is open.
2019-12-05 17:47:18 -07:00
Matthew Hodgson
9f455fae4b
Merge branch 'develop' into matthew/fix_logging 2019-11-26 10:19:48 +00:00
Matthew Hodgson
9fd45d1f14 console.log doesn't take %s substitutions 2019-11-26 01:14:03 +00:00
Michael Telatynski
6121420113
Merge branch 'develop' into t3chguy/remove_bluebird 2019-11-20 15:21:23 +00:00
Michael Telatynski
d4d51dc61f Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Damir Jelić
cc2ee53824 EventIndex: Add some more docs and fix some lint issues. 2019-11-13 16:21:26 +01:00
Damir Jelić
e296fd05c0 RoomView: Move the search logic into a separate module. 2019-11-12 15:39:26 +01:00
Michael Telatynski
168b1b68bb Revert "s/.done(/.then(/ since modern es6 track unhandled promise exceptions"
This reverts commit 09a8fec2
2019-11-12 11:56:21 +00:00
Michael Telatynski
09a8fec261 s/.done(/.then(/ since modern es6 track unhandled promise exceptions 2019-11-12 11:51:23 +00:00
Damir Jelić
3f53691834 RoomView: Use platform specific search if our platform supports it.
This patch extends our search to include our platform specific event
index.

There are 3 search scenarios and are handled differently when platform
support for indexing is present:

    - Search a single non-encrypted room: Use the server-side search
        like before.
    - Search a single encrypted room: Search using our platform specific
        event index.
    - Search across all rooms: Search encrypted rooms using our local
        event index. Search non-encrypted rooms using the classic
        server-side search. Combine the results.

The combined search will result in having twice the amount of search
results since comparing the scores fairly wasn't deemed sensible.
2019-10-11 16:55:01 +02:00
Michael Telatynski
e200193b0a DRY and fix useCiderComposer being in both labs and preferences
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-04 10:15:00 +01:00
Travis Ralston
853c522467 Enable CIDER composer by default
Also convert the setting to a watched setting to apply in realtime.
2019-10-03 23:20:40 -06:00
Michael Telatynski
9e8234c98f Handle null from TimelinePanel.getScrollState in RoomView _getScrollState
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-03 23:00:08 +01:00
J. Ryan Stinnett
b605c0048d Add an error boundary around the RoomView
This adds a more specific boundary around the `RoomView` for room-specific
errors and is an example how we could use add boundaries around just a portion
of the app.
2019-10-02 17:31:22 +01:00
Travis Ralston
fc66e69c02 Rename RoomPermalinkCreator -> Permalinks due to scope
The file handles more than just a RoomPermalinkCreator, so we should name it accordingly.
2019-09-30 20:39:58 -06:00
Travis Ralston
64aa6695f5 Move matrix-to.js to utils/permalinks/RoomPermalinkCreator
Just a little bit of refactoring to make the feature of custom prefixes a bit easier.
2019-09-30 12:16:46 -06:00
Michael Telatynski
80add7be92 delint more properly
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-10 08:38:51 +01:00
Michael Telatynski
ef2ff31a46 Fix replying from search results for this and all rooms
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-09 09:34:08 +01:00
Michael Telatynski
abf111ecbd Migrate away from React.createClass for non-auth structures. React 16 :D
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-30 10:34:59 +01:00
Bruno Windels
b395fad834 add feature flag, allowing to revert to old slate editor 2019-08-22 14:07:43 +01:00
Michael Telatynski
4517fea496 Introduce RoomContext for sharing state between RoomView and children
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-31 00:47:38 +01:00
Travis Ralston
7f2ab39609
Merge pull request #3142 from matrix-org/travis/preview-loading
Show a loading state for slow peeks
2019-06-27 09:24:25 -06:00
Travis Ralston
5f242f0285 Supply oobData instead of erroring 2019-06-25 20:57:07 -06:00
Travis Ralston
ca6ddf324f Show a loading state for slow peeks 2019-06-25 20:56:33 -06:00
David Baker
2c10557f26 Don't NPE if no third party invite 2019-06-10 12:32:53 +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
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
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
Léo Mora
2342eb5426
Update 'Rooms' import 2019-05-09 16:17:54 +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
22874f62ab Merge branch 'develop' into bwindels/stylepreviewbar 2019-04-17 11:06:21 +02: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
fd6c594a8f put auth buttons in preview bar 2019-04-15 17:52:17 +02:00
Travis Ralston
0479901daa Load data for permalink creators once 2019-04-12 10:38:39 -06:00
Bruno Windels
16ed06cebb dont show room header and timeline when room cant be peeked (just preview bar) 2019-04-12 12:47:52 +02:00
Travis Ralston
ccf292f053 Load permalink creators to get proper state of the room 2019-04-11 10:59:00 -06:00
Bruno Windels
4e8b3c34c0 move room preview bar below timeline 2019-04-10 17:49:45 +02:00
Travis Ralston
e4a9d4f5c8 Cache permalink creators out of the component's state 2019-04-09 12:01:09 -06:00
Travis Ralston
c49afe4d72 Use dedicated permalink creators in search results with multiple rooms
Fixes https://github.com/vector-im/riot-web/issues/9376

This also would have happened in "All Rooms" searches.
2019-04-08 16:23:00 -06:00
David Baker
59210564b7 Fix upload cancel in e2e rooms
This is a bit of a mess of passing promises around - we weren't
taking the right promise to pass to cancelUpload.

Also e2e uploads take time to read into memory & encrypt, so allow
cancelling them during those phases too, even though we can't abort
those phases before they're done - we do mark the upload as cancelled
though so filter the current uploads for cancelled ones.

Fixes https://github.com/vector-im/riot-web/issues/4891
2019-04-08 17:53:39 +01:00
J. Ryan Stinnett
20c31082b5 Set E2E room status to warning when crypto is disabled
When crypto is disabled for the current device, we can't tell whether there are
unverified devices since we aren't tracking devices at all.

Let's be safe and default to the warning state.

See also https://github.com/matrix-org/matrix-js-sdk/pull/889
2019-04-08 16:28:19 +01:00
David Baker
c8ba7d3434 Fix a few bugs introduced in file upload rework
* Fix the widget picture_snapshot command (not that I can find
   anything that uses it)
 * Remove unused prop
 * Fix plural on ContentMessages
2019-04-05 15:09:07 +01:00
David Baker
b6faaf419c PR feedback 2019-04-02 10:50:17 +01:00
David Baker
5b2cee2fc1 Implement redesigned upload confirmation screens
Also fairly significant refactor of the uploading code: there are
a number of different ways of triggerring a file upload and each
went through a different code path (the media config size limit
worked on one of those paths). Basically take a lot of code out
of the views and put it into ContentMessages.

Sorry about the size of this patch.

https://github.com/vector-im/riot-web/issues/7565
2019-04-01 16:42:41 +01:00
Bruno Windels
a326c83016
Merge pull request #2842 from matrix-org/bwindels/bacat-scrolling-merged-develop
BACAT Scrolling
2019-03-29 14:02:15 +00:00
Travis Ralston
a0e3182e47
Merge pull request #2829 from matrix-org/travis/unread-button
Check if the message panel is at the end of the timeline on init
2019-03-28 11:26:48 -06:00
Bruno Windels
41c5582a7b make resizeNotifier optional so tests don't fail 2019-03-28 17:56:12 +01:00
Travis Ralston
6a840a56d6 Add a comment to explain the state of affairs for refs.messagePanel 2019-03-28 09:50:17 -06:00