Skip to content

Commit

Permalink
Merge branch 'main' into IOAPPX-429-enable-font-scaling-by-default
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnplb committed Dec 16, 2024
2 parents 41f5c55 + ad30a4a commit b4c59fd
Show file tree
Hide file tree
Showing 77 changed files with 1,858 additions and 2,377 deletions.
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,42 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v4.3.0](https://github.com/pagopa/io-app-design-system/compare/v4.2.1...v4.3.0)

- [IOAPPX-428] Add the new `useScaleAnimation` and `useListItemAnimation` hooks + Add support for the `reducedMotion` a11y setting [`#358`](https://github.com/pagopa/io-app-design-system/pull/358)
- [IOAPPX-446] Remove `FooterWithButtons` [`#366`](https://github.com/pagopa/io-app-design-system/pull/366)

#### [v4.2.1](https://github.com/pagopa/io-app-design-system/compare/v4.2.0...v4.2.1)

> 6 December 2024
- fix: module credential end component [`#367`](https://github.com/pagopa/io-app-design-system/pull/367)
- [IOAPPX-441] Uniform text sizes of `ListItem…` components [`#363`](https://github.com/pagopa/io-app-design-system/pull/363)
- chore: release 4.2.1 [`f57cb44`](https://github.com/pagopa/io-app-design-system/commit/f57cb44c9b5132cc3004f719fc77c6c38d8a8285)

#### [v4.2.0](https://github.com/pagopa/io-app-design-system/compare/v4.1.0...v4.2.0)

> 2 December 2024
- [IOAPPX-443] Restore `a11y` props in the `Banner` component [`#364`](https://github.com/pagopa/io-app-design-system/pull/364)
- [IOAPPX-444] Remove export of `BlockButtons` [`#365`](https://github.com/pagopa/io-app-design-system/pull/365)
- chore: release 4.2.0 [`518cbce`](https://github.com/pagopa/io-app-design-system/commit/518cbce0f8777cacad33a2304bdde6dc32ba45e6)

#### [v4.1.0](https://github.com/pagopa/io-app-design-system/compare/v4.0.1...v4.1.0)
#### [v4.1.0](https://github.com/pagopa/io-app-design-system/compare/v4.0.2...v4.1.0)

> 28 November 2024
- [IOAPPX-440] Slightly refactor `Stack` component [`#362`](https://github.com/pagopa/io-app-design-system/pull/362)
- [IOAPPX-413] Add dark mode support to `Alert`, `Banner` and `FeatureInfo` components [`#344`](https://github.com/pagopa/io-app-design-system/pull/344)
- chore: release 4.1.0 [`900ab1e`](https://github.com/pagopa/io-app-design-system/commit/900ab1e02cce74bcd9d24d02c85496eb2e5e07ca)

#### [v4.0.2](https://github.com/pagopa/io-app-design-system/compare/v4.0.1...v4.0.2)

> 6 December 2024
- fix: module credential end component [`#367`](https://github.com/pagopa/io-app-design-system/pull/367)
- chore: release 4.0.2 [`3143367`](https://github.com/pagopa/io-app-design-system/commit/3143367e8a80fe8f552741e2bbf27e8bd2428e9f)

#### [v4.0.1](https://github.com/pagopa/io-app-design-system/compare/v4.0.0...v4.0.1)

> 21 November 2024
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|fontScale"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
Expand Down
12 changes: 12 additions & 0 deletions example/android/app/src/main/java/com/exampleapp/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;

import android.os.Bundle;

public class MainActivity extends ReactActivity {

/**
Expand All @@ -16,6 +18,16 @@ protected String getMainComponentName() {
return "ExampleApp";
}

/**
* Avoid crashing the application when the user changes the `fontScale` attribute
* and the UI is updated accordingly.
* To learn more: https://github.com/pagopa/io-app-design-system/pull/348
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}

/**
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
Expand Down
7 changes: 7 additions & 0 deletions example/src/pages/Badges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,12 @@ const renderTag = () => (
<Tag text={"Looooooooong string"} variant="error" />
</View>
</ComponentViewerBox>
<ComponentViewerBox name={"Tag, font scaling not allowed"}>
<Tag
text={"Entro il 30 mag"}
variant="warning"
allowFontScaling={false}
/>
</ComponentViewerBox>
</View>
);
3 changes: 3 additions & 0 deletions example/src/pages/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ const renderListItemInfoCopy = () => (
}}
accessibilityLabel="Empty just for testing purposes"
/>
<Divider />
<ListItemInfoCopy
label={"Codice fiscale"}
value="01199250158"
Expand All @@ -252,6 +253,7 @@ const renderListItemInfoCopy = () => (
accessibilityLabel="Empty just for testing purposes"
icon="institution"
/>
<Divider />
<ListItemInfoCopy
label={"Carta di credito"}
value="4975 3013 5042 7899"
Expand All @@ -261,6 +263,7 @@ const renderListItemInfoCopy = () => (
accessibilityLabel="Empty just for testing purposes"
icon="creditCard"
/>
<Divider />
<ListItemInfoCopy
label={"Indirizzo"}
value={`P.za Colonna, 370\n00186 Roma (RM)`}
Expand Down
10 changes: 8 additions & 2 deletions jestSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jest.mock("react-native-reanimated", () => {
// The mock misses the `addWhitelistedUIProps` implementation
// So we override it with a no-op
// eslint-disable-next-line functional/immutable-data,@typescript-eslint/no-empty-function
Reanimated.default.addWhitelistedUIProps = () => {};
Reanimated.default.addWhitelistedUIProps = () => { };
// eslint-disable-next-line functional/immutable-data
Reanimated.useReducedMotion = () => false;

return Reanimated;
});
Expand All @@ -46,5 +48,9 @@ global.AbortController = AbortController;
global.__reanimatedWorkletInit = jest.fn();

jest.mock("./src/utils/accessibility", () => ({
useBoldTextEnabled: () => false
useBoldTextEnabled: () => false,
useIOFontDynamicScale: () => ({
dynamicFontScale: 1,
spacingScaleMultiplier: 1
})
}));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pagopa/io-app-design-system",
"version": "4.2.0",
"version": "4.3.0",
"description": "The library defining the core components of the design system of @pagopa/io-app",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ exports[`Test Advice Components - Experimental Enabled Advice Snapshot 1`] = `
<Text
allowFontScaling={true}
dynamicTypeRamp="body"
maxFontSizeMultiplier={1.25}
maxFontSizeMultiplier={1.5}
style={
[
{},
Expand Down Expand Up @@ -192,7 +192,7 @@ exports[`Test Advice Components Advice Snapshot 1`] = `
<Text
allowFontScaling={true}
dynamicTypeRamp="body"
maxFontSizeMultiplier={1.25}
maxFontSizeMultiplier={1.5}
style={
[
{},
Expand Down
Loading

0 comments on commit b4c59fd

Please sign in to comment.