With a switch to Only One Webpack™ we need a way to help developers generate the component index without a concurrent watch task. The best way to do this is to have developers import their components, but how do they do that when we support skins? The answer in this commit is to change skinning.
Skinning now expects to receive your list of overrides instead of the react-sdk+branded components. For Riot this means we send over *only* the Vector components and not Vector+react-sdk.
Components can then be annotated with the `replaceComponent` decorator to have them be skinnable. The decorator must take a string with the dot path of the component because we can't reliably calculate it ourselves, sadly.
The decorator does a call to `getComponent` which is where the important part of the branded components not including the react-sdk is important: if the branded app includes the react-sdk then the decorator gets executed before the skin has finished loading, leading to all kinds of fun errors. This is also why the skinner lazily loads the react-sdk components to avoid importing them too early, breaking the app.
The decorator will end up receiving null for a component because of the getComponent loop mentioned: the require() call is still in progress when the decorator is called, therefore we can't error out. All usages of getComponent() within the app are safe to not need such an error (the return won't be null, and developers shouldn't use getComponent() after this commit anyways).
The AuthPage, being a prominent component, has been converted to demonstrate this working. Changes to riot-web are required to have this work.
The reskindex script has also been altered to reflect these skinning changes - it no longer should set the react-sdk as a parent. The eventual end goal is to get rid of `getComponent()` entirely as it'll be easily replaced by imports.
This moves the details of dialogs that may be needed when accessing secret
storage to centralised helper. In addition, this clears the secret storage key
cache so that keys are only live for a single operation.
Fixes https://github.com/matrix-org/mjolnir/issues/15
This should be completely safe to deploy, even without a labs flag, because policy rooms (ban lists) are usually only joined by the people who know what they are. This also has no relation to the Mjolnir functionality currently in Riot, though it does make seeing your ban list a bit less awkward.
Ban list rules only show up in ban list rooms and rarely show up in public rooms, hence the somewhat vague messaging. It should be obvious that it's a ban list room due to the surrounding room decoration/purpose.
The subclasses listen for view_user and similar dispatches, which then start up the RightPanel. We weren't registering a listener though because we changed to using the RightPanelStore for most of our logic.
Fixes vector-im/riot-web/issues/11608.
This patch:
1. Turns the container of reaction buttons into a toolbar.
2. Makes each button span into a button with a tabindex and an aria-label.
3. Constructs an alternative label that differs slightly from the text displayed by the tool tip:
* It uses the names of the people who reacted.
* It puts a space before the "reacted with" text.
* It uses the actual emoji characters, not the converted colon-delimited shortNames, because the emojis usually tell blind users more about the expression.
* It omits the number of reactions, since that information is already conveyed by the names.
Signed-off-by: Marco Zehe <marcozehe@mailbox.org>
This lays a foundation for redirecting all the traffic through the new store, but for now the core parts of the app need to stop caring if the right panel is open.
This adds dialogs for creating and accessing secret storage via a passphrase or
recovery key. These flows are adapted from the ones used for key backup.
With this version of babel (via babel-eslint), eslint now fails
with a somewhat confusing, "Unexpected reserved type number"
(from the flow plugin...) if you get this wrong.