Skip to content

Commit

Permalink
1.20 (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
tprouvot authored Nov 8, 2023
2 parents 7dc0be8 + 3ddf2e5 commit 49dcf65
Show file tree
Hide file tree
Showing 29 changed files with 1,712 additions and 1,194 deletions.
32 changes: 31 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Release Notes

## Version 1.20

- Move popup arrow icon in Flow Builder because of Winter 24 UI changes [feature 200](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/200)
- Add 'Login As' button for Experience users [feature 190](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/190)
- Add 'Delete Records' button from data export page [feature 134](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/134) (contribution by [Oscar Gomez Balaguer](https://github.com/ogomezba))
- Update popup title to show "Salesforce Inspector Reloaded" [feature 188](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/188) (idea by [Nicolas Vuillamy](https://github.com/nvuillam))
- Add "Query Record" link from data-export page [feature 111](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/111) (contribution by [Antoine Leleu](https://github.com/AntoineLeleu-Salesforce))
- Fix "Edit page layout link" for from show all data and use "openLinksInNewTab" property for those links [issue 181](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/181)
- Update to Salesforce API v 59.0 (Winter '24)
- Add a parameter to activate summary view of pset / psetGroup from shortcut tab [feature 175](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/175)
- Display record name (and link) in popup [feature 165](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/165)
- Add documentation link to popup
- Add option to open extension pages in a new tab using keyboard shortcuts (contribution by [Joshua Yarmak](https://github.com/toly11))
- Add customizable query templates to query export page (idea and co-develop with [Samuel Krissi](https://github.com/samuelkrissi))
- Explore-api page restyling
- Ability to define csv-file separator [feature 144](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/144) (issue by [Reinier van den Assum](https://github.com/foxysolutions))
- Fix SObject auto detect for JSON input in data import
- "Lightning Field Setup" (from show all data) link did not work for CustomMetadataType and CustomSettings [issue 154](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/154) (issue by [Camille Guillory](https://github.com/CamilleGuillory))
- Add missing Date Literals [feature 155](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/155)
- Allow navigation to the extension tabs (Object, Users, Shortcuts) using keyboard [feature 135](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/135) (feature by [Sarath Addanki](https://github.com/asknet))
- Update query on EntityDefinition to avoid missing objects for large orgs [issue 138](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/138) (issue by [AjitRajendran](https://github.com/AjitRajendran))
- Add 'LIMIT 200' when selecting 'FIELDS(' in autocomplete [feature 146](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/146) )
- Change method to get extension id to be compatible with firefox [issue 137](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/137) (issue by [kkorynta](https://github.com/kkorynta))
- Fix hardcoded browser in Generate Token url [issue 137](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/137) (issue by [kkorynta](https://github.com/kkorynta))
- Add "Create New Flow", "Create New Custom Object", "Create New Permission Set", "Create New Custom Permission" and "Recycle Bin" shortcuts
- Update pop-up release note link to github pages
- Detect SObject on list view page [feature 121](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/121) (idea by [Mehdi Cherfaoui](https://github.com/mehdisfdc))
- Automate test setup manual step of contact to multiple accounts [Aidan Majewski](https://github.com/aimaj)
- In Data export, set input focus in SOQL query text area. [feature 183](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/183) (contribution by [Sarath Addanki](https://github.com/asknet))

## Version 1.19

- Inspect Page Restyling (UI improvements, red background for PROD, display / hide table borders) [PR105](https://github.com/tprouvot/Salesforce-Inspector-reloaded/pull/105) (contribution by [Pietro Martino](https://github.com/pietromartino))
Expand Down Expand Up @@ -42,7 +72,7 @@

## Version 1.14

- Add checkbox in flow builder to give the possibility to the user to scroll on the flow (by [Samuel Krissi](https://github.com/samuelkrissi) )
- Add checkbox in flow builder to give the possibility to the user to scroll on the flow (by [Samuel Krissi](https://github.com/samuelkrissi))

![image](https://user-images.githubusercontent.com/96471586/226161542-cbedec0a-8988-4559-9152-d067ea6f9cb6.png)

Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ We all know and love Salesforce Inspector: As the great Søren Krabbe did not ha

## Documentation

[Extension's doc](https://tprouvot.github.io/Salesforce-Inspector-reloaded/)
> User guide for using the extension.
[![view - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](https://tprouvot.github.io/Salesforce-Inspector-reloaded/ "Go to extension documentation")


## New features compared to original SF Inspector

Expand All @@ -61,7 +64,7 @@ To validate the accuracy of this description, inspect the source code, monitor t

## Use Salesforce Inspector with a Connected App

Follow steps described in [wiki](https://github.com/tprouvot/Salesforce-Inspector-reloaded/wiki/How-to#use-sf-inspector-with-a-connected-app)
Follow steps described in [how-to documentation](https://tprouvot.github.io/Salesforce-Inspector-reloaded/how-to/#use-sf-inspector-with-a-connected-app)

## Installation

Expand All @@ -71,6 +74,15 @@ Follow steps described in [wiki](https://github.com/tprouvot/Salesforce-Inspecto
- [Firefox Browser Add-ons](https://addons.mozilla.org/en-US/firefox/addon/salesforce-inspector-reloaded/)
- [Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/salesforce-inspector-relo/noclfopoifgfgnflgkakofglfeeambpd)

### Local Installation

1. Download or clone the repo.
2. Checkout the releaseCandidate branch.
3. Open `chrome://extensions/`.
4. Enable `Developer mode`.
5. Click `Load unpacked extension...`.
6. Select the **`addon`** subdirectory of this repository.

## Troubleshooting

- If Salesforce Inspector is not available after installation, the most likely issue is that your browser is not up to date. See [instructions for Google Chrome](https://productforums.google.com/forum/#!topic/chrome/YK1-o4KoSjc).
Expand Down Expand Up @@ -120,19 +132,6 @@ Linting : to assure indentation, formatting and best practices coherence, please

1. `npm run eslint`

## Release

Version number must be manually incremented in [addon/manifest-template.json](addon/manifest-template.json) file

### Chrome

If the version number is greater than the version currently in Chrome Web Store, the revision will be packaged and uploaded to the store ready for manual release to the masses.

### Firefox

1. `npm run firefox-release-build`
2. Upload the file from `target/firefox/firefox-release-build.zip` to addons.mozilla.org

## Design Principles

(we don't live up to all of them. pull requests welcome)
Expand Down
16 changes: 15 additions & 1 deletion addon/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,21 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
if (sessionCookie) {
sendResponse(sessionCookie.domain);
} else {
sendResponse(null);
chrome.cookies.getAll({name: "sid", domain: "salesforce.mil", secure: true, storeId: sender.tab.cookieStoreId}, cookies => {
sessionCookie = cookies.find(c => c.value.startsWith(orgId + "!"));
if (sessionCookie) {
sendResponse(sessionCookie.domain);
} else {
chrome.cookies.getAll({name: "sid", domain: "cloudforce.mil", secure: true, storeId: sender.tab.cookieStoreId}, cookies => {
sessionCookie = cookies.find(c => c.value.startsWith(orgId + "!"));
if (sessionCookie) {
sendResponse(sessionCookie.domain);
} else {
sendResponse(null);
}
});
}
});
}
});
}
Expand Down
14 changes: 10 additions & 4 deletions addon/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
// sfdcBody = normal Salesforce page
// ApexCSIPage = Developer Console
// auraLoadingBox = Lightning / Salesforce1
// location.host.endsWith("visualforce.com") = Visualforce page
if (document.querySelector("body.sfdcBody, body.ApexCSIPage, #auraLoadingBox") || location.host.endsWith("visualforce.com")) {
// We are in a Salesforce org
chrome.runtime.sendMessage({ message: "getSfHost", url: location.href }, sfHost => {
chrome.runtime.sendMessage({message: "getSfHost", url: location.href}, sfHost => {
if (sfHost) {
initButton(sfHost, false);
}
});
}

function initButton(sfHost, inInspector) {
addFlowScrollability();
let rootEl = document.createElement("div");
rootEl.id = "insext";
let btn = document.createElement("div");
Expand All @@ -34,11 +32,19 @@ function initButton(sfHost, inInspector) {
loadPopup();
});

addFlowScrollability();


function addFlowScrollability() {
const currentUrl = window.location.href;
// Check the current URL for the string "builder_platform_interaction"
if (currentUrl.includes("builder_platform_interaction")) {
//add marging for the popup arrow to prevent overlap with standard close button in flow builder (Winter 24)
//temporary workaround, will be removed in next release when the popupArrow position will be updatable by users
const popupArrow = document.querySelector("#insext");
if (popupArrow){
popupArrow.style = "margin-top: 50px;";
}
// Create a new checkbox element
const headerFlow = document.querySelector("builder_platform_interaction-container-common");
const overflowCheckbox = document.createElement("input");
Expand Down Expand Up @@ -120,7 +126,7 @@ function initButton(sfHost, inInspector) {
});
rootEl.appendChild(popupEl);
function openPopup() {
popupEl.contentWindow.postMessage({ insextUpdateRecordId: true, locationHref: location.href }, "*");
popupEl.contentWindow.postMessage({insextUpdateRecordId: true, locationHref: location.href}, "*");
rootEl.classList.add("insext-active");
// These event listeners are only enabled when the popup is active to avoid interfering with Salesforce when not using the inspector
addEventListener("click", outsidePopupClick);
Expand Down
Loading

0 comments on commit 49dcf65

Please sign in to comment.