Open Sandy by default to OSS users
Summary:
Removed all `GK.get('flipper_sandy') ` checks to make Sandy the default in public builds as well.
Changelog: Public OSS builds will now use Sandy by default
Reviewed By: passy
Differential Revision: D25803498
fbshipit-source-id: 17b0b431cd30ebcf1c308af0ce63a05b3798741e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
439601e20c
commit
1d23e043de
@@ -29,8 +29,6 @@ import SandySettingsPanel from '../fb-stubs/SandySettingsPanel';
|
|||||||
import {reportUsage} from '../utils/metrics';
|
import {reportUsage} from '../utils/metrics';
|
||||||
import {Modal, message} from 'antd';
|
import {Modal, message} from 'antd';
|
||||||
import {Layout, withTrackingScope, _NuxManagerContext} from 'flipper-plugin';
|
import {Layout, withTrackingScope, _NuxManagerContext} from 'flipper-plugin';
|
||||||
import GK from '../fb-stubs/GK';
|
|
||||||
import ReleaseChannel from '../ReleaseChannel';
|
|
||||||
|
|
||||||
const Container = styled(FlexColumn)({
|
const Container = styled(FlexColumn)({
|
||||||
padding: 20,
|
padding: 20,
|
||||||
@@ -143,8 +141,6 @@ class SettingsSheet extends Component<Props, State> {
|
|||||||
darkMode,
|
darkMode,
|
||||||
} = this.state.updatedSettings;
|
} = this.state.updatedSettings;
|
||||||
|
|
||||||
const {releaseChannel} = this.state.updatedLauncherSettings;
|
|
||||||
|
|
||||||
const {useSandy} = this.props;
|
const {useSandy} = this.props;
|
||||||
|
|
||||||
const settingsPristine =
|
const settingsPristine =
|
||||||
@@ -280,22 +276,20 @@ class SettingsSheet extends Component<Props, State> {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{(GK.get('flipper_sandy') ||
|
{!disableSandy && (
|
||||||
releaseChannel == ReleaseChannel.INSIDERS) &&
|
<ToggledSection
|
||||||
!disableSandy && (
|
label="Enable dark theme (experimental)"
|
||||||
<ToggledSection
|
toggled={darkMode}
|
||||||
label="Enable dark theme (experimental)"
|
onChange={(enabled) => {
|
||||||
toggled={darkMode}
|
this.setState((prevState) => ({
|
||||||
onChange={(enabled) => {
|
updatedSettings: {
|
||||||
this.setState((prevState) => ({
|
...prevState.updatedSettings,
|
||||||
updatedSettings: {
|
darkMode: enabled,
|
||||||
...prevState.updatedSettings,
|
},
|
||||||
darkMode: enabled,
|
}));
|
||||||
},
|
}}
|
||||||
}));
|
/>
|
||||||
}}
|
)}
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<ToggledSection
|
<ToggledSection
|
||||||
label="React Native keyboard shortcuts"
|
label="React Native keyboard shortcuts"
|
||||||
toggled={reactNative.shortcuts.enabled}
|
toggled={reactNative.shortcuts.enabled}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import WarningEmployee from '../chrome/WarningEmployee';
|
|||||||
import fbConfig from '../fb-stubs/config';
|
import fbConfig from '../fb-stubs/config';
|
||||||
import {isFBEmployee} from '../utils/fbEmployee';
|
import {isFBEmployee} from '../utils/fbEmployee';
|
||||||
import {Logger} from '../fb-interfaces/Logger';
|
import {Logger} from '../fb-interfaces/Logger';
|
||||||
|
import isSandyEnabled from '../utils/isSandyEnabled';
|
||||||
|
import {SandyApp} from '../sandy-chrome/SandyApp';
|
||||||
|
|
||||||
type Props = {logger: Logger};
|
type Props = {logger: Logger};
|
||||||
|
|
||||||
@@ -32,6 +34,8 @@ export default function App(props: Props) {
|
|||||||
setWarnEmployee(false);
|
setWarnEmployee(false);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
) : isSandyEnabled() ? (
|
||||||
|
<SandyApp />
|
||||||
) : (
|
) : (
|
||||||
<FlipperApp logger={props.logger} />
|
<FlipperApp logger={props.logger} />
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,9 +7,20 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default function (_props: {
|
import React from 'react';
|
||||||
|
import ToggledSection from '../chrome/settings/ToggledSection';
|
||||||
|
import {ConfigText} from '../chrome/settings/configFields';
|
||||||
|
|
||||||
|
export default function (props: {
|
||||||
toggled: boolean;
|
toggled: boolean;
|
||||||
onChange: (value: boolean) => void;
|
onChange: (value: boolean) => void;
|
||||||
}) {
|
}) {
|
||||||
return null;
|
return (
|
||||||
|
<ToggledSection {...props} label="Disable Sandy UI">
|
||||||
|
{' '}
|
||||||
|
<ConfigText
|
||||||
|
content={'If disabled, Flipper will fall back to the classic design.'}
|
||||||
|
/>
|
||||||
|
</ToggledSection>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,15 +7,8 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import config from '../fb-stubs/config';
|
|
||||||
import GK from '../fb-stubs/GK';
|
|
||||||
import ReleaseChannel from '../ReleaseChannel';
|
|
||||||
import {store} from '../store';
|
import {store} from '../store';
|
||||||
|
|
||||||
export default function isSandyEnabled() {
|
export default function isSandyEnabled() {
|
||||||
return (
|
return !store.getState().settingsState.disableSandy;
|
||||||
(GK.get('flipper_sandy') ||
|
|
||||||
config.getReleaseChannel() === ReleaseChannel.INSIDERS) &&
|
|
||||||
!store.getState().settingsState.disableSandy
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user