Commit Graph

785 Commits (0fd5714e210d38c5a420517d777e934d67cb7a19)

Author SHA1 Message Date
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
Travis Ralston c94ae6401b Use an AccessibleButton for the clickable element 2019-03-27 13:14:31 -06:00
Travis Ralston 04a9038a05 Alert the user to unread notifications in prior versions of rooms
Fixes https://github.com/vector-im/riot-web/issues/8161
2019-03-26 19:22:41 -06:00
Travis Ralston 4eb9fa6922 Check if the message panel is at the end of the timeline on init
Fixes https://github.com/vector-im/riot-web/issues/8503

componentDidUpdate is called a lot, and we don't really want to keep checking the messagePanel, so this introduces a new flag to check if the init is even needed.
2019-03-26 14:22:48 -06:00
Bruno Windels d84003ac44 dont break room directory and search 2019-03-18 14:05:56 +01:00
Bruno Windels 1bdbf3086f emit timeline_resize in MatrixChat based on ResizeNotifier
as it's used in PersistentElement which could be used at various places
2019-03-15 10:16:21 +01:00
Bruno Windels 891e343df6 create ResizeNotifier to derive which areas of the app resize and emit 2019-03-15 10:16:21 +01:00
Bruno Windels f71a9f10dd remove onChildResize in RoomView as it's unused 2019-03-15 10:16:21 +01:00
Travis Ralston a551bf4a46
Only use exactly as many newlines as we need 2019-03-14 12:44:14 -06:00
Travis Ralston 832660f751 Ensure freshly invited members don't count towards the alone warning
Fixes https://github.com/vector-im/riot-web/issues/7644

As explained in the code, members that have just been invited might not be counted in `getInvitedMemberCount()`, so we help the math along.
2019-03-13 14:06:34 -06:00
Bruno Windels 4e382b1dd9 rename onWidgetLoad to onHeightChanged
as it's easy to confuse it with room widgets, but has nothing to do with it.
2019-03-07 17:02:19 +01:00
Bruno Windels fb672ffb28 change handling of event permalinks in replies 2019-02-25 18:43:08 +01:00
Bruno Windels f7ea9cfeb2 rename all instances of permalinkCreator 2019-02-25 18:43:08 +01:00
Bruno Windels f97ea37717 permalink is one word 2019-02-25 18:43:08 +01:00
Bruno Windels 29be28919d create permalink creator in roomview and pass it on to the event tiles 2019-02-25 18:43:08 +01:00
Travis Ralston 6cc534e503 Fix NPE relating to toggling notifications
The fallthrough for `notifier_enabled` caused a NPE on `payload.error`, so this moves the fallthrough to where it is intended and sanity checks `payload.error` for next time.
2019-02-24 17:45:03 -07:00
Michael Telatynski e12e2c4a3d tidy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 02:57:13 +00:00
Michael Telatynski ac17e22556 Toggle Search using Room Header button
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-02-24 02:56:27 +00:00
Bruno Windels 7d2c6fbd0b update e2e icons when membership changes 2019-02-12 18:34:22 +01:00
J. Ryan Stinnett 44e34d9074 Explain roomId workaround 2019-02-12 08:59:38 +00:00
J. Ryan Stinnett 9d3ba2b3d9 Guard against invalid room object on join 2019-02-11 14:33:19 +00:00
David Baker 043f1ab3f0 Remove key backup & sas from labs 2019-02-08 16:58:09 +00:00
Travis Ralston eac50aa800 Remove old user and room settings
This takes out the old user and room settings, replacing the paths with the new dialog editions. The labs setting has been removed in order to support this change.

In addition to removing the old components outright, some older components which were only used by the settings pages have been removed. The exception is the ColorSettings component as it has a high chance of sticking around in the future.

Styles that were shared by the settings components have been broken out to dedicated sections, making it easier to remove the old styles entirely.

Some stability testing of the app has been performed to ensure the app still works, however given the scope of this change there is a possibility of some broken functionality.
2019-02-04 13:40:21 -07:00
Travis Ralston 8307af6871
Merge pull request #2563 from matrix-org/travis/remove-e2e-beta-dialog
Remove warning about encryption being beta
2019-02-01 15:12:25 -07:00
Bruno Windels 45e982ac13
Merge pull request #2557 from matrix-org/bwindels/e2eicons
Add e2e icon to room header/composer/member info, more ...
2019-02-01 22:02:28 +00:00
Travis Ralston 016bd028ba Remove warning about encryption being beta 2019-02-01 14:56:29 -07:00
Bruno Windels 987b119731 also update e2e icon once the room becomes encrypted 2019-02-01 19:14:11 +01:00