Skip to content

Commit

Permalink
Merge branch 'main' into feature/multi-match
Browse files Browse the repository at this point in the history
  • Loading branch information
tschug committed Jan 8, 2024
2 parents 46b89e8 + 02c80a0 commit 630d1a7
Show file tree
Hide file tree
Showing 218 changed files with 11,145 additions and 225 deletions.
1 change: 0 additions & 1 deletion .forceignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ package.xml
**/Account/**
**/Contact/**

**/old-versions/**
**/unpackaged/**
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees:
---

**Have you shared this feature idea request in the Trailblazer Community?**
Please first share your thought in the Summit Events App Trailblazer Community for additional support on your idea as well as some initial requirement gathering.
Please first share your thought in the Salesforce Indicators Trailblazer Community for additional support on your idea as well as some initial requirement gathering.

If you have shared, please provide a link to your post.

Expand Down
16 changes: 1 addition & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,4 @@ $RECYCLE.BIN/
.settings

# VS Code project settings
.vscode/
force-app/main/default/appMenus/AppSwitcher.appMenu-meta.xml
force-app/main/default/applications/Account.app-meta.xml
force-app/main/default/flexipages/Account_Record_Page.flexipage-meta.xml
force-app/main/default/flexipages/Account_UtilityBar.flexipage-meta.xml
force-app/main/default/flexipages/Base_Account_Page.flexipage-meta.xml
force-app/main/default/profiles/Admin.profile-meta.xml
/force-app/main/default/flexipages/Account_Record_Page.flexipage-meta.xml
/force-app/main/default/flexipages/Account_Record_Page1.flexipage-meta.xml
/force-app/main/default/layouts/Account-Account Layout.layout-meta.xml
/force-app/main/default/objects/Account/fields/Checkbox__c.field-meta.xml
/force-app/main/default/profiles

/old-versions/*
/unpackaged/*
.vscode/
83 changes: 47 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,51 @@
# Salesforce Indicators
![Salesforce Indicators Logo](https://github.com/SFDO-Community/Salesforce-Indicators/assets/2966583/e1857d0a-c725-4e17-9820-c8c3d7b920ab)

# Status of Code
We are in a bit of a transition phase at the moment and are in active development, almost ready for release.
You can still use the older Indicators List Component and it will work fine, if you already have it installed.
If you would like to test where we are at, install the managed package from the [Installation](../../wiki/Installing-Salesforce-Indicators) page and follow the steps to add the `Indicator Bundle` component to the page layout.
NOTE: Only test in a Scratch org, Developer org, or Sandbox at the moment whilst we are in active development.
We can't wait to get something stable that you can start to use in your production orgs.
With Salesforce Indicators, you can visually highlight important data at a glance, making it easy to focus on what matters most. This Custom Metadata driven Lightning Web Component is all about making key details pop, and giving you lightning-quick insights at a glance on your Salesforce records.


Features:
* Visualize your data - Display key details in a visually engaging and clutter-free manner, allowing users to quickly understand important information on the record, summarize related records, or highlight exceptions.
* Make your data come alive - Add a mix of Salesforce and custom colors to match your branding to create visually appealing indicators for your Lightning pages giving your users a more engaging experience.
* Customize your Indicators - Easily set up and customize Salesforce Indicators using deployable Custom Metadata Type records. No complex formulas or coding required. Group Indicators into bundles for different use-cases and users.

Salesforce Indicators works for any Salesforce org already using Lightning Experience, and it works exceptionally well for Nonprofit orgs on NPSP or Nonprofit Cloud.
Salesforce Indicators is part of the [Salesforce Open Source Commons](https://help.salesforce.com/s/articleView?id=sfdo.Innovate_with_OSC.htm&type=5) program.

## Latest Release
* [Install Salesforce Indicators](https://install.salesforce.org/products/indicators)
* [Release Notes](https://github.com/SFDO-Community/Salesforce-Indicators/wiki/Release-Notes)

## Project Documentation
* Documentation can be found in the repository [Wiki](https://github.com/SFDO-Community/Salesforce-Indicators/wiki).
* Check out the [Cookbook](https://github.com/SFDO-Community/Salesforce-Indicators/wiki/Cookbook) to help you build Indicators that work for your org.

## Ask Questions and Get Help
* Salesforce Indicators is a community built and maintained Salesforce package, please help support this project and share your experiences in the [Trailblazer Community Group](https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000HEDASA4?tab=discussion). Ask any questions about the Salesforce Indicators project, or the Open Source Commons.
* If you have any enhancements or issue you can [Log an Issue](https://github.com/SFDO-Community/Salesforce-Indicators/issues).

# Project Overview
## Vision & Goals
* Build a customisable Indicators Component to help users see the value, status, and key details about a record at a glance and in nice colours and graphics
* Show different apps you can use to achieve similar results, but you will want to use the Indicators Component
* Future Components
* An Exceptions Component to quickly show your users issues with their data, and show custom messages for each field
* A custom highlights panel

## Project Vertical
This Component is a must-have for any Nonprofit org, but it works in any org and any vertical.

## Trailblazer Group or Slack Channel Link (access required)\
https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000HEDASA4 - this is the place to ask any questions about the components or about the Salesforce Indicators project, or the Open Source Commons
https://salesforce-external.slack.com/archives/C0476TZEAH3 - this is our Slack Community that anyone who has participated in a Sprint with us has access to. This is where we plan the upcoming improvements to the components.

## How to Contribute:
- [Install the Component](../../wiki/Installing-Salesforce-Indicators)
- [Try it out](../../wiki/Indicator-Bundle)
- Check out the the [Cookbook](../../wiki/Cookbook) and add your own Recipes
- Add reviews of any [similar or competitor components](../../wiki/Other-Components)
- [Volunteer](../../wiki/How-to-Volunteer) to enhance the code

# Project Resources and Documentation
Documentation can be found in the repository [wiki](../../wiki)

# Project Acomplishments
* Working on the rebuild to support Custom Metadata Types
* Enhancements to the Indicator Component
* The Indicator Key compoennt and Setup components to help build and understand the Indicators easily
* New companion Components in progress
* Working on the packaging and release
* Enhance the current Indicators Bundle Component to improve the experience for Admins and Users.
* Complete the documentation with different recipes to help Admins get up and running quickly.
* Showcase and review different apps you can use to achieve similar results, and show how you will probably want to use Salesforce Indicators anyway.
* Build our planned Components - these components are built on the same Custom Metadata framework and just show the data in different ways:
* A Grid Component to quickly show your users excptions or a checklist of fields on the record. Optionally show field values, a custom message for each field, and if the field has an exception.
* A Panel Component to provide more value and features than the standard record highlights panel horizontally, or a panel that display the key data vertically.

# How to Contribute:
- [Install Salesforce Indicators](https://install.salesforce.org/products/indicators)
- [Set up the Indicator Bundle](https://github.com/SFDO-Community/Salesforce-Indicators/wiki/Indicator-Bundle)
- Ask any questions on our [Trailblazer Community Group](https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000HEDASA4?tab=discussion)
- Add your own Recipes to the [Cookbook](https://github.com/SFDO-Community/Salesforce-Indicators/wiki/Cookbook) and
- Add reviews of any [similar or competitor components](https://github.com/SFDO-Community/Salesforce-Indicators/wiki/Other-Apps-and-Components-to-Enhance-Your-Org)
- [Volunteer](https://github.com/SFDO-Community/Salesforce-Indicators/wiki/How-to-Volunteer) to enhance the code
- [Log an Issue](https://github.com/SFDO-Community/Salesforce-Indicators/issues)
- Join us at an upcoming [Salesforce Commons Community Sprint](https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000GwVK?tab=discussion)

## Project Acomplishments
* Rebuilt the component to support Custom Metadata Types
* Enhancements to the Indicator Bundle Component
* The Indicator Key compnent and Setup components to help build and understand the Indicators easily
* New companion components (Grid and Panel) in progress
* Packaging and release setup
* Marketing and release of Salesforce Indicators
117 changes: 0 additions & 117 deletions checkmarx-reports/report_phxcmarxwp001_63146.html

This file was deleted.

58 changes: 58 additions & 0 deletions cumulusci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,71 @@ tasks:
run_tests:
options:
required_org_code_coverage_percent: 75

deploy_sample_indicators:
description: Deploys - Sample Indicators
group: Salesforce Metadata
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged/config/sample_AccountContact

deploy_sample_indicators_layouts:
description: Deploys - Sample Indicators Layouts
group: Salesforce Metadata
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged/config/sample_AccountContact_FlexiPages

deploy_training_indicators:
description: Deploys - Example Indicators used for Training
group: Salesforce Metadata
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged/config/training_Indicators

generate_leads:
description: Snowfakery - Generate Leads
class_path: cumulusci.tasks.bulkdata.snowfakery.Snowfakery
options:
recipe: recipes/recipe.Leads.yml
run_until_records_loaded: Lead:100

generate_accounts_and_contacts:
description: Snowfakery - Generate Accounts and Contacts
class_path: cumulusci.tasks.bulkdata.snowfakery.Snowfakery
options:
recipe: recipes/recipe.AccountsWithContacts.yml
run_until_records_loaded: Account:100

flows:
sample_inds:
steps:
1:
task: deploy_sample_indicators
2:
task: deploy_sample_indicators_layouts
customer_org:
steps:
1:
task: install_managed
options:
security_type: NONE
2:
flow: sample_inds
ui_options:
is_required: False
is_recommended: False
3:
task: deploy_training_indicators
ui_options:
is_required: False
is_recommended: False
config_dev:
steps:
3:
task: generate_accounts_and_contacts
4:
flow: sample_inds

plans:
install:
Expand Down
16 changes: 15 additions & 1 deletion force-app/main/default/classes/Cmdt.cls
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@ public with sharing class Cmdt {
public static void initializeConfiguration() {

// Gather all active Bundles and put them into a Map (key: DeveloperName; Bundle)
for( Indicator_Bundle__mdt bundle : Indicator_Bundle__mdt.getAll().values() ) {
for( Indicator_Bundle__mdt bundle : [
SELECT Id, DeveloperName, MasterLabel, Label,
Active__c,
Card_Icon__c,
Card_Icon_Background__c,
Card_Icon_Foreground__c,
Card_Text__c,
Card_Title__c,
Description__c,
sObject__c,
sObject__r.QualifiedApiName,
sObject__r.Label
FROM Indicator_Bundle__mdt
] ) {
setBundle(bundle);
}

Expand Down Expand Up @@ -59,6 +72,7 @@ public with sharing class Cmdt {
for(Indicator_Item_Extension__mdt itemExtension : [
SELECT Id, Active__c,
Contains_Text__c,
Text_Operator__c,
Hover_Text__c,
Icon_Value__c,
Image__c,
Expand Down
18 changes: 10 additions & 8 deletions force-app/main/default/classes/IndicatorController.cls
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public with sharing class IndicatorController {
}

public class IndicatorBundle {
@AuraEnabled
public String ObjectName {get; set;}
@AuraEnabled
public Boolean IsActive {get; set;}
@AuraEnabled
Expand All @@ -32,10 +34,6 @@ public with sharing class IndicatorController {
@AuraEnabled
public String BundleId {get; set;}
@AuraEnabled
public String BackgroundColor {get; set;}
@AuraEnabled
public String ForegroundColor {get; set;}
@AuraEnabled
public List<IndicatorItem> Items {get; set;}
}

Expand Down Expand Up @@ -94,6 +92,8 @@ public with sharing class IndicatorController {
@AuraEnabled
public String ContainsText {get; set;}
@AuraEnabled
public String TextOperator {get; set;}
@AuraEnabled
public Decimal Maximum {get; set;}
@AuraEnabled
public Decimal Minimum {get; set;}
Expand Down Expand Up @@ -164,8 +164,6 @@ public with sharing class IndicatorController {
wrapper.CardTitle = 'Unbundled Items';
wrapper.BundleDescription = null;
wrapper.BundleId = null;
wrapper.BackgroundColor = null;
wrapper.ForegroundColor = null;
wrapper.Items = new List<IndicatorItem>();

for(Indicator_Item__mdt indicatorItem : Cmdt.getAllOrphanItems()){
Expand Down Expand Up @@ -219,6 +217,7 @@ public with sharing class IndicatorController {

extension.IsActive = itemExtension.Active__c;
extension.ContainsText = itemExtension.Contains_Text__c;
extension.TextOperator = String.isNotBlank(itemExtension.Text_Operator__c) ? itemExtension.Text_Operator__c : 'Contains';
extension.Maximum = itemExtension.Maximum__c;
extension.Minimum = itemExtension.Minimum__c;
extension.ExtensionHoverText = itemExtension.Hover_Text__c;
Expand Down Expand Up @@ -264,8 +263,10 @@ public with sharing class IndicatorController {
wrapper.CardTitle = bundle.Card_Title__c;
wrapper.BundleDescription = bundle.Description__c;
wrapper.BundleId = bundle.Id;
wrapper.BackgroundColor = bundle.Card_Icon_Background__c;
wrapper.ForegroundColor = bundle.Card_Icon_Foreground__c;
wrapper.ObjectName = bundle.sObject__r.Label;
if(bundle.sObject__r.Label != bundle.sObject__r.QualifiedApiName){
wrapper.ObjectName += ' (' + bundle.sObject__r.QualifiedApiName + ')';
}
wrapper.Items = new List<IndicatorItem>();

if(!bundleItems.isEmpty()){ // TODO: Commenting out this check is a great way to test throwing an error in the LWC
Expand Down Expand Up @@ -316,6 +317,7 @@ public with sharing class IndicatorController {

extension.IsActive = itemExtension.Active__c;
extension.ContainsText = itemExtension.Contains_Text__c;
extension.TextOperator = String.isNotBlank(itemExtension.Text_Operator__c) ? itemExtension.Text_Operator__c : 'Contains';
extension.Maximum = itemExtension.Maximum__c;
extension.Minimum = itemExtension.Minimum__c;
extension.ExtensionHoverText = itemExtension.Hover_Text__c;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Card_Icon_Foreground__c</field>
<field>Card_Icon_Background__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Card_Icon_Background__c</field>
<field>Card_Icon_Foreground__c</field>
</layoutItems>
</layoutColumns>
<layoutColumns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<behavior>Edit</behavior>
<field>Maximum__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Text_Operator__c</field>
</layoutItems>
<layoutItems>
<behavior>Edit</behavior>
<field>Contains_Text__c</field>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.cardIcon {
--sds-c-icon-color-foreground: var(--foregroundColor);
--sds-c-icon-color-background: var(--backgroundColor);
--slds-c-icon-color-foreground: var(--foregroundColor);
--slds-c-icon-color-background: var(--backgroundColor);
}
16 changes: 4 additions & 12 deletions force-app/main/default/lwc/indicatorBundle/indicatorBundle.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@
<template lwc:if={showTitle}>
<h3 slot="title">
<lightning-icon
lwc:if={card.icon}
icon-name={card.icon}
size="medium"
size="small"
class={card.iconClass}
>
</lightning-icon>
{card.title}
</h3>
</template>
<template lwc:if={showDescription}>
<p class="slds-var-p-horizontal_medium">{card.body}</p>
<p class="slds-var-p-horizontal_medium slds-var-p-bottom_small">{card.body}</p>
</template>
</template>
<!-- TODO: Do we put this in a Layout which would be responsive to the container, this could allow for empty slots too -->
Expand All @@ -64,23 +65,14 @@ <h3 slot="title">
<template if:true={errorOccurred}>
<template lwc:if={isManageEnabled}>
<lightning-card variant="base" title="Error" icon-name="utility:error">
<lightning-button-icon
variant="bare"
icon-name="utility:info_alt"
alternative-text="Indicator Value Key"
class="slds-var-m-left_xx-small"
title="Indicator Value Key"
slot="actions"
onclick={handleInfoKeyClick}
aria-haspopup="dialog"
></lightning-button-icon>
<p>{errorMessage}</p>
<template if:true={showIllustration}>
<c-illustration
heading = {illustration.heading}
message-body = {illustration.messageBody}
image-name = {illustration.imageName}
image-size = {flexipageRegionWidth}
class="slds-illustration slds-illustration_small"
></c-illustration>
</template>
</lightning-card>
Expand Down
Loading

0 comments on commit 630d1a7

Please sign in to comment.