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

chore(Cross): [IOAPPX-435] Improve overall UI typography + Update io-app-design-system to 4.0.1 #6422

Merged
merged 66 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
7bb1ba1
Remove `Chip` typographic style, replace it with `LabelMini`
dmnplb Nov 19, 2024
f78464f
Replace `Label` with `Body` (with appropriate weight value)
dmnplb Nov 19, 2024
06516fd
Update `jest` snapshots
dmnplb Nov 19, 2024
5d80f72
Update the subtitle weight in the `ServicesHeader` component
dmnplb Nov 19, 2024
036548f
Fix `tsc` errors
dmnplb Nov 19, 2024
16fd16f
Decrease size of content in the `MessageListItem`
dmnplb Nov 19, 2024
1de6fb0
Update `jest` snapshot
dmnplb Nov 19, 2024
3b9669e
Replace `Bold` with `Semibold` in the `IOMarkdown`
dmnplb Nov 19, 2024
605083b
Update `jest` snapshot
dmnplb Nov 19, 2024
24cab21
Update `jest` snapshots
dmnplb Nov 19, 2024
7dd3ef4
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 20, 2024
5d637db
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 20, 2024
8d07888
Update `jest` snapshot
dmnplb Nov 20, 2024
fe166d5
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 20, 2024
5096bad
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 20, 2024
16a8ae5
Replace `LabelSmall` with `BodySmall`
dmnplb Nov 20, 2024
939e578
Fix `tsc` errors, except for `ClaimLabel`
dmnplb Nov 20, 2024
6ea3329
Update `jest` snapshots
dmnplb Nov 20, 2024
6bed362
Update `io-app-design-system` to `4.0.1` to fix TS errors
dmnplb Nov 21, 2024
060fcba
Update `jest` snapshots
dmnplb Nov 21, 2024
2378b27
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 21, 2024
d34efa7
Update `jest` snapshots
dmnplb Nov 21, 2024
729b317
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 21, 2024
c439706
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 21, 2024
c305ae1
Fix wrong font in the `TabNavigator`
dmnplb Nov 21, 2024
df15cca
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 21, 2024
6711264
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 21, 2024
1302e2a
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 22, 2024
b2b617d
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 22, 2024
7a91f91
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 22, 2024
0a8e95a
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 22, 2024
73762ef
Update `jest` snapshots
dmnplb Nov 22, 2024
4705374
Fix typo in the english locale + Update `jest` snapshots
dmnplb Nov 25, 2024
a0a4b21
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 25, 2024
b58f176
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 25, 2024
14bae03
Fix `tsc` error
dmnplb Nov 25, 2024
6e5a1e5
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 25, 2024
ed8f7ef
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 25, 2024
d707cfb
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 25, 2024
c6fccc5
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
LeleDallas Nov 26, 2024
405f0d8
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 26, 2024
7cf30ae
Remove `LabelSmall` from `ItwPresentationCredentialFiscalCodeModal`
dmnplb Nov 26, 2024
182ba24
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 26, 2024
717e6a6
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 27, 2024
eeb7226
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 27, 2024
20702e1
Update `jest` snapshots
dmnplb Nov 27, 2024
17cb8fa
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 28, 2024
1340db9
Update `jest` snapshot
dmnplb Nov 28, 2024
5025e27
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Nov 29, 2024
25e7b54
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 2, 2024
d8c7b3b
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
LeleDallas Dec 2, 2024
58cf8be
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 2, 2024
a2cc658
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
LeleDallas Dec 3, 2024
837bb51
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
LeleDallas Dec 3, 2024
7b05e0b
Update `jest` snapshots
dmnplb Dec 3, 2024
e2045be
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 3, 2024
9ba93d5
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 3, 2024
30c3654
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 4, 2024
b46f14b
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 4, 2024
0264981
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 4, 2024
131adde
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
LeleDallas Dec 4, 2024
55d399a
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 5, 2024
11fa7f3
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
LeleDallas Dec 5, 2024
7c0df64
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 5, 2024
30b06cd
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
Ladirico Dec 5, 2024
9375023
Merge branch 'master' into IOAPPX-435-improve-typography-new-UI
dmnplb Dec 5, 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: 1 addition & 1 deletion locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ authentication:
wizards:
cie_id_wizard:
title: Do you have the CieID app?
description: "If you have the CieID app on your device, enter the code you have set for the CieID app or use your face or fingerprint.\n\nTo enter the IO app without physically using the Electronic Identity Card,you must first enable Level 1 and Level 2 access in the CieID application."
description: "If you have the CieID app on your device, enter the code you have set for the CieID app or use your face or fingerprint.\n\nTo enter the IO app without physically using the Electronic Identity Card, you must first enable Level 1 and Level 2 access in the CieID application."
actions:
primary:
label: Yes, log in with CieID
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"dependencies": {
"@babel/plugin-transform-regenerator": "^7.18.6",
"@gorhom/bottom-sheet": "^4.1.5",
"@pagopa/io-app-design-system": "3.1.0",
"@pagopa/io-app-design-system": "4.0.1",
"@pagopa/io-pagopa-commons": "^3.1.0",
"@pagopa/io-react-native-cieid": "^0.3.5",
"@pagopa/io-react-native-crypto": "^0.3.0",
Expand Down
6 changes: 3 additions & 3 deletions ts/components/AppVersion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
StyleSheet,
View
} from "react-native";
import { LabelSmall } from "@pagopa/io-app-design-system";
import { BodySmall } from "@pagopa/io-app-design-system";
import I18n from "../i18n";
import { WithTestID } from "../types/WithTestID";
import { getAppVersion } from "../utils/appVersion";
Expand Down Expand Up @@ -33,9 +33,9 @@ const AppVersion = ({ onPress, testID }: AppVersion) => {
accessibilityLabel={appVersionText}
>
<View style={[styles.versionButton, IOStyles.row, IOStyles.alignCenter]}>
<LabelSmall numberOfLines={1} weight="Semibold" color="grey-650">
<BodySmall numberOfLines={1} weight="Semibold" color="grey-650">
{appVersionText}
</LabelSmall>
</BodySmall>
</View>
</Pressable>
);
Expand Down
6 changes: 3 additions & 3 deletions ts/components/BonusCard/BonusCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
H2,
HSpacer,
IOColors,
LabelSmall,
BodySmall,
VSpacer
} from "@pagopa/io-app-design-system";
import React from "react";
Expand Down Expand Up @@ -72,12 +72,12 @@ const BonusCardContent = (props: BonusCard) => {
{name}
</H2>
<VSpacer size={4} />
<LabelSmall
<BodySmall
weight="Regular"
style={{ textAlign: "center", marginHorizontal: 16 }}
>
{organizationName}
</LabelSmall>
</BodySmall>
<VSpacer size={16} />
<BonusCardStatus>{status}</BonusCardStatus>
<VSpacer size={16} />
Expand Down
10 changes: 5 additions & 5 deletions ts/components/BonusCard/__tests__/BonusCard.test.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { LabelMini } from "@pagopa/io-app-design-system";
import { render } from "@testing-library/react-native";
import React from "react";
import { Provider } from "react-redux";
import configureMockStore from "redux-mock-store";
import { Chip } from "@pagopa/io-app-design-system";
import I18n from "../../../i18n";
import { applicationChangeState } from "../../../store/actions/application";
import { appReducer } from "../../../store/reducers";
import { GlobalState } from "../../../store/reducers/types";
import { format } from "../../../utils/dates";
import { BonusCard } from "../BonusCard";
import { BonusCardCounter } from "../BonusCardCounter";
import I18n from "../../../i18n";
import { format } from "../../../utils/dates";

jest.mock("react-native-safe-area-context", () => {
const useSafeAreaInsets = () => ({ top: 0 });
Expand Down Expand Up @@ -60,11 +60,11 @@ describe("Test BonusCard", () => {
name: T_NAME,
organizationName: T_ORG_NAME,
status: (
<Chip color="grey-650">
<LabelMini weight="Regular" color="grey-650">
{I18n.t("bonusCard.validUntil", {
endDate: format(T_END_DATE, "DD/MM/YY")
})}
</Chip>
</LabelMini>
),
counters: [T_COUNTER_WITH_PROGRESS, T_COUNTER]
});
Expand Down
12 changes: 8 additions & 4 deletions ts/components/IOMarkdown/renderRules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
IOPictogramsBleed,
IOStyles,
IOToast,
Label,
Nullable,
VSpacer
} from "@pagopa/io-app-design-system";
Expand Down Expand Up @@ -160,7 +159,7 @@ export const DEFAULT_RULES: IOMarkdownRenderRules = {
*/
Strong(strong: TxtStrongNode, render: Renderer) {
return (
<Text key={getTxtNodeKey(strong)} style={{ fontWeight: "800" }}>
Ladirico marked this conversation as resolved.
Show resolved Hide resolved
<Text key={getTxtNodeKey(strong)} style={{ fontWeight: "600" }}>
{strong.children.map(render)}
</Text>
);
Expand All @@ -186,9 +185,14 @@ export const DEFAULT_RULES: IOMarkdownRenderRules = {
};

return (
<Label asLink key={getTxtNodeKey(link)} onPress={handleOpenLink}>
<Body
weight="Semibold"
asLink
key={getTxtNodeKey(link)}
onPress={handleOpenLink}
>
{link.children.map(render)}
</Label>
</Body>
);
},
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ exports[`IOMarkdown Should match snapshot 1`] = `
<Text
style={
{
"fontWeight": "800",
"fontWeight": "600",
}
}
>
Expand Down Expand Up @@ -694,6 +694,7 @@ exports[`IOMarkdown Should match snapshot 1`] = `
<Text
accessibilityRole="link"
allowFontScaling={false}
dynamicTypeRamp="body"
maxFontSizeMultiplier={1.25}
onPress={[Function]}
style={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ exports[`LoadingSpinnerOverlay Should match all-properties and loading snapshot
"fontFamily": "Titillium Sans Pro",
"fontSize": 16,
"fontStyle": "normal",
"fontWeight": "700",
"fontWeight": "600",
"lineHeight": undefined,
},
[
Expand Down
29 changes: 13 additions & 16 deletions ts/components/debug/DebugPrettyPrint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ WARNING: This component is not referenced anywhere, but is used
for development purposes. Please, Don't REMOVE it, thank you!
*/
import {
BodySmall,
HStack,
IOColors,
IOText,
IconButton,
LabelSmall,
useIOToast,
useTypographyFactory
useIOToast
} from "@pagopa/io-app-design-system";
import React from "react";
import { StyleSheet, View } from "react-native";
Expand Down Expand Up @@ -53,9 +53,15 @@ export const DebugPrettyPrint = withDebugEnabled(

return (
<View style={styles.content} pointerEvents="box-only">
<CustomBodyMonospace>
<IOText
font="DMMono"
size={12}
lineHeight={18}
color="bluegrey"
weight="Medium"
>
{JSON.stringify(truncateObjectStrings(data), null, 2)}
</CustomBodyMonospace>
</IOText>
</View>
);
}, [data, expandable, expanded]);
Expand All @@ -82,9 +88,9 @@ export const DebugPrettyPrint = withDebugEnabled(
return (
<View testID="DebugPrettyPrintTestID" style={styles.container}>
<View style={styles.header}>
<LabelSmall weight="Bold" color="white">
<BodySmall weight="Semibold" color="white">
{title}
</LabelSmall>
</BodySmall>
<HStack space={16}>
<IconButton
icon={"shareiOs"}
Expand Down Expand Up @@ -119,15 +125,6 @@ export const DebugPrettyPrint = withDebugEnabled(
}
);

const CustomBodyMonospace = (props: { children?: React.ReactNode }) =>
useTypographyFactory({
...props,
defaultWeight: "Medium",
defaultColor: "bluegrey",
font: "DMMono",
fontStyle: { fontSize: 12, lineHeight: 18 }
});

const styles = StyleSheet.create({
container: {
borderRadius: 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ exports[`LoadingScreenContent should match the snapshot with title, a child, hea
"alignItems": "center",
"display": "flex",
"flexDirection": "column",
"rowGap": 24,
"gap": 24,
}
}
>
Expand Down Expand Up @@ -962,7 +962,7 @@ exports[`LoadingScreenContent should match the snapshot with title, a child, hea
"alignItems": "center",
"display": "flex",
"flexDirection": "column",
"rowGap": 24,
"gap": 24,
}
}
>
Expand Down Expand Up @@ -1559,7 +1559,7 @@ exports[`LoadingScreenContent should match the snapshot with title, no children,
"alignItems": "center",
"display": "flex",
"flexDirection": "column",
"rowGap": 24,
"gap": 24,
}
}
>
Expand Down Expand Up @@ -2153,7 +2153,7 @@ exports[`LoadingScreenContent should match the snapshot with title, no children,
"alignItems": "center",
"display": "flex",
"flexDirection": "column",
"rowGap": 24,
"gap": 24,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ exports[`OperationResultScreenContent should match the snapshot with default pro
"fontFamily": "Titillium Sans Pro",
"fontSize": 16,
"fontStyle": "normal",
"fontWeight": "700",
"fontWeight": "600",
"lineHeight": 20,
},
{
Expand Down Expand Up @@ -657,7 +657,7 @@ exports[`OperationResultScreenContent should match the snapshot with default pro
"fontFamily": "Titillium Sans Pro",
"fontSize": 16,
"fontStyle": "normal",
"fontWeight": "700",
"fontWeight": "600",
"lineHeight": undefined,
},
{
Expand Down
6 changes: 2 additions & 4 deletions ts/components/ui/BannerErrorState.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Body,
ButtonLink,
Icon,
IOBannerBigSpacing,
Expand All @@ -8,7 +9,6 @@ import {
IOScaleValues,
IOSpringValues,
IOStyles,
Label,
VSpacer,
WithTestID
} from "@pagopa/io-app-design-system";
Expand Down Expand Up @@ -135,9 +135,7 @@ export const BannerErrorState = ({
)}
{label && (
<>
<Label color={colorContent} weight={"Regular"}>
{label}
</Label>
<Body color={colorContent}>{label}</Body>
{actionText && <VSpacer size={8} />}
</>
)}
Expand Down
6 changes: 3 additions & 3 deletions ts/components/ui/IOScrollViewWithLargeHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
H2,
HeaderSecondLevel,
IOStyles,
LabelSmall,
BodySmall,
VSpacer,
useIOTheme
} from "@pagopa/io-app-design-system";
Expand Down Expand Up @@ -119,9 +119,9 @@ export const IOScrollViewWithLargeHeader = forwardRef<View, Props>(
onLayout={getTitleHeight}
>
{title.section && (
<LabelSmall weight="Semibold" color={theme["textBody-tertiary"]}>
<BodySmall weight="Semibold" color={theme["textBody-tertiary"]}>
{title.section}
</LabelSmall>
</BodySmall>
)}
<H2
color={theme["textHeading-default"]}
Expand Down
Loading
Loading