Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

move everything not explicitly riot (or status) branded into matrix-react-sdk#1836

Merged
ara4n merged 34 commits into
developfrom
matthew/fix_layering
Apr 18, 2018
Merged

move everything not explicitly riot (or status) branded into matrix-react-sdk#1836
ara4n merged 34 commits into
developfrom
matthew/fix_layering

Conversation

@ara4n
Copy link
Copy Markdown
Member

@ara4n ara4n commented Apr 11, 2018

This is the other half of element-hq/element-web#6500; moving all the non-riot/status-branded UI from riot-web into matrix-react-sdk as per https://docs.google.com/document/d/1itOIy6zdKGJCQZEPecL9uTPTtBCVrZ_HgwQiDnah_LM.

Status:

  • Move all the files into the right(?) place
  • Make it build again
  • fix tests
  • remerge the i18n

Whilst this PR is in flight, I suggest folks try to avoid making changes to the riot-web repository.

@ara4n ara4n force-pushed the matthew/fix_layering branch from 550eac1 to 0336d99 Compare April 13, 2018 00:30
@ara4n
Copy link
Copy Markdown
Member Author

ara4n commented Apr 16, 2018

Right, I think this is good to go now. @lukebarnard1 i think i nominated you to do a sanitycheck? O:-)

Copy link
Copy Markdown
Contributor

@lukebarnard1 lukebarnard1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor problems with the changes themselves. Apart from those, I noticed:

  • Missing language files, such as ta.json (presumably because the scripting done for this assumed ta.json and others would already exist in matrix-react-sdk).
  • Missing images pN.png

this.props.onFinished(false);
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
Modal.createTrackedDialog('Bug report sent', '', QuestionDialog, {
Modal.createTrackedDialog(_t('Bug report sent'), '', QuestionDialog, {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary, that string is only used by the analytics.

export default React.createClass({
propTypes: {
status: React.PropTypes.oneOf(Object.values(updateCheckStatusEnum)).isRequired,
status: React.PropTypes.string, // oneOf(Object.values(updateCheckStatusEnum)).isRequired,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably still be marked as isRequired and have an explanation the values it should have. Alternatively, there doesn't seem to be anything from stopping updateCheckStatusEnum from being called from outside of the class (VectorBasePlatform returns a constant and none of the individual platforms override getUpdateCheckStatusEnum)

},

getStatusText: function() {
const updateCheckStatusEnum = PlatformPeg.get().getUpdateCheckStatusEnum();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a comment to explain why this is being done would be very useful.

Comment thread res/themes/light/css/light.scss Outdated
@@ -1,2 +1,2 @@
@import "_base.scss";
@import "../_components.scss"; No newline at end of file
@import "../../../../res/css/_components.scss"; No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: no NL at EOF

Comment thread res/themes/dark/css/dark.scss Outdated
@import "../../light/css/_base.scss";
@import "_dark.scss";
@import "../_components.scss";
@import "../../../../res/css/_components.scss"; No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: no NL at EOF

@mixin mx_DialogButton;
font-size: 15px;
padding: 0px 1.5em 0px 1.5em;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of annoying that this ended up in a different commit, otherwise the net change is moving _base.scss

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm a bit unsure whether _base.scss should be hidden in light (as in practice the default base.scss is the light theme) or somewhere more common. i'm not sure it makes much difference really so i'm leaving it here for now.

Comment thread res/css/rethemendex.sh

find . \! \( -path ./themes -prune \) -iname _\*.scss |
fgrep -v _components.scss | LC_ALL=C sort |
find . -iname _\*.scss | fgrep -v _components.scss | LC_ALL=C sort |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explaining the change here in the commit/in a comment would be nice, but this seems to have worked so LGTM.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have commented for posterity in the code.

@ara4n
Copy link
Copy Markdown
Member Author

ara4n commented Apr 17, 2018

Missing language files, such as ta.json (presumably because the scripting done for this assumed ta.json and others would already exist in matrix-react-sdk).

oooops - yup, turns out copy-i18n doesn't work if there's not a target to copy into. excellent catch; thanks.

the missing image files are deliberately dropped as they haven't been used since vector 0.5 or so.

otherwise, I think i've incorporated all of the review - @lukebarnard1, thanks!

all that remains is to fix the VectorHomePage mess.

@dbkr
Copy link
Copy Markdown
Member

dbkr commented Apr 18, 2018

lgtm

@ara4n ara4n merged commit 1aadaa3 into develop Apr 18, 2018
@luixxiul luixxiul mentioned this pull request May 1, 2023
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants