-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: [IOPAE-1067] Add skeleton in
ServiceDetailsScreen
(#5678)
This pr depends on #5677 ## Short description This PR adds the skeleton for the loading state in `ServiceDetailsScreen`. <details open><summary>Details</summary> <p> | service details | | - | | <video src="https://github.com/pagopa/io-app/assets/29163287/befbec7c-57cb-42c7-9067-de424e8d49e7" width="300"/> | </p> </details> ## List of changes proposed in this pull request - updated ServiceDetailsScreen in order to display the skeleton ## How to test Using `io-dev-api-server`, navigate to the services tab and tap a service. Check that the screen is displayed correctly.
- Loading branch information
Showing
5 changed files
with
178 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,44 @@ | ||
import React from "react"; | ||
import { createStackNavigator } from "@react-navigation/stack"; | ||
import { myPortalEnabled } from "../../../config"; | ||
import LegacyServiceDetailsScreen from "../../../screens/services/LegacyServiceDetailsScreen"; | ||
import ServicesWebviewScreen from "../../../screens/services/ServicesWebviewScreen"; | ||
import { useIOSelector } from "../../../store/hooks"; | ||
import { isDesignSystemEnabledSelector } from "../../../store/reducers/persistedPreferences"; | ||
import { isGestureEnabled } from "../../../utils/navigation"; | ||
import { isNewServicesEnabled, myPortalEnabled } from "../../../config"; | ||
import { ServiceDetailsScreen } from "../screens/ServiceDetailsScreen"; | ||
import ServicesWebviewScreen from "../../../screens/services/ServicesWebviewScreen"; | ||
import LegacyServiceDetailsScreen from "../../../screens/services/LegacyServiceDetailsScreen"; | ||
import { ServicesParamsList } from "./params"; | ||
import { SERVICES_ROUTES } from "./routes"; | ||
|
||
const Stack = createStackNavigator<ServicesParamsList>(); | ||
|
||
const ServicesNavigator = () => ( | ||
<Stack.Navigator | ||
initialRouteName={SERVICES_ROUTES.SERVICE_DETAIL} | ||
screenOptions={{ gestureEnabled: isGestureEnabled, headerShown: false }} | ||
> | ||
<Stack.Screen | ||
name={SERVICES_ROUTES.SERVICE_DETAIL} | ||
component={ | ||
isNewServicesEnabled ? ServiceDetailsScreen : LegacyServiceDetailsScreen | ||
} | ||
options={{ | ||
headerShown: isNewServicesEnabled | ||
}} | ||
/> | ||
{myPortalEnabled && ( | ||
const ServicesNavigator = () => { | ||
const isDesignSystemEnabled = useIOSelector(isDesignSystemEnabledSelector); | ||
|
||
return ( | ||
<Stack.Navigator | ||
initialRouteName={SERVICES_ROUTES.SERVICE_DETAIL} | ||
screenOptions={{ gestureEnabled: isGestureEnabled, headerShown: false }} | ||
> | ||
<Stack.Screen | ||
name={SERVICES_ROUTES.SERVICE_WEBVIEW} | ||
component={ServicesWebviewScreen} | ||
name={SERVICES_ROUTES.SERVICE_DETAIL} | ||
component={ | ||
isDesignSystemEnabled | ||
? ServiceDetailsScreen | ||
: LegacyServiceDetailsScreen | ||
} | ||
options={{ | ||
headerShown: isDesignSystemEnabled | ||
}} | ||
/> | ||
)} | ||
</Stack.Navigator> | ||
); | ||
{myPortalEnabled && ( | ||
<Stack.Screen | ||
name={SERVICES_ROUTES.SERVICE_WEBVIEW} | ||
component={ServicesWebviewScreen} | ||
/> | ||
)} | ||
</Stack.Navigator> | ||
); | ||
}; | ||
|
||
export default ServicesNavigator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters