diff --git a/CHANGELOG.md b/CHANGELOG.md index a8e890b2..14c46624 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,31 @@ 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.4.3](https://github.com/pagopa/io-app-design-system/compare/v5.0.0-0...v4.4.3) + +- Skip the `entering` transition on the first render of `ButtonSolid` [`#374`](https://github.com/pagopa/io-app-design-system/pull/374) + +#### [v5.0.0-0](https://github.com/pagopa/io-app-design-system/compare/v4.4.2...v5.0.0-0) + +> 20 December 2024 + +- Remove legacy styles from buttons [`d0ca275`](https://github.com/pagopa/io-app-design-system/commit/d0ca275ea9f1ec810d5afabde2392413791e3a9c) +- Update `jest` snapshots [`47d1f88`](https://github.com/pagopa/io-app-design-system/commit/47d1f88c017bc69b245c6996f61884e396bb8dc5) +- Update `jest` snapshots [`30076b9`](https://github.com/pagopa/io-app-design-system/commit/30076b93887ccf211ad03a02e4ed2700997b1300) + +#### [v4.4.2](https://github.com/pagopa/io-app-design-system/compare/v4.4.1...v4.4.2) + +> 20 December 2024 + +- [IOAPPX-456] Improve `ListItemNav` and `ListItemTransaction` dynamic spacing [`#373`](https://github.com/pagopa/io-app-design-system/pull/373) +- chore: release 4.4.2 [`783f4b9`](https://github.com/pagopa/io-app-design-system/commit/783f4b94a1b00c75ad4da3979a091220ebbb7c69) + #### [v4.4.1](https://github.com/pagopa/io-app-design-system/compare/v4.4.0...v4.4.1) +> 18 December 2024 + - [IOAPPX-451] Enable dynamic component scaling in the legacy UI [`#371`](https://github.com/pagopa/io-app-design-system/pull/371) +- chore: release 4.4.1 [`b82bd38`](https://github.com/pagopa/io-app-design-system/commit/b82bd385a9dd7ac82ff6622ed0935cb3373c5f18) #### [v4.4.0](https://github.com/pagopa/io-app-design-system/compare/v4.3.0...v4.4.0) diff --git a/example/src/pages/ListItem.tsx b/example/src/pages/ListItem.tsx index 9beab353..c3afcbdb 100644 --- a/example/src/pages/ListItem.tsx +++ b/example/src/pages/ListItem.tsx @@ -1,7 +1,9 @@ import { Divider, H2, + H6, Icon, + Badge, ListItemAction, ListItemAmount, ListItemHeader, @@ -134,6 +136,24 @@ const renderListItemNav = () => ( }} loading /> + +
Nome del valoreeeeee eeeeeeeeee
+ + + } + onPress={() => { + alert("Action triggered"); + }} + /> ( [isExperimental] ); + /* Prevent the component from triggering the `isEntering' transition + on the on the first render. Solution from this discussion: + https://github.com/software-mansion/react-native-reanimated/discussions/2513 + */ + const isMounted = useRef(false); + + useEffect(() => { + // eslint-disable-next-line functional/immutable-data + isMounted.current = true; + }, []); + // Interpolate animation values from `isPressed` values const pressedAnimationStyle = useAnimatedStyle(() => { // Link color states to the pressed states @@ -255,7 +266,9 @@ export const ButtonSolid = React.forwardRef( {loading && ( @@ -271,7 +284,9 @@ export const ButtonSolid = React.forwardRef( reverse flex property to invert the position */ iconPosition === "end" && { flexDirection: "row-reverse" } ]} - entering={enterTransitionInnerContent} + entering={ + isMounted.current ? enterTransitionInnerContent : undefined + } > {icon && ( @@ -176,16 +176,7 @@ export const ListItemNav = ({ style={[IOListItemStyles.listItem, backgroundAnimatedStyle]} > {/* Possibile graphical assets - Icon @@ -193,28 +184,50 @@ export const ListItemNav = ({ - Avatar */} {icon && !hugeFontEnabled && ( - + <> + + + )} {paymentLogoUri && ( - + <> + + + + )} + {avatar && ( + <> + + + )} - {avatar && } - {listItemNavContent} + + {listItemNavContent} + {loading && } {!loading && !hideChevron && ( - + {badge ? ( ) : ( diff --git a/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap b/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap index f0d646ae..3b03cb38 100644 --- a/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +++ b/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap @@ -530,9 +530,6 @@ exports[`Test List Item Components - Experimental Enabled ListItemNav Snapshot "flexDirection": "row", "justifyContent": "space-between", }, - { - "columnGap": 12, - }, { "transform": [ { @@ -546,7 +543,8 @@ exports[`Test List Item Components - Experimental Enabled ListItemNav Snapshot @@ -2202,9 +2200,6 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = ` "flexDirection": "row", "justifyContent": "space-between", }, - { - "columnGap": 12, - }, { "transform": [ { @@ -2218,7 +2213,8 @@ exports[`Test List Item Components ListItemNav Snapshot 1`] = `