Commit graph

93 commits

Author SHA1 Message Date
Travis Ralston
b0b7932f5f Move status context menu to its own component
This fixes a lot of the state bugs such as buttons not updating, etc. 

This commit also adds the border around the avatar to indicate a status is set.
2018-12-12 22:26:39 -07:00
Travis Ralston
a91963e5ee Replace the avatar next to the composer with a status entry menu
The checkmark might change, and there appears to be some state tracking mishaps that need to be worked out.

Part of https://github.com/vector-im/riot-web/issues/1528
2018-12-12 18:03:30 -07:00
Aaron Raimist
49ce4ef117
eslint --fix src/
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-26 22:50:38 -05:00
Bruno Windels
0767c278e7 put userId next to member in read receipt, fall back when member missing 2018-10-10 16:14:09 +02:00
Bruno Windels
debcc20604 also show spinner on new CATCHUP state 2018-08-30 15:39:48 +02:00
Bruno Windels
d7868dbe33 delegate avatar selection to room for rooms with two members (but not in m.direct) 2018-08-30 10:54:01 +02:00
Bruno Windels
06160f5fae fix lint 2018-08-27 18:52:33 +02:00
Bruno Windels
6a077655e9 bring back old behaviour to also show member avatars if not marked as 1:1 room 2018-08-27 18:48:21 +02:00
Bruno Windels
36665d3c69 Fix: dont show 1:1 avatar for room with only 2 members loaded 2018-08-27 17:40:31 +02:00
Matthew Hodgson
8a1bd8da69 tell eslint to ignore viewAvatarOnClick being unused 2018-05-06 00:22:14 +01:00
Matthew Hodgson
500f58a963 fix deeply irritating react warning about viewAvatarOnClick on BaseAvatar 2018-05-05 23:25:50 +01:00
Aidan Gauland
6a918861bb Add UI for displaying room avatars full size
Change the onClick action on the RoomAvatar inside RoomHeader so that it brings
up a lightbox with the full-size avatar.
2018-04-21 15:47:31 +12:00
Travis Ralston
fe2cbc584d Merge branch 'develop' into travis/remove-presence 2018-04-11 15:17:28 -06:00
Luke Barnard
d877384d64
Merge pull request #593 from matrix-org/luke/fix-render-1-1-avatars-when-others-leave
Use correct 1-1 room avatar after users leave
2018-04-11 11:21:18 +01:00
Luke Barnard
8ca1243ecb Add null-guard to prevent RoomAvatar NPE when room is null
which may have been occuring when peeking into a room that the
client hasn't got a Room object for.

Fixes https://github.com/vector-im/riot-web/issues/6432
2018-04-03 17:35:34 +01:00
Luke Barnard
c903cc6375 Fix tests 2018-03-14 14:55:36 +00:00
Luke Barnard
8672b97f9a Improve room list performance when receiving messages
In summary this makes RoomTiles (and RoomAvatars) do more for
themselves in terms of reacting individually to state changes in
the js-sdk.

Instead of force updating the entire room list for avatar changes
and room name changes, do this in the RoomTile and RoomAvatar
instead. This increases the number of listeners listening to the
matrix client, but allows us to properly implement a
shouldComponentUpdate for RoomTile (because the avatar, name and
notification count are now in component state)
2018-03-14 14:29:55 +00:00
David Baker
d416b9d7d1 Copyright 2018-03-12 15:24:32 +00:00
David Baker
ac85938186 Fix syntax fail 2018-03-12 15:23:22 +00:00
lukebarnard
2549b44768 Linting 2018-02-07 18:57:32 +00:00
Luke Barnard
cf4ae681f4
Offline mode (#1723)
* Allow the client to run without connection to HS (i.e. using indexeddb)

Allows running without having pushRules (it's safe not to have these 
when running from indexeddb sync.)

This means rooms will be displayed with "unknown" notifcation state.

This assumes anything that uses the push rules will get pushRule state
again when the client starts syncing again.

For recovering from being disconnected, 
* If an avatar has fallen back, try again on reconnection
* If a thumbnail image failed to load, retry on reconnect
* Load joined groups when reconnecting

Update tests to give MELS a context.matrixClient
2018-02-06 17:50:53 +00:00
Luke Barnard
121b776e8a
Merge branch 'develop' into luke/fix-render-1-1-avatars-when-others-leave 2018-02-06 16:46:25 +00:00
Aidan Gauland
35780f5ae0 Remove use of deprecated React.PropTypes
Replace all uses of React.PropTypes with PropTypes and importing PropTypes from
'prop-types'.
2017-12-26 14:03:18 +13:00
Travis Ralston
cc5eb77658 Remove presence management
The feature is incredibly buggy and doesn't work as expected due to server behaviour and client interaction. One of the major problems is the constantly confused presence state - this is caused by the mobile apps conflicting on the state of the web app, causing it to consider the user offline or online (and rarely away) depending on how riot-android/ios is behaving at the time.

This reverts two PRs:
* https://github.com/matrix-org/matrix-react-sdk/pull/1620
* https://github.com/matrix-org/matrix-react-sdk/pull/1482

The changes to the context menu positioning were not reverted as they are useful outside of presence management.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-12-25 14:25:13 -07:00
Travis Ralston
5f3fda2950
Update MemberPresenceAvatar.js
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-21 09:01:56 -07:00
Travis Ralston
28ff0a4ee7 Disable presence controls if there's no presence
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-17 22:25:15 -07:00
Richard van der Hoff
4e7fd55fb4 MemberPresenceAvatar: fix null references
avoid assuming that `member` has a `user`
2017-11-17 14:35:33 +00:00
Travis Ralston
f58e8826c0 Use the correct settings store for presence
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-14 19:18:04 -07:00
Matthew Hodgson
f05958e334
Merge pull request #1482 from turt2live/travis/presence
Implement user-controlled presence
2017-11-14 23:53:16 +00:00
Luke Barnard
0dcd52d88f Fix some react warnings firing 2017-11-01 17:12:22 +00:00
Luke Barnard
14d600a69f Fix initial in GroupAvatar in GroupView 2017-10-30 15:04:12 +00:00
Travis Ralston
e773585a02 Merge remote-tracking branch 'matrix-org/develop' into travis/presence
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-25 11:21:39 -06:00
Luke Barnard
e89371fb1c Add click-to-open-settings functionality to GroupAvatar 2017-10-23 14:54:57 +01:00
Luke Barnard
ea1dbe1f76 Fix invites to groups without names 2017-10-19 15:47:52 +01:00
Travis Ralston
7307bc412f Respond to updates from presence context menu
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-14 23:16:12 -06:00
Travis Ralston
c483717282 Make onClick be a context menu for presence
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-14 21:44:07 -06:00
Travis Ralston
788e16a716 Linting
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-14 20:23:50 -06:00
Travis Ralston
0b20681f6a Put presence management behind a labs setting
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-14 19:13:46 -06:00
Travis Ralston
6cd07731c4 Add MemberPresenceAvatar and control presence ourselves
Includes rudimentary support for custom statuses and user-controlled status. Some minor tweaks have also been made to better control how we advertise our presence.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-10-14 14:37:47 -06:00
Luke Barnard
d3f9a3aeb5 Run eslint --fix
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
2017-10-11 17:56:17 +01:00
Luke Barnard
f3b6b2cc06 Fix GroupView summary rooms displaying without avatars
- GroupView can now render with rooms in the summary that do not have an avatar
 - RoomAvatar no longer has a redundant fallback avatar (this is handled by BaseAvatar)
 - RoomAvatar was delinted
2017-09-27 16:18:15 +01:00
David Baker
c2034d5335 Add user list to groups 2017-07-25 15:56:16 +01:00
David Baker
4e49ebd6ce Change incorrect refs to this.props 2017-07-11 14:31:07 +01:00
David Baker
c1833f9833 Merge remote-tracking branch 'origin/dbkr/my_groups' into dbkr/groups_better_groupview 2017-07-07 13:44:35 +01:00
David Baker
183f45bc1f Fix lint errors 2017-07-07 10:41:59 +01:00
David Baker
fa37d03db6 Improve the Group View page
Show the rooms in the group in thir various categories, etc
2017-07-06 19:13:14 +01:00
David Baker
3b06db0725 Pass with, height & resizeMethod through
Was spelt wrong anyway
2017-07-05 11:39:22 +01:00
David Baker
c07057d1d4 Extract props we don't want to pass to BaseAvatar 2017-06-30 16:05:19 +01:00
David Baker
84e13d5437 Add GroupAvatar to handle fallback images etc.
And a few misc tidyups
2017-06-29 17:51:38 +01:00
Luke Barnard
defecb1b14 Implement /user/@userid:domain?action=chat
This is a URL that can be used to start a chat with a user.
 - If the user is a guest, setMxId dialog will appear before anything and a defered action will cause `ChatCreateOrReuseDialog` to appear once they've logged in.
 - If the user is registered, they will not see the setMxId dialog.

fixes https://github.com/vector-im/riot-web/issues/4034
2017-06-02 11:36:18 +01:00