Commit Graph

14070 Commits

Author SHA1 Message Date
J. Ryan Stinnett
c45ca58689
Merge pull request #2677 from jryans/composer-input
Add `onClick` to Markdown buttons
2019-02-22 16:19:22 +00:00
Travis Ralston
a02508023b
Merge pull request #2678 from matrix-org/travis/fix-email-config
Fix toggle for email notifications
2019-02-22 08:22:43 -07:00
J. Ryan Stinnett
ccd4dee0d2 Isolate rich text notifications from other input changes
The step that would notify parent components of rich text state changes was
stirred into the input's change handler, which leads to race which the parent is
sometimes notified of the old rich text state instead of the new.

Here we avoid this complication by using a separate path for sending the rich
text state when we know we have updated it correctly.
2019-02-22 15:18:24 +00:00
J. Ryan Stinnett
3e6199c0f7 Change Markdown buttons to onClick
`AccessibleButton` expects click handlers, which we can use here, as long we
make some additional changes to avoid race processing the new state (see
subsequent patch).

Fixes https://github.com/vector-im/riot-web/issues/8866
2019-02-22 15:18:06 +00:00
Bruno Windels
ec6c104e51
Merge pull request #2681 from matrix-org/travis/unbreak-new-rooms
Fix categorization of favourites and new rooms
2019-02-22 11:34:16 +01:00
J. Ryan Stinnett
ca5c7b03d3
Merge pull request #2675 from jryans/default-hs-to-form
Skip server details on registration with a default HS
2019-02-22 10:19:53 +00:00
J. Ryan Stinnett
b6682c0469
Merge pull request #2673 from jryans/username-label
Clarify what the username error refers to
2019-02-22 10:17:58 +00:00
Travis Ralston
e7b3cbfdf4 Fix categorization of favourites and new rooms
New rooms (joined, invited, created, etc) were being ignored because they matched the check as soon as the iterator hit a non-recents section. This fixes the check to ensure there's a positive ID on the room being in the tag (or not, in the case of new rooms) before lying to the rest of the function.

Additionally, a fix for favourites has been included to stop the list expanding to fill the void - turns out it was inserting the room twice into the list, and this was breaking the tile rendering. The room sublist would allocate space for the tile, but React would prevent the tile from showing up because of duplicate keys.

Fixes https://github.com/vector-im/riot-web/issues/8868
Fixes https://github.com/vector-im/riot-web/issues/8857 correctly
2019-02-21 19:21:32 -07:00
Travis Ralston
d6f8f8a7ba
Merge pull request #2680 from alexte/develop
RoomDirectory Dropdown should use roomDirectory.servers
2019-02-21 19:01:44 -07:00
Alexander Terczka
892802e9cc
RoomDirectory Dropdown should use roomDirectory.servers
The sample config.json in riot-web has "roomDirectory.servers" and not "servers".
Are other systems than riot-web use "servers" without "roomDirectory" ? Then this would break these.
2019-02-22 02:40:01 +01:00
Travis Ralston
23dd3573f8 Fix SdkConfig import in Notifications
Fixes an issue discovered after fixing the toggle - The SdkConfig in onEnableEmailNotificationsChange ends up being undefined if the import is left as-is.
2019-02-21 15:18:54 -07:00
Travis Ralston
ee8a027b4c Fix toggle for email notifications
The function doesn't receive an event, it receives a boolean.

Fixes https://github.com/vector-im/riot-web/issues/8837
2019-02-21 15:18:11 -07:00
J. Ryan Stinnett
fe141412b6 Skip server details on registration with a default HS
If Riot has been configured with a `default_hs_url` (or `default_server_name`,
which then sets a default HS URL), then skip the server details on registration
by default.

Fixes https://github.com/vector-im/riot-web/issues/8840
2019-02-21 18:11:23 +00:00
Travis Ralston
86c49d5807
Merge pull request #2674 from matrix-org/travis/fix-favourites
Fix favourites losing rooms and sorting weirdly
2019-02-21 09:28:34 -07:00
Travis Ralston
d662dccfba Fix favourites losing rooms and sorting weirdly
By not flagging the room as inserted, we end up sorting it.

Fixes https://github.com/vector-im/riot-web/issues/8857
2019-02-21 09:17:35 -07:00
Travis Ralston
ade9ee3c18
Merge pull request #2634 from matrix-org/travis/better-room-sorting
"Breadcrumb" room sorting algorithm
2019-02-21 08:46:17 -07:00
Bruno Windels
ab9bf4c0e0
Merge pull request #2666 from matrix-org/bwindels/userview
Bring back user view
2019-02-21 16:05:03 +01:00
J. Ryan Stinnett
b74107116b Clarify what the username error refers to
Fixes https://github.com/vector-im/riot-web/issues/8839
2019-02-21 15:01:09 +00:00
J. Ryan Stinnett
8b66b6bdb3 Relabel custom HS link on registration from 'Edit' to 'Change'
Fixes https://github.com/vector-im/riot-web/issues/8853
2019-02-21 11:03:50 +00:00
J. Ryan Stinnett
1671466c46 Regenerate strings 2019-02-21 11:02:58 +00:00
J. Ryan Stinnett
16b9688303
Merge pull request #2669 from matrix-org/jryans/default-server-name
Restores support for `default_server_name` which discovers URLs via `.well-known`
2019-02-21 10:38:15 +00:00
Bruno Windels
d9b8b0f988 fix indentation 2019-02-21 10:51:09 +01:00
Bruno Windels
ef704085f9 remove display: flex declarations now present on mx_MainSplit itself 2019-02-21 10:50:41 +01:00
Bruno Windels
b364c9cb8e update copyright header 2019-02-21 10:50:30 +01:00
J. Ryan Stinnett
731c1e2b83
Merge pull request #2670 from jryans/rm-unreferenced-imgs
Remove unreferenced images
2019-02-20 21:04:56 +00:00
J. Ryan Stinnett
567280ae3d Remove unreferenced images
Now that images flow through a build step, it's easy to spot which ones aren't
actually used. To determine this, I built Riot with the hash in file names
disabled, and then used a directory compare tool to look for all images in the
SDK that did not make it into the Riot build.

Fixes https://github.com/vector-im/riot-web/issues/8158
2019-02-20 18:33:00 +00:00
J. Ryan Stinnett
42bb3c4f40 Prevent default for forgot password link
The forgot password link should prevent default to avoid changing the URL's hash
state.
2019-02-20 17:33:59 +00:00
J. Ryan Stinnett
d220dd49ef Clarify that the account is a Matrix account
Now that auth flows can show a server name like `example.com` which might
delegate the HS to some other server, it could be confusing to see text like
"Sign in to example.com", especially if `example.com` runs an identity service,
uses SSO, has its own account system, or other things like this.

To clarify that we mean Matrix accounts, all auth flows are updated to talk in
terms of "<verb> your Matrix account on <server>".

Fixes part of
https://github.com/vector-im/riot-web/issues/8763#issuecomment-464823909.
2019-02-20 17:33:59 +00:00
J. Ryan Stinnett
5433feb4d4 Display default server name in forgot password
If a default server name is set and the current HS URL is the default HS URL,
we'll display that name in the "your account" text on the forgot password form.

This can be a bit more user friendly, especially when the HS is delegated to
somewhere such as Modular, since you'll then see "example.com" instead of
"example.modular.im", which you have no direct relationship with as a user.

This is the key bit of https://github.com/vector-im/riot-web/issues/8763 for
forgot password.
2019-02-20 17:33:59 +00:00
J. Ryan Stinnett
f4b7180087 Display default server name in login
If a default server name is set and the current HS URL is the default HS URL,
we'll display that name in the "sign in to" text on the login form.

This can be a bit more user friendly, especially when the HS is delegated to
somewhere such as Modular, since you'll then see "example.com" instead of
"example.modular.im", which you have no direct relationship with as a user.

This is the key bit of https://github.com/vector-im/riot-web/issues/8763 for
login.
2019-02-20 17:33:59 +00:00
J. Ryan Stinnett
a29a8185fc
Merge pull request #2667 from jryans/trim-changelog
Only show the first line of each commit in changelog dialog
2019-02-20 13:05:14 +00:00
Bruno Windels
6455334bd0
Merge pull request #2658 from matrix-org/bwindels/moarcachebustin
Cache-bust languages.json with file-loader
2019-02-20 13:34:42 +01:00
J. Ryan Stinnett
d68b7c29e2 Only show the first line of each commit in changelog dialog
Multi-line commits aren't actually formatted correctly, and most likely the
first line is enough of a summary anyway, so this change trims to the first
line. The commits are linked, so you can click through if you want more detail.

Fixes https://github.com/vector-im/riot-web/issues/8285
2019-02-20 12:20:48 +00:00
J. Ryan Stinnett
91f56a4447 Display default server name in registration
If a default server name is set and the current HS URL is the default HS URL,
we'll display that name in the "your account" text on the registration form.

This can be a bit more user friendly, especially when the HS is delegated to
somewhere such as Modular, since you'll then see "example.com" instead of
"example.modular.im", which you have no direct relationship with as a user.

This is the key bit of https://github.com/vector-im/riot-web/issues/8763 for
registration.
2019-02-20 12:17:51 +00:00
Bruno Windels
23bcbc50e3 show dialog when failing to load profile info 2019-02-20 12:52:29 +01:00
Bruno Windels
f11505a9de bring back user page
Adds a UserView that contains a MainSplit with an empty div
and a RightPanel, preset to the given member.

UserView fetches the profile and creates a fake member, which
it passed on to the RightPanel.

this doesn't use the view_user action on purpose, to avoid any
interference of the UserView when trying to view a room member.
2019-02-20 12:45:55 +01:00
J. Ryan Stinnett
b846ac5800 Rework ServerTypeSelector to only emit changes after initial setup
`ServerTypeSelector` would call its `onChange` prop both at construction
(because it computed the default selected type and consumers might want to know)
as well as on actual user change. This ended up complicating consumer code, as
they want to differentiate between initial state and changes made by the user.

To simplify things, `ServerTypeSelector` now exports a function to compute the
server type from HS URL, which can be useful for setting its initially selected
type. The consumer now provides that type via a prop, and `onChange` is now only
called for actual user changes, simplifying the logic in `Registration` which
uses `ServerTypeSelector`.

In addition, some usages of `customHsUrl` vs. `defaultHsUrl` in `Registration`
are simplified to be `customHsUrl` only (since it already includes a fallback to
the default URL in `MatrixChat`).
2019-02-20 11:23:51 +00:00
J. Ryan Stinnett
9292a46db0 Update comment about Modular server type selection
Modular now sets `disable_custom_urls`, so the server type selector is not shown
for Modular-hosted Riot.
2019-02-20 10:24:03 +00:00
Bruno Windels
44bedb2084 fix unit tests without breaking the build 2019-02-20 09:36:18 +01:00
Bruno Windels
338eafab2b
Merge pull request #2664 from tebatalla/patch-1
Fix off by one error for username colors
2019-02-20 08:42:28 +01:00
Travis Ralston
8008f66d4b
Merge pull request #2665 from aaronraimist/dark-unsent-message-color
Set event-sending-color in dark theme
2019-02-19 19:17:58 -07:00
Aaron Raimist
c16791814e
Set event-sending-color in dark theme
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-02-19 19:58:11 -06:00
Travis Ralston
64103b7af4 More micro optimizations to make the hot paths faster 2019-02-19 15:15:39 -07:00
Travis Ralston
561d1f37ec Stick a couple micro optimizations into the setRoomCategory hot path 2019-02-19 14:56:56 -07:00
Travis Ralston
7b732ceb43 Merge branch 'develop' into travis/better-room-sorting 2019-02-19 14:35:14 -07:00
Tomas Batalla
b90e33b81b
Fix off by one error for username colors
The hash result would only have a range of 0..7, but the css of color variants is 1..8
2019-02-19 10:52:59 -08:00
J. Ryan Stinnett
6b46057283
Merge pull request #2663 from jryans/enable-captcha-desktop
Allow captchas on Riot desktop builds
2019-02-19 18:20:15 +00:00
J. Ryan Stinnett
cba3897944
Merge pull request #2661 from jryans/captcha-stuck
Show link to login even during UI auth
2019-02-19 18:17:51 +00:00
J. Ryan Stinnett
edf10dbdde
Merge pull request #2659 from jryans/dark-theme-more-2
Dark theme follow ups round 2
2019-02-19 17:51:29 +00:00
J. Ryan Stinnett
d8c5163f49
Merge pull request #2662 from jryans/light-theme-name
Rename default theme to light theme
2019-02-19 15:03:55 +00:00