From 9fdd2b352f0eaeebb06618bed359430bc9ca3741 Mon Sep 17 00:00:00 2001 From: "haifeng.li" Date: Sun, 29 Mar 2026 23:21:42 -0700 Subject: [PATCH] W-21672186: Migrate mobile rental app to data providers and design tokens --- .../appMetadata/content.json | 25 +++-- .../buildMetadata/content.json | 5 +- .../rentalApp/content.json | 3 +- .../calendarScreen/content.json | 5 +- .../homeScreen/content.json | 93 ++++++++++++++----- .../languages/content.json | 3 +- 6 files changed, 93 insertions(+), 41 deletions(-) diff --git a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaAppMetadata/appMetadata/content.json b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaAppMetadata/appMetadata/content.json index 87fab5b..4b99b9f 100644 --- a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaAppMetadata/appMetadata/content.json +++ b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaAppMetadata/appMetadata/content.json @@ -11,13 +11,13 @@ { "id": "home", "label": "Home", - "icon": "house.fill", + "icon": "utility:home", "screenAPIName": "homeScreen" }, { "id": "calendar", "label": "Calendar", - "icon": "calendar", + "icon": "utility:event", "screenAPIName": "calendarScreen" } ], @@ -30,15 +30,26 @@ "accent1": "#7526E3", "accent2": "#7526E3", "accentContainer1": "#7526E3", - "accentContainer2": "#1F1A30", + "accentContainer2": "#342761", + "border2": "#7526E3", "onSurface1": "#181818", "onSurface2": "#444444", "onSurface3": "#747474" }, - "cornerRadius": { - "radiusBorderCircle": 12 + "dimensions": { + "spacing": { + "spacing5": 20 + }, + "sizing": { + "sizing3": 6 + } + }, + "typography": { + "titlesScale5Regular": { + "fontSize": 28, + "lineHeight": 36 + } } } - }, - "urlName": "app-metadata" + } } diff --git a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaBuildMetadata/buildMetadata/content.json b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaBuildMetadata/buildMetadata/content.json index 835446d..86f0450 100644 --- a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaBuildMetadata/buildMetadata/content.json +++ b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaBuildMetadata/buildMetadata/content.json @@ -3,7 +3,6 @@ "title": "Build Metadata", "contentBody": { "BiometricOptIn": false, - "NotificationOptIn": true - }, - "urlName": "build-metadata" + "NotificationOptIn": false + } } diff --git a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaECDefinition/rentalApp/content.json b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaECDefinition/rentalApp/content.json index 8cdeaa0..3cb236c 100644 --- a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaECDefinition/rentalApp/content.json +++ b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaECDefinition/rentalApp/content.json @@ -1,6 +1,5 @@ { "type": "experience__camaECDefinition", "title": "CAMA EC Definition", - "contentBody": {}, - "urlName": "cama-ec-definition" + "contentBody": {} } diff --git a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaScreen/calendarScreen/content.json b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaScreen/calendarScreen/content.json index 3fc962f..0f51492 100644 --- a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaScreen/calendarScreen/content.json +++ b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaScreen/calendarScreen/content.json @@ -1,6 +1,6 @@ { "type": "experience__camaScreen", - "title": "Calendar", + "title": "Calendar Screen", "contentBody": { "view": { "definition": "calendar/root", @@ -21,6 +21,5 @@ "target": "native__calendar", "apiName": "calendarScreen", "id": "calendar-001" - }, - "urlName": "calendar-screen" + } } diff --git a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaScreen/homeScreen/content.json b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaScreen/homeScreen/content.json index 34688b4..4df4502 100644 --- a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaScreen/homeScreen/content.json +++ b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/experience__camaScreen/homeScreen/content.json @@ -43,11 +43,11 @@ "name": "components", "components": [ { - "definition": "ui/text", + "definition": "data/label", "properties": { - "text": "Good evening, Maria", "style": "titlesFontScale4Regular", - "color": "$colors.onSurfaceInverse1" + "color": "$colors.onSurfaceInverse1", + "key": "greeting" }, "regions": {} } @@ -140,14 +140,12 @@ "name": "components", "components": [ { - "definition": "ui/image", + "definition": "data/image", "properties": { - "source": { - "url": "https://picsum.photos/seed/community/220/140" - }, "alternativeText": "Community Park", "width": "220", - "height": "140" + "height": "140", + "key": "newsImage1" }, "regions": {} } @@ -200,14 +198,12 @@ "name": "components", "components": [ { - "definition": "ui/image", + "definition": "data/image", "properties": { - "source": { - "url": "https://picsum.photos/seed/treadmills/220/140" - }, "alternativeText": "New treadmills", "width": "220", - "height": "140" + "height": "140", + "key": "newsImage2" }, "regions": {} } @@ -260,14 +256,12 @@ "name": "components", "components": [ { - "definition": "ui/image", + "definition": "data/image", "properties": { - "source": { - "url": "https://picsum.photos/seed/pool/220/140" - }, "alternativeText": "Pool hours extended", "width": "220", - "height": "140" + "height": "140", + "key": "newsImage3" }, "regions": {} } @@ -324,11 +318,11 @@ "name": "components", "components": [ { - "definition": "ui/progressRing", + "definition": "data/progressRing", "properties": { - "value": 85, "size": "large", - "showProgressText": true + "showProgressText": true, + "key": "leaseProgress" }, "regions": {} }, @@ -736,7 +730,58 @@ }, "target": "native__home", "apiName": "homeScreen", - "id": "home-001" - }, - "urlName": "home-screen" + "id": "home-001", + "dataProviders": [ + { + "$id": "greeting", + "type": "apex", + "properties": { + "className": "PortalService", + "methodName": "getGreeting", + "namespace": "cama_dev", + "params": {} + } + }, + { + "$id": "leaseProgress", + "type": "apex", + "properties": { + "className": "PortalService", + "methodName": "getLeaseProgress", + "namespace": "cama_dev", + "params": {} + } + }, + { + "$id": "newsImage1", + "type": "apex", + "properties": { + "className": "PortalService", + "methodName": "getNewsImage1", + "namespace": "cama_dev", + "params": {} + } + }, + { + "$id": "newsImage2", + "type": "apex", + "properties": { + "className": "PortalService", + "methodName": "getNewsImage2", + "namespace": "cama_dev", + "params": {} + } + }, + { + "$id": "newsImage3", + "type": "apex", + "properties": { + "className": "PortalService", + "methodName": "getNewsImage3", + "namespace": "cama_dev", + "params": {} + } + } + ] + } } diff --git a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/sfdc_cms__languageSettings/languages/content.json b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/sfdc_cms__languageSettings/languages/content.json index 98aef00..2801a04 100644 --- a/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/sfdc_cms__languageSettings/languages/content.json +++ b/samples/native-mobile-rental-tenant-app/force-app/main/default/digitalExperiences/experiencecontainer/rentalApp/sfdc_cms__languageSettings/languages/content.json @@ -11,6 +11,5 @@ } ], "defaultLocale": "en_US" - }, - "urlName": "languagecontent" + } }