For Salesforce Experience Cloud. Learn, Demo & Build Great LWR Sites. Get detailed information about components on the page.
Lightning Web Runtime (LWR) Build Info Extension
Easily understand how a Salesforce Lightning Web Runtime live site was built!
After the LWR site's page loads, open the extension to get started. The extension popup UI will allow you to add and remove a clickable badge for each Experience Builder component on the live site page.
Clicking on a badge displays the following information about the component:
- Display Name in Experience Builder
- Description of usage
- Component Type
- Tag Name
- Unique Selector for CSS
- Display Styles (Margin and Padding) when set on the Experience Builder component.
- Display CSS Classes set on the Experience Builder Component.
- Display All Custom Properties as they are declared and their current value in context.
- Beyond everything above, Clicking on the Theme and Section component badges will display the dxp Styling Hook values with mapping to the standard Theme Panel Property names.
Try it on a live LWR demo site: https://capricornhealth.sfdxp.com
--Supports unpublished sites viewed from Experience Builder Preview as well!
--Permissions Information--
When you add this extension, you will be prompted that it can “Read and change all your data on all websites”. This permission is needed because a Salesforce Experience Cloud site can exist on any Custom Domain. All data required to run this extension is self contained and there is no server communication or logging of any kind. This app will check if the web page contains the HTML tag webruntime-app for the purpose of detecting if it is an LWR site. If true, the page will only be read and changed once extension popup buttons have been clicked. This scope is to process and provide information about components on the page. All code is open-source for review.
Read more
After the LWR site's page loads, open the extension to get started. The extension popup UI will allow you to add and remove a clickable badge for each Experience Builder component on the live site page.
Clicking on a badge displays the following information about the component:
- Display Name in Experience Builder
- Description of usage
- Component Type
- Tag Name
- Unique Selector for CSS
- Display Styles (Margin and Padding) when set on the Experience Builder component.
- Display CSS Classes set on the Experience Builder Component.
- Display All Custom Properties as they are declared and their current value in context.
- Beyond everything above, Clicking on the Theme and Section component badges will display the dxp Styling Hook values with mapping to the standard Theme Panel Property names.
Try it on a live LWR demo site: https://capricornhealth.sfdxp.com
--Supports unpublished sites viewed from Experience Builder Preview as well!
--Permissions Information--
When you add this extension, you will be prompted that it can “Read and change all your data on all websites”. This permission is needed because a Salesforce Experience Cloud site can exist on any Custom Domain. All data required to run this extension is self contained and there is no server communication or logging of any kind. This app will check if the web page contains the HTML tag webruntime-app for the purpose of detecting if it is an LWR site. If true, the page will only be read and changed once extension popup buttons have been clicked. This scope is to process and provide information about components on the page. All code is open-source for review.
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 3, "name": "Lightning Web Runtime (LWR) Build Info", "description": "For Salesforce Experience Cloud. Learn, Demo & Build Great LWR Sites. Get detailed information about components on the page.", "author": "Craig Johnson", "version": "1.2.0", "icons": { "16": "logo/logo-16.png", "32": "logo/logo-32.png", "48": "logo/logo-48.png", "128": "logo/logo-128.png" }, "action": { "default_title": "LWR Build Info", "default_popup": "popup/popup.html" }, "permissions": ["declarativeContent"], "host_permissions": [ "*://*/*" ], "background": { "service_worker": "service-worker.js" }, "content_scripts": [{ "run_at": "document_end", "js": ["foreground.js"], "css": ["foreground.css"], "matches": [ "https://*/*", "http://*/*" ] }]}
Read more