Conversation
A thesis presented in two parts. This part has the absolute minimum logic changes to the themeing code in vector/index.js because I know how subtle and fragile this code is. However, it also looks like it's completely duplicated from react-sdk, so in the next part I'm going to remove that logic and make it use the logic in react-sdk, then we can see what breaks. Requires matrix-org/matrix-react-sdk#3637
Following on from matrix-org/matrix-react-sdk#3637 this removes the code dealing with themes in vector/index.js and uses the code from react-sdk. The two did almost exactly the same thing but in subtley different ways. This code can be incredibly subtle though, so doing this a separate PR.
dbkr
added a commit
to matrix-org/matrix-react-sdk
that referenced
this pull request
Nov 20, 2019
This was only used by vector/index.js, in the code removed by element-hq/element-web#11445 React SDK does a very similar thing in setTheme but also gets the rest of the custom theme name. Requires element-hq/element-web#11445
Member
|
I'm not sure it's safe to consider this code duplicated - the code is waiting for the CSS to load so it can set the theme without turning into a pile of no-css sadness. |
Member
Author
|
Yep, but the code in setTheme attempts to do that too. |
bwindels
approved these changes
Nov 20, 2019
Contributor
bwindels
left a comment
There was a problem hiding this comment.
looks like theming stuff
turt2live
approved these changes
Nov 20, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Following on from matrix-org/matrix-react-sdk#3637
this removes the code dealing with themes in vector/index.js and uses the
code from react-sdk. The two did almost exactly the same thing but in
subtley different ways.
This code can be incredibly subtle though, so doing this a separate
PR.
Based on #11442