Skip to content

Commit

Permalink
fix: remove feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
salimtb committed Sep 29, 2024
1 parent 2e989e9 commit aa9c5e9
Show file tree
Hide file tree
Showing 22 changed files with 2,364 additions and 1,145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`CellSelectWithMenu should render with default settings correctly 1`] =
"opacity": 1,
"padding": 16,
"position": "relative",
"width": "95%",
"width": "90%",
"zIndex": 1,
}
}
Expand Down Expand Up @@ -278,7 +278,13 @@ exports[`CellSelectWithMenu should render with default settings correctly 1`] =
</View>
</View>
</TouchableOpacity>
<View>
<View
style={
{
"paddingHorizontal": 20,
}
}
>
<TouchableOpacity
accessibilityRole="button"
accessible={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`ListItemMultiSelectButton should render correctly with default props 1`
"opacity": 1,
"padding": 16,
"position": "relative",
"width": "95%",
"width": "90%",
"zIndex": 1,
}
}
Expand All @@ -43,7 +43,13 @@ exports[`ListItemMultiSelectButton should render correctly with default props 1`
<View />
</View>
</TouchableOpacity>
<View>
<View
style={
{
"paddingHorizontal": 20,
}
}
>
<TouchableOpacity
accessibilityRole="button"
accessible={true}
Expand Down
13 changes: 5 additions & 8 deletions app/components/Nav/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ import NFTAutoDetectionModal from '../../../../app/components/Views/NFTAutoDetec
import NftOptions from '../../../components/Views/NftOptions';
import ShowTokenIdSheet from '../../../components/Views/ShowTokenIdSheet';
import OriginSpamModal from '../../Views/OriginSpamModal/OriginSpamModal';
import { isNetworkUiRedesignEnabled } from '../../../util/networks/isNetworkUiRedesignEnabled';
import TooltipModal from '../../../components/Views/TooltipModal';
///: BEGIN:ONLY_INCLUDE_IF(preinstalled-snaps,external-snaps)
import { SnapsExecutionWebView } from '../../../lib/snaps';
Expand Down Expand Up @@ -895,13 +894,11 @@ const App = (props) => {
component={AddNetworkFlow}
options={{ animationEnabled: true }}
/>
{isNetworkUiRedesignEnabled() ? (
<Stack.Screen
name={Routes.EDIT_NETWORK}
component={AddNetworkFlow}
options={{ animationEnabled: true }}
/>
) : null}
<Stack.Screen
name={Routes.EDIT_NETWORK}
component={AddNetworkFlow}
options={{ animationEnabled: true }}
/>

<Stack.Screen
name={Routes.LOCK_SCREEN}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -703,7 +703,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -1444,7 +1444,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -1492,10 +1492,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
},
undefined,
undefined,
{
"fontFamily": "EuclidCircularB-Bold",
"fontWeight": "600",
},
false,
undefined,
undefined,
undefined,
Expand Down Expand Up @@ -1598,7 +1595,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -1648,10 +1645,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
},
undefined,
undefined,
{
"fontFamily": "EuclidCircularB-Bold",
"fontWeight": "600",
},
false,
undefined,
undefined,
undefined,
Expand Down Expand Up @@ -2297,7 +2291,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -2451,7 +2445,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -2605,7 +2599,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -2653,10 +2647,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
},
undefined,
undefined,
{
"fontFamily": "EuclidCircularB-Bold",
"fontWeight": "600",
},
false,
undefined,
undefined,
undefined,
Expand Down Expand Up @@ -2759,7 +2750,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -2809,10 +2800,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
},
undefined,
undefined,
{
"fontFamily": "EuclidCircularB-Bold",
"fontWeight": "600",
},
false,
undefined,
undefined,
undefined,
Expand Down Expand Up @@ -3458,7 +3446,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -3612,7 +3600,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -3766,7 +3754,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -3814,10 +3802,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
},
undefined,
undefined,
{
"fontFamily": "EuclidCircularB-Bold",
"fontWeight": "600",
},
false,
undefined,
undefined,
undefined,
Expand Down Expand Up @@ -3920,7 +3905,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -3970,10 +3955,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
},
undefined,
undefined,
{
"fontFamily": "EuclidCircularB-Bold",
"fontWeight": "600",
},
false,
undefined,
undefined,
undefined,
Expand Down Expand Up @@ -4619,7 +4601,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -4773,7 +4755,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -4927,7 +4909,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -4975,10 +4957,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
},
undefined,
undefined,
{
"fontFamily": "EuclidCircularB-Bold",
"fontWeight": "600",
},
false,
undefined,
undefined,
undefined,
Expand Down Expand Up @@ -5081,7 +5060,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
{
"borderRadius": 10,
"height": 20,
"marginRight": 10,
"marginRight": 20,
"width": 20,
}
}
Expand Down Expand Up @@ -5131,10 +5110,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
},
undefined,
undefined,
{
"fontFamily": "EuclidCircularB-Bold",
"fontWeight": "600",
},
false,
undefined,
undefined,
undefined,
Expand Down
2 changes: 1 addition & 1 deletion app/components/Views/MultiRpcModal/MultiRpcModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ describe('MultiRpcModal', () => {
const allowButton = getByTestId('allow');

fireEvent.press(allowButton);
expect(setShowMultiRpcModalSpy).toHaveBeenCalledWith(true);
expect(setShowMultiRpcModalSpy).toHaveBeenCalledWith(false);
});
});
2 changes: 1 addition & 1 deletion app/components/Views/MultiRpcModal/MultiRpcModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const MultiRpcModal = () => {
<View>
{Object.values(networkConfigurations).map(
(networkConfiguration: NetworkConfiguration, index) =>
networkConfiguration.rpcEndpoints.length > 0 ? (
networkConfiguration.rpcEndpoints.length > 1 ? (
<Cell
key={index}
variant={CellVariant.SelectWithMenu}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { mockTheme, useTheme } from '../../../../util/theme';
import Icon from 'react-native-vector-icons/Ionicons';
import createStyles from './NetworkSearchTextInput.styles';
import { NetworksViewSelectorsIDs } from '../../../../../e2e/selectors/Settings/NetworksView.selectors';
import { isNetworkUiRedesignEnabled } from '../../../../util/networks/isNetworkUiRedesignEnabled';

interface NetworkSearchTextInputProps {
searchString: string;
Expand All @@ -28,33 +27,24 @@ function NetworkSearchTextInput({
const { colors } = theme;
const styles = createStyles(colors || mockTheme.colors);
const [isSearchFieldFocused, setIsSearchFieldFocused] = useState(false);
const searchPlaceHolder = isNetworkUiRedesignEnabled()
? 'search-short'
: 'search';
const searchPlaceHolder = 'search-short';

const propsWhichAreFeatureFlagged = isNetworkUiRedesignEnabled()
? {
onFocus: () => {
isNetworkUiRedesignEnabled() && setIsSearchFieldFocused(true);
},
onBlur: () => {
isNetworkUiRedesignEnabled() && setIsSearchFieldFocused(false);
},
}
: {};
const propsWhichAreFeatureFlagged = {
onFocus: () => {
setIsSearchFieldFocused(true);
},
onBlur: () => {
setIsSearchFieldFocused(false);
},
};

const inputStylesWhichAreFeatureFlagged = !isNetworkUiRedesignEnabled()
? styles.input
: isSearchFieldFocused
const inputStylesWhichAreFeatureFlagged = isSearchFieldFocused
? styles.input
: styles.unfocusedInput;

const containerInputStylesWhichAreFeatureFlagged =
!isNetworkUiRedesignEnabled()
? styles.inputWrapper
: isSearchFieldFocused
? styles.focusedInputWrapper
: styles.inputWrapper;
const containerInputStylesWhichAreFeatureFlagged = isSearchFieldFocused
? styles.focusedInputWrapper
: styles.inputWrapper;

return (
<View style={containerInputStylesWhichAreFeatureFlagged}>
Expand Down
Loading

0 comments on commit aa9c5e9

Please sign in to comment.