Skip to content

Commit

Permalink
feat: packageable Coral Cloud Experience Cloud site (#54)
Browse files Browse the repository at this point in the history
* feat: made setup idempotent

* fix: remove indentation from long text content

* doc: formatting nit

* fix: switch Experience__c.Description__c to text to avoid formatting issue

* feat: add member number to contact card

* feat: organize reservation insight fields

* fix: slds overflow bug

* feat: moved site to a dedicated package dir

* feat: removed no longer needed message channel

* ci: revert packaging specific metadata changes
  • Loading branch information
pozil authored Dec 12, 2024
1 parent 5c31b3d commit 3410896
Show file tree
Hide file tree
Showing 190 changed files with 1,819 additions and 3,312 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/packaging-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,6 @@ jobs:
- name: 'Remove auth file'
run: rm -f ./DEVHUB_SFDX_URL.txt

# Modify local metadata for packaging
- name: 'Modify local metadata for packaging'
run: |
cp -rpv cc-service-app/main/default/classes/CommunitiesLandingController* cc-base-app/main/default/classes/
cp -rpv cc-service-app/main/default/corsWhitelistOrigins cc-base-app/main/default/
cp -rpv cc-service-app/main/default/cspTrustedSites cc-base-app/main/default/
mkdir cc-base-app/main/default/digitalExperienceConfigs/
cp -rpv cc-service-app/main/default/digitalExperienceConfigs/coral* cc-base-app/main/default/digitalExperienceConfigs/
mkdir -p cc-base-app/main/default/digitalExperiences/site/
cp -rpv cc-service-app/main/default/digitalExperiences/site/coral* cc-base-app/main/default/digitalExperiences/site/
cp -rpv cc-service-app/main/default/flows/* cc-base-app/main/default/flows/
mkdir -p cc-base-app/main/default/navigationMenus
cp -rpv cc-service-app/main/default/navigationMenus/*coral* cc-base-app/main/default/navigationMenus/
mkdir -p cc-base-app/main/default/networks
cp -rpv cc-service-app/main/default/networks/coral* cc-base-app/main/default/networks/
mkdir -p cc-base-app/main/default/pages
cp -rpv cc-service-app/main/default/pages/CommunitiesLanding* cc-base-app/main/default/pages/
mkdir -p cc-base-app/main/default/sites
cp -rpv cc-service-app/main/default/sites/coral* cc-base-app/main/default/sites/
mkdir -p cc-base-app/main/default/staticresources
cp -rpv cc-service-app/main/default/staticresources/*coral* cc-base-app/main/default/staticresources/
rm -f cc-base-app/main/default/flows/Route_to_Agent.flow-meta.xml
jq 'walk(if type == "object" and .definition == "experience_messaging:embeddedMessaging" then empty else . end)' cc-service-app/main/default/digitalExperiences/site/coral_cloud1/sfdc_cms__view/home/content.json > cc-base-app/main/default/digitalExperiences/site/coral_cloud1/sfdc_cms__view/home/content.json
sed '/<actionCalls>/,/<\/actionCalls>/d' cc-base-app/main/default/flows/PersonalizedSchedule.flow-meta.xml > cc-base-app/main/default/flows/PersonalizedSchedule_Temp.flow-meta.xml && mv cc-base-app/main/default/flows/PersonalizedSchedule_Temp.flow-meta.xml cc-base-app/main/default/flows/PersonalizedSchedule.flow-meta.xml
# Create package version and extract its id
- name: 'Create package version'
id: createPackageVersion
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,6 @@ jobs:
- name: 'Remove auth file'
run: rm -f ./DEVHUB_SFDX_URL.txt

# Modify local metadata for packaging
- name: 'Modify local metadata for packaging'
run: |
cp -rpv cc-service-app/main/default/classes/CommunitiesLandingController* cc-base-app/main/default/classes/
cp -rpv cc-service-app/main/default/corsWhitelistOrigins cc-base-app/main/default/
cp -rpv cc-service-app/main/default/cspTrustedSites cc-base-app/main/default/
mkdir cc-base-app/main/default/digitalExperienceConfigs/
cp -rpv cc-service-app/main/default/digitalExperienceConfigs/coral* cc-base-app/main/default/digitalExperienceConfigs/
mkdir -p cc-base-app/main/default/digitalExperiences/site/
cp -rpv cc-service-app/main/default/digitalExperiences/site/coral* cc-base-app/main/default/digitalExperiences/site/
cp -rpv cc-service-app/main/default/flows/* cc-base-app/main/default/flows/
mkdir -p cc-base-app/main/default/navigationMenus
cp -rpv cc-service-app/main/default/navigationMenus/*coral* cc-base-app/main/default/navigationMenus/
mkdir -p cc-base-app/main/default/networks
cp -rpv cc-service-app/main/default/networks/coral* cc-base-app/main/default/networks/
mkdir -p cc-base-app/main/default/pages
cp -rpv cc-service-app/main/default/pages/CommunitiesLanding* cc-base-app/main/default/pages/
mkdir -p cc-base-app/main/default/sites
cp -rpv cc-service-app/main/default/sites/coral* cc-base-app/main/default/sites/
mkdir -p cc-base-app/main/default/staticresources
cp -rpv cc-service-app/main/default/staticresources/*coral* cc-base-app/main/default/staticresources/
rm -f cc-base-app/main/default/flows/Route_to_Agent.flow-meta.xml
jq 'walk(if type == "object" and .definition == "experience_messaging:embeddedMessaging" then empty else . end)' cc-service-app/main/default/digitalExperiences/site/coral_cloud1/sfdc_cms__view/home/content.json > cc-base-app/main/default/digitalExperiences/site/coral_cloud1/sfdc_cms__view/home/content.json
sed '/<actionCalls>/,/<\/actionCalls>/d' cc-base-app/main/default/flows/PersonalizedSchedule.flow-meta.xml > cc-base-app/main/default/flows/PersonalizedSchedule_Temp.flow-meta.xml && mv cc-base-app/main/default/flows/PersonalizedSchedule_Temp.flow-meta.xml cc-base-app/main/default/flows/PersonalizedSchedule.flow-meta.xml
# Bump package minor version
- name: 'Bump package minor version'
run: node bin/bump-package-minor-version.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
<identifier>RecordNameField</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Membership_Number__c</fieldItem>
<identifier>RecordMembership_Number_cField</identifier>
</fieldInstance>
</itemInstances>
<name>Facet-01cf81ef-e902-4dfc-bb01-169bf818a5b5</name>
<type>Facet</type>
</flexiPageRegions>
Expand Down Expand Up @@ -203,17 +213,6 @@
<identifier>RecordInterest3_cField</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Lifetime_Experience_Bookings__c</fieldItem>
<identifier
>RecordLifetime_Experience_Bookings_cField</identifier>
</fieldInstance>
</itemInstances>
<name>Facet-5f11d6c7-a456-4caf-a887-d6a8012262cd</name>
<type>Facet</type>
</flexiPageRegions>
Expand Down Expand Up @@ -252,6 +251,17 @@
<identifier>RecordLifetime_Value_cField</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldInstanceProperties>
<name>uiBehavior</name>
<value>none</value>
</fieldInstanceProperties>
<fieldItem>Record.Lifetime_Experience_Bookings__c</fieldItem>
<identifier
>RecordLifetime_Experience_Bookings_cField</identifier>
</fieldInstance>
</itemInstances>
<name>Facet-aa122401-5069-4151-82bf-ff573ac142af</name>
<type>Facet</type>
</flexiPageRegions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ <h2>{mailingCity}, {mailingState}</h2>
class="slds-grid slds-border_bottom slds-p-vertical_medium"
>
<div class="slds-col slds-size_1-of-2">
<lightning-output-field field-name="External_Id__c">
<lightning-output-field
field-name="Membership_Number__c"
>
</lightning-output-field>
<lightning-output-field field-name="MobilePhone">
</lightning-output-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
label {
font-weight: bold !important;
}

/* Fix SLDS bug that causes card overflow */
.slds-form__item {
min-width: unset;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { LightningElement, api, wire } from 'lwc';
import LightningAlert from 'lightning/alert';
import { NavigationMixin } from 'lightning/navigation';
import { subscribe, MessageContext } from 'lightning/messageService';
import EXPERIENCE_SELECTED_MESSAGE from '@salesforce/messageChannel/ExperienceSelected__c';
import getExperienceSessionsForDate from '@salesforce/apex/ExperienceController.getExperienceSessionsForDate';
import isCommunity from '@salesforce/apex/ContextService.isCommunity';

Expand All @@ -24,17 +22,6 @@ export default class ExperienceSchedule extends NavigationMixin(
date = new Date();
isCommunity;

connectedCallback() {
this.experienceSelectionSubscription = subscribe(
this.messageContext,
EXPERIENCE_SELECTED_MESSAGE,
(message) => this.handleExperienceSelected(message.experienceId)
);
}

@wire(MessageContext) messageContext;
experienceSelectionSubscription;

@wire(isCommunity)
wiredCommunityInfo({ error, data }) {
if (error) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<label>Description</label>
<length>32768</length>
<trackTrending>false</trackTrending>
<type>Html</type>
<type>LongTextArea</type>
<visibleLines>25</visibleLines>
</CustomField>
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<editable>true</editable>
<field>Contact.Languages__c</field>
<readable>true</readable>
</fieldPermissions>
Expand All @@ -264,7 +264,7 @@
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<editable>true</editable>
<field>Contact.Level__c</field>
<readable>true</readable>
</fieldPermissions>
Expand Down Expand Up @@ -294,7 +294,7 @@
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<editable>true</editable>
<field>Contact.Membership_Number__c</field>
<readable>true</readable>
</fieldPermissions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenAiPlugin xmlns="http://soap.sforce.com/2006/04/metadata"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<description>Engages and interacts with the user about any request related to the resort. This
could be tasks such as identify and summarize records, answer queries, aggregate data, find
and query objects, update records, or drafting and refining emails.</description>
<description>Engages and interacts with the user about any request related to the resort. This could be tasks such as identify and summarize records, answer queries, aggregate data, find and query objects, update records, or drafting and refining emails.</description>
<developerName>Customer_Service_Assistant</developerName>
<genAiFunctions>
<functionName>Check_Weather</functionName>
Expand Down Expand Up @@ -35,6 +33,5 @@
<language>en_US</language>
<masterLabel>Customer Service Assistant</masterLabel>
<pluginType>Topic</pluginType>
<scope>Your role is to assist a Customer Service Representative in supporting guests with
inquiries about reservations and experiences available at the hotel.</scope>
<scope>Your role is to assist a Customer Service Representative in supporting guests with inquiries about reservations and experiences available at the hotel.</scope>
</GenAiPlugin>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3410896

Please sign in to comment.