From b4f276279a0384e824221e2ba50651f7020f268a Mon Sep 17 00:00:00 2001 From: Damiano Plebani Date: Fri, 17 May 2024 16:10:34 +0200 Subject: [PATCH] chore(Cross): [IOAPPX-283] Add `IOScrollView` (next iteration of `GradientScroll`, now deprecated) + `IOScrollViewWithLargeHeader` (#5704) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > [!note] > This PR is the result of the discussion we had in the PR below: > * https://github.com/pagopa/io-app-design-system/pull/243 ## Short description This PR add the new `IOScrollView`, next iteration of the `GradientScrollView` (now officially deprecated): - Simpler UI logic without unnecessary calculations - Option to add a tertiary button - Dark mode support It also adds the new `IOScrollViewWithLargeHeader` screen component that should replace `RNavScreenWithLargeHeader`. ## List of changes proposed in this pull request - Add the new `IOScrollView` screen component. Compared to the previous `GradientScrollView`: - Remove `GradientBottomActions` because it hasn't added any advantage - Add the new `snapOffset` prop to optionally configure the snap point - Add optional `headerConfig` prop - Add optional `includeContentMargins` boolean value to remove content margins if needed - Manage everything inside `GradientScrollView` (now `IOScrollView`) - Refactor action related props by adding a single `actions` config object - Change opacity transition from discrete to continuous - Apply the opacity transition just to the gradient, excluding safe background block - Improve `debugMode` so you can see the gradient area even when the end is reached - Add the new `IOScrollViewWithLargeHeader` screen component. Compared to the previous `RNavScreenWithLargeHeader`: - Remove `fixedBottomSlot` because we already manage the actions at the bottom with the `IOScrollView` component - Simpler inner component logic ### Preview | Three buttons | Debug section | |--------|--------| |