This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 832
Implementation of new potential skinning mechanism #3723
Merged
Merged
Commits on Dec 12, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 25f5cca - Browse repository at this point
Copy the full SHA 25f5ccaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c02beb9 - Browse repository at this point
Copy the full SHA c02beb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97af040 - Browse repository at this point
Copy the full SHA 97af040View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5dadda - Browse repository at this point
Copy the full SHA a5daddaView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff584d1 - Browse repository at this point
Copy the full SHA ff584d1View commit details -
Disable tests for new TypeScript build
We're switching to Jest anyways, and getting these things to run is basically impossible at the moment.
Configuration menu - View commit details
-
Copy full SHA for 59ddefd - Browse repository at this point
Copy the full SHA 59ddefdView commit details -
They rely on a working riot-web build, which this is not.
Configuration menu - View commit details
-
Copy full SHA for f5264db - Browse repository at this point
Copy the full SHA f5264dbView commit details
Commits on Dec 13, 2019
-
Fix exports for rate limited functions and MatrixClientPeg
MatrixClientPeg in particular doesn't work very well with this.
Configuration menu - View commit details
-
Copy full SHA for 225695a - Browse repository at this point
Copy the full SHA 225695aView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 20a6153 - Browse repository at this point
Copy the full SHA 20a6153View commit details
Commits on Dec 16, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 0a9985f - Browse repository at this point
Copy the full SHA 0a9985fView commit details -
We're making an assumption here that the decorator is actually all over the app when it's not.
Configuration menu - View commit details
-
Copy full SHA for 9865ce8 - Browse repository at this point
Copy the full SHA 9865ce8View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.