Skip to content

Commit

Permalink
chore(IT Wallet): [SIW-658] Remove legacy components (#5275)
Browse files Browse the repository at this point in the history
## Short description
This PR removes legacy components that have either been replaced by
newer versions or have been integrated into the design system library.
Each commit replaces a specific component. 

## List of changes proposed in this pull request
- Replaces `ItwFooterInfoBox` with `ItwTextInfo`;
- Removes `ItwLoadingSpinner.tsx` which has been integrated in the
design system library and also removes the support for both old and new
design system in `ItwLoadingSpinnerOverlay.tsx`;
- Replaces `BadgeButton.tsx` with `TabNavigator` and `TabItem` from the
design system library;
- Replaces `NewH3.tsx` with `H3` from the design system library.

## How to test
Static tests should be enough, optionally check the wallet home screen
tab navigator and a loading screen example.

---------

Co-authored-by: Mario Perrotta <mario.perrotta@pagopa.it>
  • Loading branch information
LazyAfternoons and hevelius committed Dec 1, 2023
1 parent d5719a2 commit f4fe5cb
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 343 deletions.
8 changes: 4 additions & 4 deletions ts/components/screens/BaseHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {
Icon,
IconButton,
HSpacer,
IOSpacer
IOSpacer,
H3
} from "@pagopa/io-app-design-system";
import I18n from "../../i18n";
import { navigateBack } from "../../store/actions/navigation";
Expand All @@ -36,7 +37,6 @@ import GoBackButton from "../GoBackButton";
import SearchButton, { SearchType } from "../search/SearchButton";
import AppHeader from "../ui/AppHeader";
import { itWalletEnabled } from "../../config";
import { NewH3 } from "../../features/it-wallet/components/design/NewH3";

type HelpButtonProps = {
dark?: boolean;
Expand Down Expand Up @@ -389,14 +389,14 @@ class BaseHeaderComponent extends React.PureComponent<Props, State> {
const { sectionTitle, dark } = this.props;
return (
<Left>
<NewH3
<H3
accessible={true}
accessibilityRole="header"
testID={"screen-content-header-title"}
color={dark ? "white" : "black"}
>
{sectionTitle}
</NewH3>
</H3>
</Left>
);
};
Expand Down
44 changes: 0 additions & 44 deletions ts/features/it-wallet/components/ItwFooterInfoBox.tsx

This file was deleted.

87 changes: 0 additions & 87 deletions ts/features/it-wallet/components/ItwLoadingSpinner.tsx

This file was deleted.

13 changes: 2 additions & 11 deletions ts/features/it-wallet/components/ItwLoadingSpinnerOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import {
IOColors,
LoadingSpinner,
VSpacer,
hexToRgba,
useIOExperimentalDesign
hexToRgba
} from "@pagopa/io-app-design-system";
import customVariables from "../../../theme/variables";
import { Overlay } from "../../../components/ui/Overlay";
import ItwLoadingSpinner from "./ItwLoadingSpinner";

const styles = StyleSheet.create({
main: {
Expand Down Expand Up @@ -49,20 +47,13 @@ const ItwLoadingSpinnerOverlay: React.FunctionComponent<Props> = (
captionSubtitle
} = props;

const { isExperimental } = useIOExperimentalDesign();

return (
<Overlay
backgroundColor={hexToRgba(IOColors.white, loadingOpacity)}
foreground={
isLoading && (
<View style={styles.main}>
{isExperimental ? (
<LoadingSpinner size={76} />
) : (
<ItwLoadingSpinner color={IOColors.blue} size={76} />
)}

<LoadingSpinner size={76} />
<VSpacer size={48} />
<H3
style={styles.textAlignCenter}
Expand Down

This file was deleted.

101 changes: 0 additions & 101 deletions ts/features/it-wallet/components/design/BadgeButton.tsx

This file was deleted.

41 changes: 0 additions & 41 deletions ts/features/it-wallet/components/design/NewH3.tsx

This file was deleted.

Loading

0 comments on commit f4fe5cb

Please sign in to comment.