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

[IOAPPX-283] Deprecate GradientScrollView for IOScrollView #243

Merged
merged 21 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
de03c6f
Refactor code, add dark mode support
dmnplb Apr 9, 2024
cbb108e
Remove unnecessary hardcoded layout calculations
dmnplb Apr 9, 2024
54b1000
Improve `DebugMode`
dmnplb Apr 9, 2024
9bb092f
Remove `safeBackgroundBlock` because not necessary anymore
dmnplb Apr 9, 2024
5c9aa21
Fix wrong safe area margin condition, manage three buttons
dmnplb Apr 9, 2024
1639a84
Fix size of `safeBackgroundBlock`
dmnplb Apr 9, 2024
5afb767
Merge branch 'main' into IOAPPX-283-refactor-gradient-scrollview
dmnplb Apr 9, 2024
c67d699
Remove `GradientBottomActions`
dmnplb Apr 9, 2024
fbb766c
Remove export of `GradientBottomActions`
dmnplb Apr 10, 2024
f27e3ae
Change opacity transition from discrete to continuous
dmnplb Apr 10, 2024
5c3b185
Update example screen with dark mode compatible headers
dmnplb Apr 10, 2024
1faf695
update typescript version for compilation error
CrisTofani Apr 10, 2024
8d550e4
Hide gradient if `actionProps` is not defined
dmnplb Apr 11, 2024
ab0c635
Merge branch 'main' into IOAPPX-283-refactor-gradient-scrollview
dmnplb Apr 12, 2024
8792447
Merge branch 'main' into IOAPPX-283-refactor-gradient-scrollview
dmnplb Apr 17, 2024
0616d82
Restore `GradientScrollView`, add new refactored `IOScrollView` instead
dmnplb Apr 18, 2024
5abdc1f
Merge branch 'main' into IOAPPX-283-refactor-gradient-scrollview
hevelius Apr 18, 2024
0d4c028
Remove `GradientScroll` from example app
dmnplb Apr 18, 2024
6e0d5f0
Restore previous configuration
dmnplb Apr 18, 2024
a1446c9
Merge branch 'main' into IOAPPX-283-refactor-gradient-scrollview
Ladirico May 3, 2024
7d05ebe
Merge branch 'main' into IOAPPX-283-refactor-gradient-scrollview
CrisTofani May 17, 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
6 changes: 3 additions & 3 deletions example/src/navigation/navigator.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {
HeaderSecondLevel,
ModalBSHeader,
IOStyles,
IOThemeDark,
IOThemeLight,
ModalBSHeader,
useIOThemeContext
} from "@pagopa/io-app-design-system";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import React from "react";
import {
DarkTheme,
DefaultTheme,
NavigationContainer
} from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import React from "react";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { Accordion } from "../pages/Accordion";
import { DSAdvice } from "../pages/Advice";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"storybook": "^7.4.0",
"storybook-react-context": "^0.6.0",
"svgo": "^3.0.2",
"typescript": "^4.9.5"
"typescript": "^5.4.4"
},
"resolutions": {
"@types/react": "17.0.43"
Expand Down
4 changes: 4 additions & 0 deletions src/components/layout/GradientBottomActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ const styles = StyleSheet.create({
}
});

/**
* @deprecated This component has been included in the new `IOScrollView` after a proper refactor. It will be removed in a future release.
* @see IOScrollView
*/
export const GradientBottomActions = ({
primaryActionProps: primaryAction,
secondaryActionProps: secondaryAction,
Expand Down
4 changes: 4 additions & 0 deletions src/components/layout/GradientScrollView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const secondaryActionEstHeight: number = 20;
// Extra bottom margin for iPhone bottom handle
const extraSafeAreaMargin: IOSpacingScale = 8;

/**
* @deprecated This component has been deprecated. It will be removed in a future release.
* @see IOScrollView
*/
export const GradientScrollView = ({
children,
primaryActionProps: primaryActionProps,
Expand Down
10 changes: 5 additions & 5 deletions src/components/layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export * from "./common";
export * from "./GradientScrollView";
export * from "./BlockButtons";
export * from "./FooterWithButtons";
export * from "./ForceScrollDownView";
export * from "./GradientBottomActions";
export * from "./GradientScrollView";
export * from "./HeaderFirstLevel";
export * from "./HeaderSecondLevel";
export * from "./ForceScrollDownView";
export * from "./FooterWithButtons";
export * from "./BlockButtons";
export * from "./ModalBSHeader";
export * from "./common";
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14655,10 +14655,10 @@ typedarray@^0.0.6:
resolved "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==

typescript@^4.9.5:
version "4.9.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
typescript@^5.4.4:
version "5.4.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.4.tgz#eb2471e7b0a5f1377523700a21669dce30c2d952"
integrity sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==

ua-parser-js@^1.0.35:
version "1.0.35"
Expand Down
Loading