Skip to content

Commit

Permalink
Merge branch 'master' into upgrade-to-rn-075
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisTofani authored Nov 23, 2024
2 parents fa2ce21 + 14022a1 commit 668d561
Show file tree
Hide file tree
Showing 50 changed files with 12,432 additions and 10,944 deletions.
35 changes: 15 additions & 20 deletions ts/components/CalendarsListContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as pot from "@pagopa/ts-commons/lib/pot";
import React, { memo, useCallback, useEffect, useState } from "react";
import RNCalendarEvents, { Calendar } from "react-native-calendar-events";
import {
ContentWrapper,
ListItemHeader,
RadioGroup,
VSpacer,
Expand Down Expand Up @@ -132,25 +131,21 @@ const CalendarsListContainer = ({
}, [fetchCalendars]);

return (
<ContentWrapper>
{pot.isSome(calendarsByAccount) &&
calendarsByAccount.value.map((section, index) => (
<React.Fragment key={index}>
<ListItemHeader label={section.title} />
<RadioGroup<string>
type="radioListItem"
key={`radio_group_${index}`}
items={mapData(section.data)}
selectedItem={selectedCalendar?.id}
onPress={onPressRadio}
/>
{/* not show the end spacer if the element is the last */}
{index < calendarsByAccount.value.length - 1 && (
<VSpacer size={24} />
)}
</React.Fragment>
))}
</ContentWrapper>
pot.isSome(calendarsByAccount) &&
calendarsByAccount.value.map((section, index) => (
<React.Fragment key={index}>
<ListItemHeader label={section.title} />
<RadioGroup<string>
type="radioListItem"
key={`radio_group_${index}`}
items={mapData(section.data)}
selectedItem={selectedCalendar?.id}
onPress={onPressRadio}
/>
{/* not show the end spacer if the element is the last */}
{index < calendarsByAccount.value.length - 1 && <VSpacer size={24} />}
</React.Fragment>
))
);
};

Expand Down
5 changes: 4 additions & 1 deletion ts/components/LoadingSpinnerOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ const LoadingSpinnerOverlay = ({

return (
<Overlay
backgroundColor={hexToRgba(IOColors.white, loadingOpacity)}
backgroundColor={hexToRgba(
IOColors[theme["appBackground-primary"]],
loadingOpacity
)}
foreground={
isLoading && (
<BoxedRefreshIndicator
Expand Down
11 changes: 5 additions & 6 deletions ts/components/TosWebviewComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FooterWithButtons, IOStyles } from "@pagopa/io-app-design-system";
import { FooterActions, IOStyles } from "@pagopa/io-app-design-system";
import * as E from "fp-ts/lib/Either";
import { pipe } from "fp-ts/lib/function";
import React, { FunctionComponent, memo, useCallback, useState } from "react";
Expand Down Expand Up @@ -82,11 +82,10 @@ const TosWebviewComponent: FunctionComponent<Props> = ({
/>
</View>
{shouldRenderFooter && onAcceptTos && (
<FooterWithButtons
type="SingleButton"
primary={{
type: "Solid",
buttonProps: {
<FooterActions
actions={{
type: "SingleButton",
primary: {
label: I18n.t("onboarding.tos.accept"),
onPress: onAcceptTos,
testID: "AcceptToSButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ exports[`LoadingSpinnerOverlay Should match all-properties and loading snapshot
>
<View
style={
[
{
"alignItems": "center",
"flex": 1,
"height": 100,
"justifyContent": "center",
},
undefined,
]
{
"alignItems": "center",
"flex": 1,
"height": 100,
"justifyContent": "center",
}
}
>
<View
Expand Down Expand Up @@ -450,15 +447,12 @@ exports[`LoadingSpinnerOverlay Should match base loading snapshot 1`] = `
>
<View
style={
[
{
"alignItems": "center",
"flex": 1,
"height": 100,
"justifyContent": "center",
},
undefined,
]
{
"alignItems": "center",
"flex": 1,
"height": 100,
"justifyContent": "center",
}
}
>
<View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ exports[`WebviewComponent tests snapshot for component 1`] = `
>
<View
style={
[
{
"alignItems": "center",
"flex": 1,
"height": 100,
"justifyContent": "center",
},
undefined,
]
{
"alignItems": "center",
"flex": 1,
"height": 100,
"justifyContent": "center",
}
}
>
<View
Expand Down
34 changes: 16 additions & 18 deletions ts/components/screens/LoadingScreenContent.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
* An ingress screen to choose the real first screen the user must navigate to.
*/
import * as React from "react";
import { View, StyleSheet, Platform, AccessibilityInfo } from "react-native";
import {
ContentWrapper,
H3,
IOStyles,
IOColors,
useIOTheme,
VSpacer
VStack
} from "@pagopa/io-app-design-system";
import * as React from "react";
import { AccessibilityInfo, Platform, StyleSheet, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { LoadingIndicator } from "../../components/ui/LoadingIndicator";
import { WithTestID } from "../../types/WithTestID";
Expand All @@ -20,15 +20,8 @@ import {

const styles = StyleSheet.create({
container: {
...IOStyles.bgWhite,
...IOStyles.centerJustified,
...IOStyles.flex
},
contentTitle: {
textAlign: "center"
},
content: {
alignItems: "center"
flex: 1,
justifyContent: "center"
}
});

Expand Down Expand Up @@ -65,12 +58,18 @@ export const LoadingScreenContent = (props: LoadingScreenContentProps) => {

return (
<SafeAreaView
style={styles.container}
style={[
styles.container,
{ backgroundColor: IOColors[theme["appBackground-primary"]] }
]}
edges={headerVisible ? ["bottom"] : undefined}
testID={testID}
>
<ContentWrapper>
<View style={styles.content}>
<VStack
space={SPACE_BETWEEN_SPINNER_AND_TEXT}
style={{ alignItems: "center" }}
>
<View
accessible={false}
accessibilityElementsHidden={true}
Expand All @@ -82,15 +81,14 @@ export const LoadingScreenContent = (props: LoadingScreenContentProps) => {
<LoadingIndicator />
)}
</View>
<VSpacer size={SPACE_BETWEEN_SPINNER_AND_TEXT} />
<H3
style={{ textAlign: "center" }}
color={theme["textHeading-secondary"]}
style={styles.contentTitle}
accessibilityLabel={contentTitle}
>
{contentTitle}
</H3>
</View>
</VStack>
</ContentWrapper>
{children}
</SafeAreaView>
Expand Down
Loading

0 comments on commit 668d561

Please sign in to comment.