-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Hide pre-release features section of advanced settings pane. #333
Hide pre-release features section of advanced settings pane. #333
Conversation
c49f89c
to
4bae9c3
Compare
@esethna server PR has been merged |
|
Spinmint test server created at: http:https://i-031c85c1ef3f8b02a.spinmint.com Test Account 1: Email: Test Account 2: Email: Instance ID: i-031c85c1ef3f8b02a |
@dmeza @jwilander can we set the spinmint config flag for this to "false" to test it? It's |
I will update the spinmint |
Done |
Spinmint test server destroyed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than my minor comment
previewFeaturesSectionDivider = ( | ||
<div className='divider-light'/> | ||
); | ||
if (this.state.previewFeaturesEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we combine this if statement with the one below? Gets rid of a bit of unneeded nesting and makes way easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwilander rebased to latest and combined ifs to remove unneeded nesting.
4bae9c3
to
8b8ccca
Compare
@@ -77,11 +77,15 @@ export default class AdvancedSettingsDisplay extends React.Component { | |||
|
|||
const isSaving = false; | |||
|
|||
return {preReleaseFeatures: PreReleaseFeatures, | |||
const previewFeaturesEnabled = global.window.mm_config.EnablePreviewFeatures === 'true'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default.json uses "EnablePreviewFeatures": true
(with a Boolean value) but this is comparing against a string, and in JavaScript:
'true' === true // false
We should either compare against a Boolean only or both a Boolean and a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately we do this everywhere because the server returns the client config as a JSON object with string values (an oversight from very early in the project)
We will eventually fix it but no one's gotten around to it yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh OK. I didn't realized. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…s will not be available on first call (#333)
…s will not be available on first call (#333)
Summary
Hide pre-release feature section of advance settings pane
Here’s the PR for the server: mattermost/mattermost#7847
Cc @dmeza
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
make check-style
to check for style errors (required for all pull requests)make test
to ensure unit and component tests passed