Skip to content

Commit

Permalink
Bugfix: Improved conditional visibility for 'HTTP Response' page sect…
Browse files Browse the repository at this point in the history
…ion (#617)

* Resolved #616 by updating visibility rules on LogEntryRecordPage to show the HTTP Response section if the response status, body, or header keys are not null. Previously, only status was checked, which is null when using System.Continuation

* Upgraded most of the devDependencies in package.json, and hopefully fixed package generation for the managed package by including an empty copy of Admin.profile-meta.xml ಥ_ಥ. Also updated both sfdx-project.json files to use the new flag 'scopeProfiles'

* Added (re-added) new-ish Analytics standard tab to the LoggerConsole app

* Fixed some test failures in ComponentLogger_Tests that occurred when running in a namespaced context
  • Loading branch information
jongpie authored Jan 29, 2024
1 parent d452edd commit 21e02ac
Show file tree
Hide file tree
Showing 14 changed files with 7,820 additions and 13,480 deletions.
1 change: 0 additions & 1 deletion .forceignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
nebula-logger/managed-package/sfdx-project.json
nebula-logger/managed-package/**/*.animationRule-meta.xml
nebula-logger/managed-package/**/*.testSuite-meta.xml
/**/Admin.profile-meta.xml

# Directory/package-specific README files
**/README.md
Expand Down
82 changes: 33 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,48 +264,39 @@ jobs:
runs-on: ubuntu-latest
environment: 'Demo Org'
steps:
# - name: 'Checkout source code'
# uses: actions/checkout@v3
# with:
# ref: ${{ github.event.pull_request.head.ref }}

# - name: 'Restore node_modules cache'
# id: cache-npm
# uses: actions/cache@v3
# with:
# path: node_modules
# key: npm-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# npm-${{ env.cache-name }}-
# npm-

# - name: 'Install npm dependencies'
# if: steps.cache-npm.outputs.cache-hit != 'true'
# run: npm ci

# - name: 'Authorize Dev Hub'
# shell: bash
# run: |
# npx sf version
# echo "${{ env.DEV_HUB_JWT_SERVER_KEY }}" > ./jwt-server.key
# npx sf org login jwt --instance-url ${{ env.DEV_HUB_AUTH_URL }} --client-id ${{ env.DEV_HUB_CONSUMER_KEY }} --username ${{ env.DEV_HUB_BOT_USERNAME }} --jwt-key-file ./jwt-server.key --set-default-dev-hub
# env:
# DEV_HUB_AUTH_URL: ${{ secrets.DEV_HUB_AUTH_URL }}
# DEV_HUB_BOT_USERNAME: ${{ secrets.DEV_HUB_BOT_USERNAME }}
# DEV_HUB_CONSUMER_KEY: ${{ secrets.DEV_HUB_CONSUMER_KEY }}
# DEV_HUB_JWT_SERVER_KEY: ${{ secrets.DEV_HUB_JWT_SERVER_KEY }}

# # TODO remove this after the plugin @salesforce/packaging has been upgraded
# # to a new version that only looks at package directories
# - name: 'Temporarily delete problematic metadata'
# run: |
# rm -rf ./config/experience-cloud/

# - name: 'Create Beta Managed Package Version'
# run: npm run package:version:create:managed

- name: 'Placeholder because the sf cli and its plugins are trash'
run: echo hello
- name: 'Checkout source code'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: 'Restore node_modules cache'
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-${{ env.cache-name }}-
npm-
- name: 'Install npm dependencies'
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci

- name: 'Authorize Dev Hub'
shell: bash
run: |
npx sf version
echo "${{ env.DEV_HUB_JWT_SERVER_KEY }}" > ./jwt-server.key
npx sf org login jwt --instance-url ${{ env.DEV_HUB_AUTH_URL }} --client-id ${{ env.DEV_HUB_CONSUMER_KEY }} --username ${{ env.DEV_HUB_BOT_USERNAME }} --jwt-key-file ./jwt-server.key --set-default-dev-hub
env:
DEV_HUB_AUTH_URL: ${{ secrets.DEV_HUB_AUTH_URL }}
DEV_HUB_BOT_USERNAME: ${{ secrets.DEV_HUB_BOT_USERNAME }}
DEV_HUB_CONSUMER_KEY: ${{ secrets.DEV_HUB_CONSUMER_KEY }}
DEV_HUB_JWT_SERVER_KEY: ${{ secrets.DEV_HUB_JWT_SERVER_KEY }}

- name: 'Create Beta Managed Package Version'
run: npm run package:version:create:managed

create-unlocked-package-release-candidate:
name: 'Create Core Package Release Candidate'
Expand Down Expand Up @@ -353,13 +344,6 @@ jobs:
env:
PKG_DEMO_ORG_SFDX_URL: ${{ secrets.NEBULA_PKG_DEMO_SANDBOX_SFDX_URL }}

# TODO remove this after the plugin @salesforce/packaging has been upgraded
# to a new version that only looks at package directories
- name: 'Temporarily delete problematic metadata'
run: |
rm -rf ./config/experience-cloud/
rm -rf ./nebula-logger/unsorted/main/default/profiles/
- name: 'Create & Install Package Version'
run: npx pwsh ./scripts/build/create-and-install-package-version.ps1 -targetpackagealias '"Nebula Logger - Core"' -targetreadme ./README.md -targetusername nebula-logger-package-demo

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.

## Unlocked Package - v4.12.7
## Unlocked Package - v4.12.8

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001Mk6IQAS)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001Mk6IQAS)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001Mk6cQAC)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001Mk6cQAC)
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)

`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001Mk6IQAS`
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001Mk6cQAC`

`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001Mk6IQAS`
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001Mk6cQAC`

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<tabs>LogEntry__c</tabs>
<tabs>LogEntryTag__c</tabs>
<tabs>LoggerTag__c</tabs>
<tabs>standard-WaveHomeLightning</tabs>
<tabs>standard-report</tabs>
<tabs>standard-Dashboard</tabs>
<uiType>Lightning</uiType>
Expand All @@ -51,6 +52,9 @@
<mappings>
<tab>standard-Dashboard</tab>
</mappings>
<mappings>
<tab>standard-WaveHomeLightning</tab>
</mappings>
<mappings>
<tab>standard-home</tab>
</mappings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,21 @@
<componentName>flexipage:fieldSection</componentName>
<identifier>flexipage_fieldSection10</identifier>
<visibilityRule>
<booleanFilter>1 OR 2 OR 3</booleanFilter>
<criteria>
<leftValue>{!Record.HttpResponseStatus__c}</leftValue>
<operator>NE</operator>
</criteria>
<criteria>
<leftValue>{!Record.HasHttpResponseBody__c}</leftValue>
<operator>EQUAL</operator>
<rightValue>true</rightValue>
</criteria>
<criteria>
<leftValue>{!Record.HasHttpResponseHeaderKeys__c}</leftValue>
<operator>EQUAL</operator>
<rightValue>true</rightValue>
</criteria>
</visibilityRule>
</componentInstance>
</itemInstances>
Expand Down
2 changes: 1 addition & 1 deletion nebula-logger/core/main/logger-engine/classes/Logger.cls
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
global with sharing class Logger {
// There's no reliable way to get the version number dynamically in Apex
@TestVisible
private static final String CURRENT_VERSION_NUMBER = 'v4.12.7';
private static final String CURRENT_VERSION_NUMBER = 'v4.12.8';
private static final System.LoggingLevel FALLBACK_LOGGING_LEVEL = System.LoggingLevel.DEBUG;
private static final Set<String> IGNORED_APEX_CLASSES = initializeIgnoredApexClasses();
private static final List<LogEntryEventBuilder> LOG_ENTRIES_BUFFER = new List<LogEntryEventBuilder>();
Expand Down
2 changes: 1 addition & 1 deletion nebula-logger/core/main/logger-engine/lwc/logger/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { LightningElement, api } from 'lwc';
import { createLoggerService } from './loggerService';

const CURRENT_VERSION_NUMBER = 'v4.12.7';
const CURRENT_VERSION_NUMBER = 'v4.12.8';

export default class Logger extends LightningElement {
#loggerService = createLoggerService();
Expand Down
Loading

0 comments on commit 21e02ac

Please sign in to comment.