Commit Graph

313 Commits

Author SHA1 Message Date
Bruno Windels
aedc220b62 fix (some) lint warnings 2019-01-07 16:33:23 +01:00
Bruno Windels
290dc9d8fb Merge branch 'experimental' into bwindels/roomgridview-experimental 2019-01-07 14:17:57 +01:00
Travis Ralston
8017f0a4a1 Merge remote-tracking branch 'origin/experimental' into travis/develop-for-real 2019-01-03 16:00:23 -07:00
David Baker
f928be6f59 Revert "Merge pull request #2395 from matrix-org/dbkr/merge_develop_experimental"
This reverts commit ad47144355.
2019-01-03 15:37:03 -07:00
David Baker
7d161de35b Partial merge of develop to experimental
Does not include #2336 as the file has been moved out from underneath it:
will do this separately
2019-01-03 15:02:58 +00:00
Bruno Windels
532fb6ea78 update comment as well 2018-12-17 13:58:36 +01:00
Bruno Windels
4fffb55cc5 ignore any unknown tags 2018-12-17 13:52:32 +01:00
Bruno Windels
7b6c863377 fix lint 2018-12-14 15:53:52 +01:00
Bruno Windels
04bb13bb7b emit join error over own dispatcher, meh 2018-12-13 13:02:35 +01:00
Bruno Windels
368ef9e8e8 hack so we don't revert to single room view when viewing grid 2018-12-13 13:02:35 +01:00
Bruno Windels
9a24249fb5 emit focus_composer after updating the active room in GroupGridView
also change the active room from there so RoomView is oblivious
to grid view stuff
2018-12-13 13:01:59 +01:00
Bruno Windels
fbfbefe4fe also forward actions from room dispatcher to global one
avoiding replay if the action would be forwarded back to
the same room dispatcher

also some fixing & renaming in OpenRoomsStore
2018-12-13 13:01:59 +01:00
Bruno Windels
cf0f75cad4 allow changing active room in grid by clicking it 2018-12-13 13:01:59 +01:00
Bruno Windels
6ec6303b97 support opening all rooms of a group in OpenRoomsStore
using new view_group_grid action
2018-12-13 13:01:59 +01:00
Bruno Windels
d7924ad1a8 less ambigious name for local dispatcher 2018-12-13 13:01:59 +01:00
Bruno Windels
f95b26179f make copy of initial state, as there can be multiple instances now 2018-12-13 13:01:59 +01:00
Bruno Windels
869c81eb90 cram OpenRoomsStore between RoomViewStore and dispatcher
the idea is that it will keep a RoomViewStore for every
room on the screen, and also keep track of which one is
the current one.

For now, it just replicates the existing functionality of
having just 1 room on the screen.

Since the RoomViewStore just has access to a local dispatcher
and not the global anymore, all dispatching of actions
needs to be moved to the OpenRoomsStore, so room alias resolving,
event forwarding, ... is moved there.
2018-12-13 12:59:18 +01:00
David Baker
d7319d7e4f
Merge pull request #2330 from matrix-org/travis/fix-pinned-rooms
Fix pinning of rooms without badges
2018-12-07 17:44:36 +00:00
Travis Ralston
216fc6412a Fix pinning of rooms without badges
Fixes https://github.com/vector-im/riot-web/issues/7723

This adds consideration for rooms that are "mentions only" (or "unread-muted" as internally referenced).
2018-12-05 13:52:27 -07:00
Travis Ralston
c46bae59b2
Merge branch 'develop' into travis/cors-on-join 2018-12-05 11:30:19 -07:00
Travis Ralston
7e817f4aa9
Add a helpful comment 2018-12-05 11:29:53 -07:00
J. Ryan Stinnett
5fc25fd6ba Only mark group as failed to load for summary
Currently, any error in the `GroupStore`s several requests can cause the whole
`GroupView` component to hide and be mark the group as failed to load.

Since it is known that group members may fail to load in some cases, let's only
show failed to load for the whole group when the summary fails.

This also strengthens the `GroupView` test by ensuring we wait for multiple
updates for checking results.

Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-04 18:32:16 -06:00
Travis Ralston
2b027b716f Suppress CORS errors in the 'failed to join room' dialog
This isn't pretty, but it does address https://github.com/vector-im/riot-web/issues/7526

Tested with Chrome and Firefox to ensure the message is stable enough to parse.
2018-11-27 14:23:28 -07:00
Travis Ralston
f9d5c11d8d Regenerate the room list when m.fully_read is issued
Not doing so results in the RoomListStore tracking stale data when the user reads messages on another device. The visual effect of this is rooms being incorrectly pinned in places they shouldn't be, such as the top of the list. This also fixes another visual bug where rooms don't move down once their timelines are read. This second issue is mot prominent when multiple rooms have been pinned to the top, and the middle one is read ahead of the others - it'll stick around until some other condition decides to wipe the room's cached state.

Fixes https://github.com/vector-im/riot-web/issues/7653
2018-11-04 19:47:24 -07:00
Travis Ralston
3960ae2fcd Add more commentary around how the roomCache works 2018-11-01 17:17:01 -06:00
Travis Ralston
a713cc5c52 Compare the right types of events 2018-11-01 17:07:05 -06:00
Travis Ralston
122868e32f Removing timing/performance tracking on room list store
This was used to verify the fix was actually making improvements and can be safely taken out.
2018-11-01 16:30:48 -06:00
Travis Ralston
0c7aadb92b Improve room list sort performance by caching common variables
This won't help much if the user is in a ton of highly active rooms, but for the most part this will help those in thousands of rooms, many of which are likely to be quiet. 

Fixes https://github.com/vector-im/riot-web/issues/7646
Fixes https://github.com/vector-im/riot-web/issues/7645 (due to timestamp ordering)
2018-11-01 16:28:13 -06:00
Travis Ralston
272acfa2f5 Appease the linter 2018-11-01 14:46:39 -06:00
Travis Ralston
5558b7a3b2 Avoid hitting the SettingsStore thousands of times when generating room lists
Should fix https://github.com/vector-im/riot-web/issues/7646 to some degree
2018-11-01 14:43:15 -06:00
Travis Ralston
57b99893e5
Merge pull request #1936 from turt2live/travis/pinned-room-list
Add options to pin unread/mentioned rooms to the top of the room list
2018-11-01 08:04:12 -06:00
Aaron Raimist
49ce4ef117
eslint --fix src/
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-26 22:50:38 -05:00
Travis Ralston
3d8f0adf56 Move pinned rooms check to the RoomListStore 2018-10-12 14:35:54 -06:00
Bruno Windels
2ed414494f use Room.myMembership event instead of RoomMember.membership for me
This is more reliable with LL enabled as the syncing user is
only known when it was active in the current timeline
or when the members have been loaded
2018-09-17 19:14:52 +02:00
Bruno Windels
fe734b944e remove obsolete warning as peeking will cause the membership to be null 2018-09-13 18:45:38 +02:00
Bruno Windels
9a3717a274 only dispatch an action for self-membership
as everything listens to the dispatcher, dispatching an action can be quite slow,
especially when only matched in one listener, and the rest all having to be called
to just say "no, thanks". This is especially the case for the RoomMember.membership
event being put on the dispatcher, as there can be thousands of these events
when the room members are loading.

Since the RoomMember.membership action is only used on one place,
and only for the syncing user, change it to just that and only dispatch
in that case. This saves 100-300ms when setting the OOB members in
a big room (7000k members)

Maybe later on we can back this by room.getMyMembership() and avoid the
listener even...
2018-09-07 19:53:01 +02:00
David Baker
54620591cc Don't crash if the value of a room tag is null
We were checking that the order was not null, but not the object
itself.
2018-08-23 12:05:09 +01:00
David Baker
941a3cfa53 Support M_INCOMPATIBLE_ROOM_VERSION
For https://github.com/vector-im/riot-web/issues/7164
2018-08-21 18:33:25 +01:00
David Baker
94c7ae2bf5
Merge pull request #2098 from matrix-org/dbkr/destroy_widget
Destroy non-persistent widgets when switching room
2018-08-17 09:53:41 +01:00
David Baker
e3643bd74c Lint 2018-08-17 09:42:23 +01:00
Bruno Windels
cead4096d8
Merge pull request #2118 from matrix-org/bwindels/feature_lazyloading
Lazy loading of room members
2018-08-16 18:14:55 +02:00
Bruno Windels
440ebd187d getMyMembership() doesn't take id anymore 2018-08-14 11:47:05 +02:00
David Baker
f44cc8e66e
Merge pull request #2112 from matrix-org/dbkr/recognise_server_notices_room
Recognise server notices room(s)
2018-08-07 09:52:25 +01:00
David Baker
b5ce1ac5e1 Recognise server notices room(s)
and put them in their own section at the bottom
2018-08-06 18:00:40 +01:00
David Baker
b2302af708 Update room tags behaviour to match spec more
Fix Riot's behaviour with room tags after my cleanup in
https://github.com/matrix-org/matrix-doc/pull/1457 . Although, reading
it again, it's not clear how you're supposed to tell the difference
between a reverse-dns tag name and a legacy freeform text tag
(contains a '.'?) - I've left it detecting these as freeform text
for now.
2018-08-06 16:58:54 +01:00
David Baker
7875d37c8e Destroy non-persistent widgets when switching room 2018-08-01 15:01:11 +01:00
Bruno Windels
cfd20c7e85 fix error/tests 2018-07-25 16:10:49 +02:00
Bruno Windels
d87d34030a fix dm detection and conf call code with lazy loading 2018-07-25 16:10:49 +02:00
Bruno Windels
7ea913ccec fall back to synced membership when own membership is not yet available (due to lazy loading) 2018-07-25 16:10:49 +02:00
Bruno Windels
8529bc55e3 use helper method for knowing whether a user was kicked
mainly for readability, but also to discourage grabbing into the member
because of lazy loading changes
2018-07-25 16:10:49 +02:00
Bruno Windels
de3e143a8f only lazy load the members when viewing a joined room 2018-07-25 16:10:49 +02:00
Bruno Windels
8c985bd049 ask client to lazy load room members when viewing a room 2018-07-25 16:10:49 +02:00
David Baker
cdd73e6e1f Check matrix client exists when stopping 2018-07-24 16:55:45 +01:00
David Baker
7044410a13 Move destroyPersistentWidget to store 2018-07-24 16:50:34 +01:00
David Baker
ec4c7ffb71 Make ActiveWidgetStore clear persistent widgets
ActiveWidgetStore is now reponsible for removing the current
persistent widget from the store if it's been removed from whatever
room it was in. As per comment, this leaves us with the store updating
itself in this case but in all other cases, views call setters on the
store to update its state. We should make it so the store keeps itself
up to date and views aren't responsible for keeping the store up to date.

The store now emits events so it can notify PersistentApp when it changes.

Fixes https://github.com/vector-im/riot-web/issues/7076
2018-07-24 16:21:43 +01:00
David Baker
7aab6fa6f1 Merge remote-tracking branch 'origin/develop' into dbkr/widget_echo 2018-07-18 09:35:57 +01:00
Matthew Hodgson
02c3bc9476
Merge pull request #2069 from matrix-org/t3chguy/slate_cont2
Moar Slate Fixes
2018-07-17 17:15:01 +01:00
Michael Telatynski
23b6abf8b7
no point saving history at this point, maybe future supported
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-17 09:27:11 +01:00
Michael Telatynski
cbe5944ff0
preserve selection and history between room changes and refreshes
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-16 22:04:42 +01:00
David Baker
a79caed0c9 Merge remote-tracking branch 'origin/develop' into dbkr/tiny_jitsi_follows_you_between_rooms 2018-07-16 17:21:51 +01:00
David Baker
379d65bd6c
Merge pull request #2064 from matrix-org/t3chguy/slate_cont2
simplify MessageComposerStore and improve its performance
2018-07-16 17:20:48 +01:00
Michael Telatynski
2f1779751b
make the MessageComposerStore stateless for better performance
and inter-tab composition (by simplifying it. WIN-WIN)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-16 16:56:08 +01:00
David Baker
d16ac4d80c
Merge pull request #1890 from matrix-org/matthew/slate
Replace Draft with Slate
2018-07-16 14:16:25 +01:00
David Baker
4c6419a3c5 Merge remote-tracking branch 'origin/develop' into dbkr/widget_echo 2018-07-16 13:24:13 +01:00
David Baker
0f32c3a018 PR feedback 2018-07-16 13:18:10 +01:00
Michael Telatynski
59a14f2c0b
re-hydrate Values which have been serialized into LocalStorage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-15 20:34:27 +01:00
David Baker
e56feea9ec Put always-on-screen widgets in top left
always-on-screen widgets now appear in the top-left where the
call preview normally is if you're not in the room that they're in.

Fixes https://github.com/vector-im/riot-web/issues/7007
Based off https://github.com/matrix-org/matrix-react-sdk/pull/2053
2018-07-12 18:43:49 +01:00
David Baker
8f10ee01c6 Implement always-on-screen capability for widgets
As per https://github.com/matrix-org/matrix-doc/issues/1354

This is whitelisted to only jitsi widgets for now as per comment,
mostly because any widget that we may make always-on-screen we need
to preemptively put in a PersistedElement container, which is
unnecessary for any other widget.

Apologies that this does a bunch of refactoring which could have
been split out separately: I only discovered what needed to be
refactored in the process of doing this.

Fixes https://github.com/vector-im/riot-web/issues/6984
2018-07-11 18:07:32 +01:00
Michael Telatynski
fd4f9679df
convert md<->rt if the stored editorState was in a different state
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-11 09:43:39 +01:00
Matthew Hodgson
efdc5430d7 merge develop 2018-07-09 17:50:07 +01:00
David Baker
b6f854abe4 Simplify event name as it's the only one 2018-07-05 20:00:42 +01:00
David Baker
658ac73064 comments 2018-07-05 19:57:24 +01:00
David Baker
3f60300983 Remove redundant check 2018-07-05 19:51:12 +01:00
David Baker
8c10dc1860 Remove unhelpful commented code 2018-07-05 19:50:11 +01:00
David Baker
7e2b559ccd Make if clearer 2018-07-05 19:46:37 +01:00
David Baker
fb7ce9dd7f More doc 2018-07-05 19:40:45 +01:00
David Baker
1f2d279a0a Consistency, redundant check & doc 2018-07-05 19:38:42 +01:00
David Baker
eb552e5cef Just pass the roomId into WidgetEchoStore 2018-07-05 18:43:20 +01:00
David Baker
3199e68578 Lint 2018-07-03 11:22:19 +01:00
David Baker
8b64ddcbe8 Do some level of local echo for widgets
* Show a spinner while we wait for widgets to be deleted
 * Hide widgets while they're pending deletion
 * Don't put another jitsi widget into the room if there's already
   one pending
2018-07-03 11:16:44 +01:00
Michael Telatynski
a548c83647
when the user switches room, close room settings
this is especially annoying if they choose Leave Room
which indirectly switches room

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-26 17:07:39 +01:00
Luke Barnard
da9fe9917b Fix click on faded left/right/middle panel -> close settings
- implement generic dispatch to close user/room/group settings
 - use dispatch to allow clicks on disabled left/right/middle panel to
   close settings

A much more maintainable approach would be to use dedicate routing
instead of doing different things depending on what page of the app is
currently being viewed. At the very least we could make the concept of a
settings page generic.
2018-05-29 13:16:39 +01:00
Matthew Hodgson
9c0c806af4 correctly send pills in messages 2018-05-12 20:04:58 +01:00
Matthew Hodgson
02947063d3 Merge branch 'develop' into matthew/slate 2018-05-05 22:45:44 +01:00
Michael Telatynski
f2102e283c
Merge branches 'develop' and 't3chguy/m.relates_to' of github.com:matrix-org/matrix-react-sdk into t3chguy/m.relates_to 2018-05-02 13:08:38 +01:00
David Baker
3d478c3c3a
Merge pull request #1867 from matrix-org/luke/fix-group-request-concurrency
Prevent error responses wedging group request concurrency limit
2018-05-02 10:45:12 +01:00
Luke Barnard
2dfb3146b0 Simplify concurrent request error handling 2018-05-02 10:39:15 +01:00
Luke Barnard
71c1198d12 Rewrite limitConcurrency to fix error catching
Make sure that we only catch errors that are a result of
calling fn()
2018-05-01 18:01:25 +01:00
Luke Barnard
bd703b17e5 Update documentation for GroupStore.registerListener 2018-05-01 16:57:28 +01:00
Luke Barnard
56ec7713bb Refresh group rooms and members when selecting a tag 2018-05-01 16:54:14 +01:00
Luke Barnard
4d8394954c Only create one group store listener in RoomList
Instead of creating several and destroying the reference to the one
created before.
2018-05-01 14:24:58 +01:00
Luke Barnard
da1a5616eb Prevent error responses wedging group request concurrency limit
Fixes https://github.com/vector-im/riot-web/issues/6592
2018-05-01 14:04:13 +01:00
Luke Barnard
e3a07be127 Remove GroupStore logging 2018-05-01 13:14:01 +01:00
Luke Barnard
023daef4b7 Refactor GroupStores into one global GroupStore
Take a step closer to a flux-like architecture for group data, for
the purposes of providing features that require it.

Now the app has a single GroupStore that can be poked to fetch
updates for a particular group.
2018-05-01 11:24:17 +01:00
Matthew Hodgson
75a2be1a8d WIP (doesn't build yet) replacing draft with slate 2018-04-23 01:13:18 +01:00
Michael Telatynski
c77807bd22
Merge branches 'develop' and 't3chguy/m.relates_to' of github.com:matrix-org/matrix-react-sdk into t3chguy/m.relates_to
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

# Conflicts:
#	src/i18n/strings/en_EN.json
#	src/i18n/strings/eu.json
#	src/i18n/strings/fr.json
#	src/i18n/strings/lv.json
#	src/i18n/strings/ru.json
#	src/i18n/strings/zh_Hant.json
2018-04-12 09:48:06 +01:00
Luke Barnard
42141f7da7 Fetch group data when leaving or joining to update the view 2018-04-10 10:03:54 +01:00
Michael Telatynski
b5ed08eba2
Merge
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-03-24 17:52:49 +00:00
Luke Barnard
35cc443562 Limit group requests to 3 at once
using a FIFO queue.

This is needed in order to lower the priority of getting group
state and prioritise everything else, namely initial sync.

It should be noted that this by no means guarantees that the
first incremental sync will happen sooner; the client could
end up doing some other requests first instead.
2018-03-13 11:35:19 +00:00
Luke Barnard
faf517419f Return null instead of undefined on failure 2018-03-06 12:14:41 +00:00