Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(2739): permission summary view gets the ability to disconnect all #11239

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e515ac6
feat: adjust the spacings around the content to be closer to figma
EtherWizard33 Sep 16, 2024
bcf205b
feat: add the ability for the init connect to nav to edit network screen
EtherWizard33 Sep 16, 2024
127817c
feat: add the disconect all button to the permision summary view
EtherWizard33 Sep 16, 2024
c318c98
Merge branch 'main' into feat
EtherWizard33 Sep 17, 2024
9eea59b
test: fix test since it now depends on nav, and update snapshots afte…
EtherWizard33 Sep 17, 2024
9e99424
Merge branch 'main' into temp
EtherWizard33 Sep 17, 2024
d4856f2
feat: make the row touchable rather than just the arrow right or the …
EtherWizard33 Sep 17, 2024
5da60b2
chore: add exclusion to sonar local config until code is feature comp…
EtherWizard33 Sep 17, 2024
eab0575
chore: add feature flag to example env file
EtherWizard33 Sep 17, 2024
edb7144
fix: padding below the bottoms is necessary only in fullscreen mode, …
EtherWizard33 Sep 17, 2024
a0e05ba
style: extract to component to minimize duplication (sonar)
EtherWizard33 Sep 17, 2024
1a91fc8
chore: add exclusion to sonar local config until code is feature comp…
EtherWizard33 Sep 17, 2024
a5dbbe2
feat: in full screen mode, the main container and footer should be sp…
EtherWizard33 Sep 17, 2024
1940666
test: update snapshot since flex is now space betwen
EtherWizard33 Sep 17, 2024
ade0024
refactor: remove redundant prop, it was the opposite of another exist…
EtherWizard33 Sep 17, 2024
a2e54bf
Merge branch 'main' into feat
EtherWizard33 Sep 17, 2024
d94a7e4
Merge branch 'main' into feat
EtherWizard33 Sep 18, 2024
d932c33
Merge branch 'main' into feat
EtherWizard33 Sep 19, 2024
e3ab18e
Merge branch 'main' into feat
EtherWizard33 Sep 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .js.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ export MM_ENABLE_SETTINGS_PAGE_DEV_OPTIONS="true"

# Multichain Feature flag
export MULTICHAIN_V1=""
#Multichain feature flag specific to UI changes
export MM_MULTICHAIN_V1_ENABLED=""
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
import { StyleSheet } from 'react-native';
import Device from '../../../util/device';
import { Theme } from '../../../util/theme/models';

const createStyles = (params: { theme: Theme }) => {
const createStyles = (params: {
theme: Theme;
vars: { isRenderedAsBottomSheet: boolean | undefined };
}) => {
const { theme } = params;
const { vars } = params;

return StyleSheet.create({
mainContainer: {
backgroundColor: theme.colors.background.default,
paddingTop: 24,
paddingTop: 8,
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
minHeight: 200,
paddingBottom: Device.isIphoneX() ? 20 : 0,
height: vars.isRenderedAsBottomSheet ? undefined : '100%',
justifyContent: vars.isRenderedAsBottomSheet
? 'flex-start'
: 'space-between',
},
title: {
alignSelf: 'center',
marginTop: 8,
marginBottom: 16,
marginTop: 16,
marginRight: 24,
marginLeft: 24,
},
actionButtonsContainer: {
flex: 0,
flexDirection: 'row',
padding: 24,
paddingHorizontal: 24,
},
buttonPositioning: {
flex: 1,
Expand All @@ -37,7 +44,7 @@ const createStyles = (params: { theme: Theme }) => {
networkPermissionRequestInfoCard: {
marginHorizontal: 24,
marginTop: 8,
marginBottom: 12,
marginBottom: 16,
alignItems: 'center',
flexDirection: 'row',
},
Expand Down Expand Up @@ -101,6 +108,18 @@ const createStyles = (params: { theme: Theme }) => {
editArrow: {
marginHorizontal: 16,
},
walletIcon: { alignSelf: 'flex-start' },
dataIcon: { alignSelf: 'flex-start' },
disconnectAllContainer: {
marginTop: 16,
marginHorizontal: 24,
flexDirection: 'row',
},
disconnectButton: { flex: 1 },
editTextContainer: {
width: 56,
alignItems: 'center',
},
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ import { backgroundState } from '../../../util/test/initial-root-state';
import renderWithProvider from '../../../util/test/renderWithProvider';
import { MOCK_ACCOUNTS_CONTROLLER_STATE } from '../../../util/test/accountsControllerTestUtils';

const mockedNavigate = jest.fn();

jest.mock('@react-navigation/native', () => {
const actualNav = jest.requireActual('@react-navigation/native');
return {
...actualNav,
useNavigation: () => ({
goBack: mockedNavigate,
}),
};
});

const mockInitialState = {
wizard: {
step: 1,
Expand All @@ -15,6 +27,7 @@ const mockInitialState = {
},
},
};

describe('PermissionsSummary', () => {
it('should render correctly', () => {
const { toJSON } = renderWithProvider(
Expand Down
Loading
Loading