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: [#174575010] Add showroom listitem #2317

Merged
merged 6 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ profile:
appVersion: App Version
backendVersion: Backend Version
debugMode: Debug mode
showroom: Showroom
preferences:
title: Preferences
subtitle: This settings will be used by all services of the Public Amministration.
Expand Down
1 change: 1 addition & 0 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ profile:
appVersion: Versione App
backendVersion: Versione Backend
debugMode: Modalità debug
showroom: Showroom
preferences:
title: Preferenze
subtitle:
Expand Down
1 change: 1 addition & 0 deletions ts/navigation/MainNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const NoTabBarRoutes: ReadonlyArray<string> = [
WALLET_ONBOARDING_BANCOMAT_ROUTES.MAIN,
ROUTES.MARKDOWN_PLAYGROUND,
ROUTES.WEB_PLAYGROUND,
ROUTES.SHOWROOM,
ROUTES.SERVICE_WEBVIEW
];

Expand Down
4 changes: 4 additions & 0 deletions ts/navigation/ProfileNavigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import PrivacyMainScreen from "../screens/profile/PrivacyMainScreen";
import ProfileMainScreen from "../screens/profile/ProfileMainScreen";
import MarkdownPlayground from "../screens/profile/playgrounds/MarkdownPlayground";
import WebPlayground from "../screens/profile/WebPlayground";
import { Showroom } from "../screens/showroom/Showroom";
import ROUTES from "./routes";

/**
Expand Down Expand Up @@ -59,6 +60,9 @@ const ProfileNavigator = createStackNavigator(
[ROUTES.MARKDOWN_PLAYGROUND]: {
screen: MarkdownPlayground
},
[ROUTES.SHOWROOM]: {
screen: Showroom
},
[ROUTES.WEB_PLAYGROUND]: {
screen: WebPlayground
}
Expand Down
1 change: 1 addition & 0 deletions ts/navigation/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const ROUTES = {
MARKDOWN_PLAYGROUND: "MARKDOWN_PLAYGROUND",

// Developer Mode
SHOWROOM: "SHOWROOM",
WEB_PLAYGROUND: "WEB_PLAYGROUND",

// Preferences
Expand Down
6 changes: 6 additions & 0 deletions ts/screens/profile/ProfileMainScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ class ProfileMainScreen extends React.PureComponent<Props, State> {
/>
</>
)}
{/* Showroom */}
<ListItemComponent
title={I18n.t("profile.main.showroom")}
onPress={() => navigation.navigate(ROUTES.SHOWROOM)}
isFirstItem={true}
/>
{this.developerListItem(
I18n.t("profile.main.pagoPaEnvironment.pagoPaEnv"),
this.props.isPagoPATestEnabled,
Expand Down
31 changes: 19 additions & 12 deletions ts/screens/showroom/Showroom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as React from "react";
import { useEffect } from "react";
import { SafeAreaView, ScrollView, StyleSheet } from "react-native";
import { IOStyles } from "../../components/core/variables/IOStyles";
import BaseScreenComponent from "../../components/screens/BaseScreenComponent";
import I18n from "../../i18n";
import { ColorsShowroom } from "./core/ColorsShowroom";
import { SelectionShowroom } from "./core/SelectionShowroom";
import { TypographyShowroom } from "./core/TypographyShowRoom";
Expand Down Expand Up @@ -34,17 +36,22 @@ export const Showroom = () => {
}, []);

return (
<SafeAreaView style={styles.body}>
<ScrollView>
<View style={IOStyles.horizontalContentPadding}>
<ColorsShowroom />
<View spacer={true} extralarge={true} />
<TypographyShowroom />
<SelectionShowroom />
<View spacer={true} extralarge={true} />
<OthersShowroom />
</View>
</ScrollView>
</SafeAreaView>
<BaseScreenComponent
goBack={true}
headerTitle={I18n.t("profile.main.showroom")}
>
<SafeAreaView style={styles.body}>
<ScrollView>
<View style={IOStyles.horizontalContentPadding}>
<ColorsShowroom />
<View spacer={true} extralarge={true} />
<TypographyShowroom />
<SelectionShowroom />
<View spacer={true} extralarge={true} />
<OthersShowroom />
</View>
</ScrollView>
</SafeAreaView>
</BaseScreenComponent>
);
};