element-web/src
Travis Ralston 20a615396b Implementation of new potential skinning mechanism
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.
2019-12-12 19:48:45 -07:00
..
actions
async-components/views/dialogs Add testing flow for new key backups with SSSS 2019-12-11 16:32:49 +00:00
autocomplete Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
components Implementation of new potential skinning mechanism 2019-12-12 19:48:45 -07:00
editor Fix linty failures 2019-10-22 13:49:02 +01:00
hooks Merge pull request #3465 from matrix-org/t3chguy/nvl/userinfo 2019-10-21 15:50:08 +01:00
i18n/strings Merge pull request #3720 from matrix-org/jryans/4s-new-key-backup 2019-12-12 17:33:11 +00:00
indexing EventIndex: Move the checkpoint loading logic into the init method. 2019-11-25 18:11:50 +01:00
integrations Appease the linter 2019-11-20 20:45:16 -07:00
mjolnir Bypass the tests being weird 2019-10-31 16:43:03 -06:00
notifications
rageshake Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
resizer Fix soft crash on room join 2019-10-08 15:43:57 +01:00
settings Break the right panel completely 2019-12-05 17:47:18 -07:00
stores Reset the right panel when changing rooms/groups 2019-12-10 09:58:44 -07:00
utils Implementation of new potential skinning mechanism 2019-12-12 19:48:45 -07:00
ActiveRoomObserver.js
AddThreepid.js Guard against misconfigured homeservers when adding / binding phone numbers 2019-10-31 14:50:21 +00:00
Analytics.js
Avatar.js Add trace as well 2019-09-30 16:00:58 +01:00
BasePlatform.js EventIndex: Move the event indexing files into a separate folder. 2019-11-19 14:05:00 +01:00
boundThreepids.js
CallHandler.js Merge branch 'develop' into matthew/fix_logging 2019-11-26 10:19:48 +00:00
CallMediaHandler.js
ContentMessages.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
createRoom.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
CrossSigningManager.js Only allow key caching inside the access helper 2019-12-12 15:34:01 +00:00
cryptodevices.js Wrap the await call for unknown device lookups 2019-12-10 22:00:08 -07:00
DateUtils.js
DecryptionFailureTracker.js
dispatcher.js
email.js
Entities.js
extend.js
FromWidgetPostMessageApi.js
GroupAddressPicker.js Replace bluebird specific promise things. Fix uses of sync promise code. 2019-11-14 13:52:17 +00:00
groups.js
HtmlUtils.js Restore thumbs after variation selector removal 2019-11-07 17:49:25 +00:00
IdentityAuthClient.js Appease the linter 2019-11-07 15:12:55 -07:00
ImageUtils.js
index.js
Keyboard.js Do not trap Key ContextMenu into composer for keyboard a11y 2019-12-02 10:01:08 +00:00
KeyRequestHandler.js
languageHandler.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Lifecycle.js Merge branch 'develop' into t3chguy/remove_bluebird 2019-11-20 15:21:23 +00:00
linkify-matrix.js Fix linkify imports 2019-11-06 10:41:14 +01:00
Login.js
Markdown.js
MatrixClientPeg.js Fix exports for rate limited functions and MatrixClientPeg 2019-12-12 19:33:08 -07:00
Modal.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Notifier.js Catch exceptions when we can't play audio 2019-11-21 17:11:17 +00:00
ObjectUtils.js
PageTypes.js
PasswordReset.js Remove id_server param for password reset 2019-09-24 14:54:26 +01:00
PhasedRollOut.js
phonenumber.js
PlatformPeg.js
Presence.js console.log doesn't take %s substitutions 2019-11-26 01:14:03 +00:00
ratelimitedfunc.js
Registration.js
Resend.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Roles.js split up PowerLevelEditor into two components 2019-11-15 16:14:18 +01:00
RoomAliasCache.js Cache room alias to room ID mapping in memory 2019-11-12 11:54:41 +00:00
RoomInvite.js Add an option to invite users to upgraded private rooms 2019-11-27 20:29:11 -07:00
RoomListSorter.js
RoomNotifs.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Rooms.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
ScalarAuthClient.js Convert SdkConfig to TypeScript as a proof of concept 2019-12-12 14:37:32 -07:00
ScalarMessaging.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
SdkConfig.ts Convert SdkConfig to TypeScript as a proof of concept 2019-12-12 14:37:32 -07:00
Searching.js EventIndex: Move the event indexing files into a separate folder. 2019-11-19 14:05:00 +01:00
SendHistoryManager.js
shouldHideEvent.js
Skinner.js Implementation of new potential skinning mechanism 2019-12-12 19:48:45 -07:00
SlashCommands.js Actually spawn a bug report dialog. 2019-12-02 17:26:08 -07:00
SlateComposerHistoryManager.js
stripped-emoji.json Update stripped emoji and bump emojidata to 4.0.2 2019-10-01 18:05:25 +02:00
Terms.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
TextForEvent.js Appease the linter 2019-12-09 20:38:56 -07:00
theme.js Ensure the settings page accurately represents theme choices 2019-11-28 13:40:28 -07:00
Tinter.js
ToWidgetPostMessageApi.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Unread.js Don't mark a room as unread when server ACLs are set 2019-12-06 17:34:31 -06:00
UserActivity.js
UserAddress.js
VectorConferenceHandler.js Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Velociraptor.js Convert Velociraptor to a class 2019-11-28 19:36:30 -07:00
VelocityBounce.js
WhoIsTyping.js
WidgetMessaging.js
WidgetMessagingEndpoint.js