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 {Modal, message} from 'antd';
|
||||
import {Layout, withTrackingScope, _NuxManagerContext} from 'flipper-plugin';
|
||||
import GK from '../fb-stubs/GK';
|
||||
import ReleaseChannel from '../ReleaseChannel';
|
||||
|
||||
const Container = styled(FlexColumn)({
|
||||
padding: 20,
|
||||
@@ -143,8 +141,6 @@ class SettingsSheet extends Component<Props, State> {
|
||||
darkMode,
|
||||
} = this.state.updatedSettings;
|
||||
|
||||
const {releaseChannel} = this.state.updatedLauncherSettings;
|
||||
|
||||
const {useSandy} = this.props;
|
||||
|
||||
const settingsPristine =
|
||||
@@ -280,22 +276,20 @@ class SettingsSheet extends Component<Props, State> {
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{(GK.get('flipper_sandy') ||
|
||||
releaseChannel == ReleaseChannel.INSIDERS) &&
|
||||
!disableSandy && (
|
||||
<ToggledSection
|
||||
label="Enable dark theme (experimental)"
|
||||
toggled={darkMode}
|
||||
onChange={(enabled) => {
|
||||
this.setState((prevState) => ({
|
||||
updatedSettings: {
|
||||
...prevState.updatedSettings,
|
||||
darkMode: enabled,
|
||||
},
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{!disableSandy && (
|
||||
<ToggledSection
|
||||
label="Enable dark theme (experimental)"
|
||||
toggled={darkMode}
|
||||
onChange={(enabled) => {
|
||||
this.setState((prevState) => ({
|
||||
updatedSettings: {
|
||||
...prevState.updatedSettings,
|
||||
darkMode: enabled,
|
||||
},
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<ToggledSection
|
||||
label="React Native keyboard shortcuts"
|
||||
toggled={reactNative.shortcuts.enabled}
|
||||
|
||||
@@ -14,6 +14,8 @@ import WarningEmployee from '../chrome/WarningEmployee';
|
||||
import fbConfig from '../fb-stubs/config';
|
||||
import {isFBEmployee} from '../utils/fbEmployee';
|
||||
import {Logger} from '../fb-interfaces/Logger';
|
||||
import isSandyEnabled from '../utils/isSandyEnabled';
|
||||
import {SandyApp} from '../sandy-chrome/SandyApp';
|
||||
|
||||
type Props = {logger: Logger};
|
||||
|
||||
@@ -32,6 +34,8 @@ export default function App(props: Props) {
|
||||
setWarnEmployee(false);
|
||||
}}
|
||||
/>
|
||||
) : isSandyEnabled() ? (
|
||||
<SandyApp />
|
||||
) : (
|
||||
<FlipperApp logger={props.logger} />
|
||||
);
|
||||
|
||||
@@ -7,9 +7,20 @@
|
||||
* @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;
|
||||
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
|
||||
*/
|
||||
|
||||
import config from '../fb-stubs/config';
|
||||
import GK from '../fb-stubs/GK';
|
||||
import ReleaseChannel from '../ReleaseChannel';
|
||||
import {store} from '../store';
|
||||
|
||||
export default function isSandyEnabled() {
|
||||
return (
|
||||
(GK.get('flipper_sandy') ||
|
||||
config.getReleaseChannel() === ReleaseChannel.INSIDERS) &&
|
||||
!store.getState().settingsState.disableSandy
|
||||
);
|
||||
return !store.getState().settingsState.disableSandy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user