-
-
Notifications
You must be signed in to change notification settings - Fork 218
New 'Logger Settings' lwc/tab #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…SettingsManager.js
…removed LoggerSettings.cls
…ustom settings data
…LogViewer perm set, fixed updating of most fields
…me, added validity check for inputs before saving
…wer.permissionset
b9df129 to
48dc235
Compare
Absolutely. I’ll have a look through this morning! |
nebula-logger/main/log-management/classes/LoggerSettingsController.cls
Outdated
Show resolved
Hide resolved
nebula-logger/main/log-management/lwc/loggerSettings/__tests__/loggerSettings.test.js
Outdated
Show resolved
Hide resolved
nebula-logger/main/log-management/lwc/loggerSettings/__tests__/loggerSettings.test.js
Show resolved
Hide resolved
nebula-logger/tests/log-management/classes/LoggerSettingsController_Tests.cls
Outdated
Show resolved
Hide resolved
nebula-logger/tests/log-management/classes/LoggerSettingsController_Tests.cls
Outdated
Show resolved
Hide resolved
7ad06a6 to
d8ccf4a
Compare
Codecov Report
@@ Coverage Diff @@
## main #254 +/- ##
==========================================
+ Coverage 95.53% 95.67% +0.14%
==========================================
Files 28 30 +2
Lines 2864 3168 +304
Branches 42 64 +22
==========================================
+ Hits 2736 3031 +295
- Misses 127 136 +9
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…elp from @jamessimone), and incorporated more PR feedback from @jamessimone
9fcf7c1 to
7357cc3
Compare
Closes #202 by adding a new lwc,
loggerSettings, as a tab in the Logger Console app. It provides several features for managingLoggerSettings__crecords:Provides a datatable of all
LoggerSettings__crecords - long-term, more optimizations may be needed for orgs that have a lot of records (currently, there is infinite scrolling or pagination)Provides view, create, edit and delete functionality. Anyone with access to the tab/lwc can see the datatable and the 'View' row action - but in order to access/use the 'New' button (create), and the 'Edit' & 'Delete' row actions, users must either have update access on the
LoggerSettings__cobject(LoggerSettings__c.SObjectType.getDescribe().isUpdateable()), or have the custom permission 'Can Modify Logger Settings' (FeatureManagement.checkPermission('CanModifyLoggerSettings')). This is useful for orgs where people may have theLoggerAdminpermission set, but aren't full System Admins.LoggerAdminpermission set has access to view, create, edit, and deleteLoggerLogViewerpermission set only has access to viewLoggerLogCreatorandLoggerEndUserpermission sets do not have access to the tab/lwcProvides page sections to mimic the look & feel of standard page layouts. Custom settings objects do not support page layouts, so there's normally not a way to control the arrangement of fields show in the UI. Within the component, all of the fields have been arranged into 5 sections:
Displays usernames (instead of a user's name) as the primary field for user-specific records. This is useful in orgs where multiple users may have the same first/last name - with the standard UI for custom settings, it can be difficult to select the correct user when multiple people have the same name. Since username is unique, the component provides a better method of displaying/selecting the appropriate user.
Provides picklist-style inputs for fields that really should be picklists. Custom settings objects do not support several field types, including picklists - instead, text fields are used on the object, but this can lead to bad config data being entered (e.g., an admin/developer mistypes the name of a
LoggingLevelorLogger.SaveMethodenum value. The lwc solves this by presenting these fields as picklists, using some Apex in theLoggerSettingsControllerclass to generate the list of picklist options. This prevants any isssues with tpyos, and it simplifies the configuration process for admins/developersField labels updated: previously, I had shortened the labels on several fields to try to make things better fit into the standard list views for
LoggerSettings__c. I've re-expanded several of the labels to be more verbose/descriptive, since the component provides a better use of spaceBonus unexpected feature: using this component, you can now configure
LoggerSettings__cfor the the Automated Process user. When using the standard UI for custom settings, you cannot search for/select the Automated Process user, but it apparently works just fine when the settings record is created via ApexOther changes
I've also included some other changes in this PR:
sfdx-cliin the pipeline, and the pipeline now deploys to 2 different scratch orgs (in parallel) to confirm the metadata works in both a base org, and an experience cloud orgloggerlwc classes - the GitHub Pages site should now include these docs going forward (alongside the existing Apex docs). I also cleaned up a few ApexDoc comments in various classes