`enableRichText` would convert the editor state between rich and md versions
explicitly, but then it would also call `createEditorState`, which can do the
same thing.
This removes the duplication, and also supplies the right arguments to
`createEditorState` so it can do its work correctly.
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.
`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
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.
Fixes an issue discovered after fixing the toggle - The SdkConfig in onEnableEmailNotificationsChange ends up being undefined if the import is left as-is.
This passes the validity state of all fields to the consumer of
`RegistrationForm` via the `onValdiationChange` callback, instead of just the
most recent error.
In addition, we notify the consumer for any validation change, whether success
or failure. This allows old validation messages to be properly cleared. It also
allows the consumer to be aware of multiple validation errors and display the
next one after you have fixed the first.
Fixes https://github.com/vector-im/riot-web/issues/8769
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.
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.
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
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.
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.
`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`).
Tjis is quite confusing as the welcome page is designed for when
you're not logged in, ie. has a sign-in button. There's also no way
to get back into the app so it really looks like it's logged you
out.
Reverts 116367fd69
as not all state that goes into rendering comes from state or props,
we shouldn't be blocking rendering at all
This might rerender a few times more, but it shouldn't be worse
than what was there before the redesigned roomlist.
We weren't correctly jumping into the appropriate bit of the registration
flow when coming in from an email link.
* If we have client secret / sessionId, go straight to registration phase
* Don't reset server URLs when the server type component tells us its
initial value
* Confusingly, pass the custom server URL as 'default server URL' to
the custom server type, as this is what we want the inital section
to be based on.
Fixes https://github.com/vector-im/riot-web/issues/8490