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

Add config to hide the labs section #393

Merged
merged 3 commits into from
Aug 5, 2016
Merged

Add config to hide the labs section #393

merged 3 commits into from
Aug 5, 2016

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Aug 5, 2016

No description provided.

@@ -139,6 +139,10 @@ module.exports = React.createClass({
return this.props.config.default_is_url || "https://vector.im";
},

getEnableLabs() {
return this.props.config.enableLabs === undefined ? true : this.props.config.enableLabs;
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't it make more sense to default to false?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, just having it shown doesn't turn any options on, so I figured leave it on by default, but really happy to do either to be honest.

@@ -359,6 +363,8 @@ module.exports = React.createClass({
},

_renderLabs: function () {
if (this.props.enableLabs === false) return null;
Copy link
Member

Choose a reason for hiding this comment

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

!this.props.enableLabs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Intention was to make it default to enabled if it wasn't specified, which I'ver clarified in a comment.

Copy link
Member

Choose a reason for hiding this comment

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

But if it's not specified, it will get the value from defaultProps

On 5 August 2016 17:19:32 BST, David Baker notifications@github.com wrote:

@@ -359,6 +363,8 @@ module.exports = React.createClass({
},

 _renderLabs: function () {
  •    if (this.props.enableLabs === false) return null;
    

Intention was to make it default to enabled if it wasn't specified,
which I'ver clarified in a comment.


You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub:
https://github.com/matrix-org/matrix-react-sdk/pull/393/files/f8d02c1551ff9392be45a0cfed0fcd33d5078048#r73719512

@richvdh
Copy link
Member

richvdh commented Aug 5, 2016

lgtm otherwise

@richvdh richvdh assigned dbkr and unassigned richvdh Aug 5, 2016
@dbkr dbkr merged commit 4b8ad3c into develop Aug 5, 2016
@richvdh richvdh deleted the dbkr/enable_labs branch February 15, 2017 13:16
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.

2 participants