Commit Graph

2875 Commits

Author SHA1 Message Date
Luke Barnard c02dbd1cdc Rename initial state variables 2017-06-08 17:26:08 +01:00
Luke Barnard 000a045e35 Rename RVS state (event -> initialEvent) and redocument 2017-06-08 15:52:21 +01:00
Luke Barnard 1792fa45f4 Null-guard roomId before sending a dispatch to update scroll state
Otherwise we pointlessly assign the null key to something
2017-06-08 15:45:50 +01:00
Luke Barnard 59e649f326 Add comment about roomId potentially not being resolved following an update from RoomViewStore 2017-06-08 15:43:45 +01:00
Luke Barnard e58e4db628 Explain why search results are cleared when eventId changes 2017-06-08 15:38:58 +01:00
Luke Barnard dca2be6325 Add RoomView initial state and docs 2017-06-08 15:37:30 +01:00
Luke Barnard 2e82bf40fb Explain setting of highlighted in room/$eventId showScreen handling. 2017-06-08 15:34:20 +01:00
Luke Barnard 8ddc38c9b1 Doc _viewRoom highlighted 2017-06-08 15:32:31 +01:00
Luke Barnard aa20ad706e Remove redundant currentRoomAlias 2017-06-08 15:30:43 +01:00
Luke Barnard ea97d16aa2 Merge branch 'develop' into luke/fix-event-id-state
Conflicts:
	src/components/structures/MatrixChat.js
2017-06-08 14:33:58 +01:00
Luke Barnard f320f7d475 Remove redundant action id 2017-06-08 14:30:45 +01:00
Luke Barnard d3cf78ff5a Control currently viewied event via RoomViewStore
Fix for https://github.com/vector-im/riot-web/issues/4224

Due to the way `MatrixChat` does a state update when the `view_room` dispatch fires and a second update when `RoomViewStore` sends an update, the current event ID and room ID were becoming out of sync. The solution devised was to have the event ID managed by the `RoomViewStore` itself and do any defaulting there (for when we revisit a room that we saved scroll state for previously).

This required a few changes:
 - The addition of `update_scroll_state` in `RoomViewStore` allows the `RoomView` to save scroll state for a room before swapping to another one. Previously the caching of scroll state was done in `RoomView`.
 - The `view_room` dispatch now accepts an `event_id`, which dictates which event is supposed to be scrolled to in the `MessagePanel` when a new room is viewed. It also accepts `event_offset`, but currently, this isn't passed in by a dispatch in the app, but it is clobbered when loading the default position when an `event_id` isn't specified. Finally, `highlighted` was added to distinguish whether the initial event being scrolled to is also highlighted. This flag is also used by `viewRoom` in `MatrixChat` in order to decide whether to `notifyNewScreen` with the specified `event_id`.
2017-06-08 14:17:49 +01:00
Matthew Hodgson bc0eb4294c rename welcome page to home 2017-06-08 10:27:35 +01:00
Richard van der Hoff 566fb2caeb Add some logging around switching rooms
... which I wish had been there when I was staring at a rageshake.
2017-06-07 22:41:02 +01:00
Matthew Hodgson 8228db88d2 oops, fix more i18n var name typos 2017-06-07 18:28:49 +01:00
Matthew Hodgson ef2fedc3a9 fix missing translations and typos in i18n 2017-06-07 18:24:35 +01:00
David Baker 0370b7c5e8 Merge pull request #1050 from matrix-org/luke/feature-user-directory-invite
Use user_directory endpoint to populate ChatInviteDialog
2017-06-07 18:06:35 +01:00
Luke Barnard 29da25529c Make it backwards compatible
Hit the user_directory API and if M_UNRECOGNIZED, do a local search and continue to search locally therein.
2017-06-07 17:53:58 +01:00
Luke Barnard 68ddf35db4 Use then, catch, done and display any errors that occur during search 2017-06-07 17:33:15 +01:00
Luke Barnard 49b22fb6c6 Use an arrow function to allow this
This was causing `TypeError: Cannot read property '_getEmptyContent' of undefined` for those with custom tags.
2017-06-07 16:13:40 +01:00
Luke Barnard 3b6599dcdc Use user_directory endpoint to populate ChatInviteDialog
Also attempt to slightly improve the feedback given when searching. There is still room for improvement - it's not totally obvious whether to display a spinner because it's quite jarring were it to replace the dd. This does mean that "No results" will flash awkardly between two queries, neither of which return any results.
2017-06-07 16:05:36 +01:00
Luke Barnard 53ea41e8a5 Merge branch 'develop' into new-guest-access 2017-06-07 12:08:37 +01:00
David Baker 1dbdbc163b Cancel 'join room' action if 'log in' is clicked
or 'choose different server'

We canceled the deferred action in the MatrixChat SetMxId dialog
but not the one in roomview.

Fixes https://github.com/vector-im/riot-web/issues/4217
2017-06-07 11:55:24 +01:00
Kegan Dougal 4127e7121c Translate src/components/structures
Includes some pluralisation! Tested them manually to make sure they work.
2017-06-07 11:40:46 +01:00
Matthew Hodgson 184c2d5e58 Merge pull request #1015 from matrix-org/t3chguy/random_fix_1
fix copy and paste derp and rip out unused imports
2017-06-06 18:02:35 +01:00
David Baker 9f15e8e152 Merge branch 'master' into develop 2017-06-06 17:41:05 +01:00
David Baker 00ccf4bb51 Revert "Call MatrixClient.clearStores on logout"
This reverts commit c3d37c1ff9.

This commit was introducing a bug where no rooms would be shown if
you want straight to /#/login and logged in (because this causes
a guest session to be created but the indexeddb store not to be
cleared, so the new login picks up the stale indexedb sync data.
2017-06-06 17:33:50 +01:00
Luke Barnard 205fd1fad4 Allow password reset when logged in 2017-06-06 17:22:49 +01:00
David Baker c27f50207d comment 2017-06-06 11:43:07 +01:00
David Baker 12d2480916 Reset 'first sync' flag / promise on log in
Otherwise on any logins after the first,we always think the first
sync has completed.
2017-06-06 11:36:33 +01:00
David Baker 22df03944c Merge branch 'develop' into new-guest-access 2017-06-06 10:35:28 +01:00
David Baker f8198ba9c9 Merge branch 'develop' into new-guest-access 2017-06-06 10:33:01 +01:00
David Baker e7af9bde23 Merge pull request #1036 from matrix-org/luke/fix-people-section-disappearing-again
Remove DM-guessing code (again)
2017-06-06 10:20:44 +01:00
Matthew Hodgson ed7c138d91 quick and dirty override to disable MD globally 2017-06-05 21:38:25 +01:00
Matthew Hodgson d77a09adba quick and dirty override to disable MD globally 2017-06-05 21:33:01 +01:00
David Baker a99f6525c9 Merge pull request #1039 from matrix-org/dbkr/ilag_cancel_action
Cancel deferred actions
2017-06-05 21:27:13 +01:00
Luke Barnard 4ab6dc9ddd Merge branch 'new-guest-access' into luke/ilag-i18n 2017-06-05 20:28:51 +01:00
David Baker f6cfff9098 Cancel deferred actions
if the set mxid dialog is canceled
2017-06-05 18:37:38 +01:00
David Baker 3553aea5df Merge pull request #1038 from matrix-org/dbkr/ilag_defer_create_room
Defer an intention for creating a room
2017-06-05 17:52:57 +01:00
David Baker 5924654f9d Defer an intention for creating a room 2017-06-05 17:45:01 +01:00
David Baker ad87e9bd50 Apply https://github.com/matrix-org/matrix-react-sdk/commit/9cae667c063e67b32e60b89e7256d714a056559b to ilag branch 2017-06-05 17:28:36 +01:00
Luke Barnard cc8078837d Remove DM-guessing code (again)
Seems this got reverted somehow:
>the revert of https://github.com/matrix-org/matrix-react-sdk/pull/807 (https://github.com/matrix-org/matrix-react-sdk/commit/ebfafb363972e77ef02f0e518573bf68ebc0ed15) also included the revert of https://github.com/matrix-org/matrix-react-sdk/pull/829
2017-06-05 16:57:30 +01:00
David Baker 3dbea45426 Comment 2017-06-05 16:50:00 +01:00
David Baker 3c0290588c Always show the spinner during the first sync
Before, we were relying on the fact that `ready` would still have
been false from before. This was not the case, for example, if we
naviagted straight to /#/login (which causes a guest session to be
set up and the sync for that completes after we navigate to the
login screen).

We should always mark ourselves as not-ready after login since we
will always have to wait for the sync.
2017-06-05 16:17:32 +01:00
Luke Barnard 619830617a Merge branch 'develop' into luke/ilag-i18n
In order to get ILAG internationalised

Conflicts:
	src/components/structures/LoggedInView.js
	src/components/structures/MatrixChat.js
	src/components/views/dialogs/ChatCreateOrReuseDialog.js
	src/components/views/dialogs/SetDisplayNameDialog.js
	src/createRoom.js
	src/i18n/strings/en_EN.json
2017-06-05 16:08:03 +01:00
David Baker c5cd6aecd6 Revert "Call MatrixClient.clearStores on logout"
This reverts commit c3d37c1ff9.

This commit was introducing a bug where no rooms would be shown if
you want straight to /#/login and logged in (because this causes
a guest session to be created but the indexeddb store not to be
cleared, so the new login picks up the stale indexedb sync data.
2017-06-05 15:54:44 +01:00
Luke Barnard 6125395675 _t for SetMxIdDialog 2017-06-05 15:36:10 +01:00
David Baker 85aa3f6f13 Merge pull request #1032 from matrix-org/luke/fix-welcome-user-background
Only view welcome user if we are not looking at a room
2017-06-05 14:38:55 +01:00
David Baker d8e3423060 Merge pull request #1031 from matrix-org/luke/fix-deferred-start-chat-settings
Keep deferred actions for view_user_settings and view_create_chat
2017-06-05 14:10:29 +01:00
Luke Barnard c82e79ab5f Only view welcome user if we are not looking at a room 2017-06-05 14:07:24 +01:00