Commit Graph

3710 Commits

Author SHA1 Message Date
Luke Barnard
4b5b892135 Merge pull request #789 from matrix-org/luke/clarify-unread-msg-top-banner
Change "Unread messages." to "Jump to first unread message."
2017-04-04 16:45:26 +01:00
Luke Barnard
106ce90916 Change "Unread messages." to "Jump to first unread message."
Also get rid of the "up" arrow so as not to indiciate direction. This is important because in future the RM will not be based on what has been paginated into the client (but instead RM will be handled server-side) and thus we cannot assert any kind of direction on it relative to the events in the viewport.
2017-04-04 16:31:28 +01:00
David Baker
e3ac63777c Merge pull request #786 from matrix-org/dbkr/indexeddb_hide_internals
Update for new IndexedDBStore interface
2017-04-04 10:39:45 +01:00
Matthew Hodgson
bb25bee8fa Merge pull request #787 from VShell/patch-3
Add <ol start="..."> to allowed attributes list
2017-04-02 12:49:01 +01:00
Shell Turner
3ff54b8e4b Add <ol start="..."> to allowed attributes list
Fixes vector-im/riot-web#3273

Signed-off-by: Shell Turner <cam.turn@gmail.com>
2017-04-02 11:19:50 +01:00
David Baker
9c4614e7ff Update for new IndexedDBStore interface 2017-03-31 14:55:33 +01:00
David Baker
847c01b9be Merge pull request #784 from matrix-org/luke/fix-non-existant-event-dialog-finish
Fix the onFinished for timeline pos dialog
2017-03-30 17:31:00 +01:00
Luke Barnard
fff83ba234 Fix the onFinished for timeline pos dialog
This was causing a blank RoomView because it was trying to work with `room_id = undefined`.
2017-03-30 17:18:22 +01:00
David Baker
11a1c8099c Merge pull request #776 from matrix-org/luke/fix-directory-search-enter
Only join a room when enter is hit if the join button is shown
2017-03-30 09:59:42 +01:00
David Baker
d30ee91a29 Merge pull request #783 from matrix-org/dbkr/remove_session_load_error
Remove non-functional session load error
2017-03-29 18:25:37 +01:00
David Baker
dff79984a6 Merge remote-tracking branch 'origin/develop' into dbkr/remove_session_load_error 2017-03-29 18:24:06 +01:00
David Baker
22b0f69ac9 Merge pull request #782 from matrix-org/dbkr/matrixchat_tidy
Use Login & Register via component interface
2017-03-29 18:23:36 +01:00
Luke Barnard
5a411ba005 Merge pull request #781 from matrix-org/luke/fix-flaky-tests-maybe
Attempt to fix the flakyness seen with tests
2017-03-29 17:32:56 +02:00
David Baker
a6612bb8ad Remove non-functional session load error
MatrixChat was trying to display an error if the session failed to
restore, but it was never actually being shown because it was just
set as a member variable and therefore never actually caused
a re-render for the error to be displayed. Almost all errors are
caught by _restoreFromLocalStorage which displays the fancy dialog
if your session can't be restored, so I'm not convinced this ever
even tried to do anything anyway. Remove it.
2017-03-29 16:23:18 +01:00
David Baker
cee2628b41 Use Login & Register via component interface
Login & Register were being imprted directly for some reason,
rather than going via the normal component interface.

Should be functionally identical.
2017-03-29 15:24:47 +01:00
David Baker
27c945c544 Merge pull request #780 from matrix-org/dbkr/country_dropdown_setstate_warning
Remove React warning
2017-03-29 15:20:27 +01:00
David Baker
e139f5212a Remove React warning
Fire onOptionChange in componentWillMount, otherwise end up trying
to update state effectively in a render method, which is bad.
2017-03-29 15:05:49 +01:00
Luke Barnard
2146e89c09 Attempt to fix the flakyness seen with tests
Specifically:
```

JS 2.1.1 (Linux 0.0.0) joining a room over federation should not get stuck at a spinner FAILED
	Did not find exactly one match (found: 0) for componentType:function (props, context, updater) {
```

actually meant that the room directory wasn't displayed - probably because the dispatch `view_room_directory` ended up on another tick of the event loop, meaning that the directory wasn't displayedi. The fix attempted in ths commit is to use `this._setPage` instead to view the directory. This uses `setState` to set the screen to the directory, so I'm not entirely convinced this will solve the problem (as `setState` may also end up doing things on another tick.

and

```
JS 2.1.1 (Linux 0.0.0) loading: MatrixClient rehydrated from stored credentials: shows a room view if we followed a room link FAILED
	MatrixChat still not ready after 5 tries
	awaitRoomView@/home/travis/build/vector-im/riot-web/test/all-tests.js:201363:90
```

was happening probably because in the handler for the `sync` event in `MatrixChat` (around line 840), there was one case in which the `ready` state may not be true (causing all 5 attempts to fail), and this case relied on `starting_room_alias_payload`. This `starting_room_alias_payload` is now redundant because of `initialScreenAfterLogin`, which was added recently.
2017-03-29 15:02:28 +01:00
David Baker
6f4b080934 Merge pull request #779 from matrix-org/dbkr/rr_echo_only_when_needed
Only clear the local notification count if needed
2017-03-29 14:34:31 +01:00
David Baker
90242c2c85 Only send local echo RR if we're at the end 2017-03-29 14:12:50 +01:00
David Baker
3373f00d90 Only clear the local notification count if needed
Only zero the local notification count when we actually send a
read receipt, otherwise we cause a re-render of the RoomList every
time the user moves the cursor in the window, basically.
2017-03-29 14:08:31 +01:00
David Baker
e90897d117 Merge pull request #777 from matrix-org/dbkr/fix_notifs_on_refresh
Don't re-notify about messages on browser refresh
2017-03-28 15:16:12 +01:00
David Baker
4587b5f995 Don't re-notify about messages on browser refresh
Don't notify unless the js-sdk state is SYNCING, otherwise we'll
display notifications for messages that come in during the
incremental between the js-sdk cached data and the present.

Requires https://github.com/matrix-org/matrix-js-sdk/pull/405
Fixes https://github.com/vector-im/riot-web/issues/3251
2017-03-28 15:02:08 +01:00
Luke Barnard
98a0b804c7 Only join a room when enter is hit when the join button is shown 2017-03-28 13:02:13 +01:00
David Baker
91d10646b5 Merge pull request #775 from matrix-org/luke/fix-RoomList-notif-flashing
Improve zeroing of RoomList notification badges
2017-03-28 11:33:38 +01:00
Luke Barnard
4a0988f83e Do not send the room with action
By not sending the room with the action, we prevent its state from being updated by registered views listening for on_room_read
2017-03-28 11:26:40 +01:00
Luke Barnard
f4dc7ae8b1 Improve zeroing of RoomList notification badges
Use an action and force an update when zeroing the number of notifications in a room. This is better than waiting for a `render` to happen at some point. This will hopefully fix https://github.com/vector-im/riot-web/issues/3257
2017-03-28 10:38:57 +01:00
David Baker
e1b7347810 Merge pull request #774 from matrix-org/luke/fix-voip-bar-hidden
Fix VOIP bar hidden on first render of RoomStatusBar
2017-03-28 10:03:21 +01:00
Luke Barnard
ffd8ef84d6 Fix VOIP bar hidden on first render of RoomStatusBar
componentDidUpdate is not called for the initial render of a React component (https://facebook.github.io/react/docs/react-component.html#componentdidupdate)

componentWillMount is used so that the initial state and props of RoomStatusBar can also trigger props.isVisible.

This fixes https://github.com/vector-im/riot-web/issues/3181
2017-03-28 09:30:41 +01:00
David Baker
a38a954fb5 Merge pull request #772 from matrix-org/dbkr/disinvite_is_not_kick
Correct confirm prompt for disinvite
2017-03-27 17:42:39 +01:00
Luke Barnard
aa486b605d Merge pull request #773 from matrix-org/luke/fix-login-flash-new-state
Add state loggingIn to MatrixChat to fix flashing login
2017-03-27 18:24:49 +02:00
David Baker
c743663f7d Merge pull request #771 from matrix-org/dbkr/invite_always_show_valid_mxid
Fix bug where you can't invite a valid address
2017-03-27 17:20:51 +01:00
Luke Barnard
c650cfffac logged_in -> loggedIn
Also added `loggingIn` to `initialState` and removed some commented code.
2017-03-27 17:14:39 +01:00
David Baker
db3339de33 I still can't type 2017-03-27 17:03:59 +01:00
David Baker
9125c1b2cc I can't type 2017-03-27 17:00:05 +01:00
David Baker
a3efa45795 Correct confirm prompt for disinvite
It should be 'disinvite' not 'kick', and probably doesn't really
need a reason.
2017-03-27 16:53:00 +01:00
David Baker
a230354dbe Fix bug where you can't invite a valid address
Always show the entered text as an option if it's a valid address,
otherwise there's no way to invite an address that is valid and
also returns other mxids in the search results.

Fixes https://github.com/vector-im/riot-web/issues/3496
2017-03-27 16:40:01 +01:00
Luke Barnard
30c5af35e5 Add state loggingIn to MatrixChat to fix flashing login
To prevent the login screen from flashing when refreshing the app, use some state to indicate that a login is in progress, and OR that with the existing `loading` boolean to show the `<Spinner>` instead of the default `<Login>`.

This might be too invasive, and a default spinner may be better.
2017-03-27 16:39:04 +01:00
Luke Barnard
7eb3a776dc Merge pull request #761 from matrix-org/luke/fix-people-section2
Fix people section DropTarget and refactor Rooms
2017-03-27 15:52:28 +02:00
Luke Barnard
55351927d7 Merge pull request #770 from matrix-org/luke/fix-read-receipt-offset
Read Receipt offset
2017-03-27 15:51:57 +02:00
Luke Barnard
a4b4c3feb8 Read Receipt offset
Read receipts were always one read receipt to the left further than they should have been. This fixes that and simplifies the logic.
2017-03-27 14:34:05 +01:00
Luke Barnard
dca02d916a Merge branch 'develop' into luke/fix-people-section2 2017-03-27 09:45:14 +01:00
Luke Barnard
975a2db3e4 UI delay done in UI 2017-03-27 09:42:04 +01:00
David Baker
a8d85ca2ad Merge pull request #756 from matrix-org/dbkr/add_msisdn
Support adding phone numbers in UserSettings
2017-03-24 10:54:22 +00:00
David Baker
5e3b991ec2 PR feedback fixes 2017-03-24 10:45:38 +00:00
David Baker
df15c9be55 Merge pull request #769 from matrix-org/dbkr/dont_crash_on_login
Prevent crash on login of no guest session
2017-03-23 14:20:10 +00:00
David Baker
707fd60624 Prevent crash on login of no guest session
The bound functions are only set when the Notifier is started, so
if stop() was called without start() having been called, the
listener function would be null which would throw an exception.
2017-03-23 10:38:00 +00:00
David Baker
d5272149f6 Another unmounted guard 2017-03-22 16:42:44 +00:00
David Baker
b58d8bffe1 More PR feedback
Unmounted guards, extra semicolon, return early to lose indent
level, add keys.
2017-03-22 16:41:08 +00:00
Kegsay
3d71cb8325 Merge pull request #768 from matrix-org/kegan/memleaks-are-bad-mkay
Add canResetTimeline callback and thread it through to TimelinePanel
2017-03-22 16:39:07 +00:00