Salesforce-Inspector-reloaded
Salesforce-Inspector-reloaded copied to clipboard
[UI] Dark Mode
Hey great job resurrecting the project. Could you please add a dark mode? Link to issue in previous project.
Hi @Damecek , I started to work on a dark mode version few times ago but did not finished it. Since the extension is released in the Chrome Web Store I may have some contributions on this feature.
I'll keep you informed in this thread !
Chrome has an automatic dark mode which can be enabled from the dev console.
Can be a good starting point to reproduce those colors in the extension:
@tprouvot you've put the help wanted
tag, is there a branch/fork that's being used for development?
Hi @Astisme,
Yes the link is in my comment from the 18/04/23 dark mode version. I think that for now it is easier to start from a new one.
The idea would be :
- Add an input toggle in the new "Options" page to enable / disable it and store the preference in localStorage
- Detect if dark mode is the preferred theme in browser
window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
by default if no preference is stored enable the dark mode if the previous code returs true
You can find some general guidelines on the contribution section.
Hey @tprouvot I'm working on this at https://github.com/Astisme/Salesforce-Inspector-reloaded/tree/feature/darkModeUI_v2
It seems like there's an issue on the addons/links.js file: chrome says Uncaught SyntaxError: Unexpected token 'export'
.
Do you get the same error?
Hi @Astisme, I've seen it few months ago but this is not something which affects the functionality itself.
I've also tried working on firefox but I get this error on loading: `Extension is invalid
Reading manifest: Error processing background: Value must either: contain the required "page" property, contain the required "scripts" property, or not contain an unexpected "type" property`
Reading the file
- it doesn't seem that a
page
property is defind. - the
scripts
string is found only oncontent_scripts
- the
type
property is not found
Hi @Astisme, I've seen it few months ago but this is not something which affects the functionality itself.
It doesn't let me run the extension so I guess it does a little bit ahah
I've also tried working on firefox but I get this error on loading: `Extension is invalid
Reading manifest: Error processing background: Value must either: contain the required "page" property, contain the required "scripts" property, or not contain an unexpected "type" property`
Reading the file
- it doesn't seem that a
page
property is defind.- the
scripts
string is found only oncontent_scripts
- the
type
property is not found
Firefox manifest needs some adjustments and the releaseCandidate branch does not reflect those (firefoxAddon does)
Hi @Astisme, I've seen it few months ago but this is not something which affects the functionality itself.
It doesn't let me run the extension so I guess it does a little bit ahah
Are you experiencing this issue on releaseCandidate ?
mhh it seems like the chrome issue is no longer a problem (I don't know what I've done tbh)
Just to be clear, do you want me to test everything on firefox as well or will it be done once firefoxAddon
gets merged?
Without the changes on that branch it's pretty much impossible to run the addon on firefox.
Hi @Astisme, I'm expecting that the dev you are working on are not exclusive to chrome and compatible with firefox. A test on firefox would help you to check that.
Once your devs are done, you can create a new branch based on firefoxAddon and merge your dev into it to check the behaviour on firefox. Don't hesitate to share me the link on your current branch so that I can check if it goes the way I was expected
https://github.com/Astisme/Salesforce-Inspector-reloaded/tree/feature/darkModeUI_v2
|
Hi @tprouvot, I'm at a good point in the implementation of this feature.
Would you mind telling me where the inspect-inline.js
is invoked?
I only see it in the manifest and it isn't imported anywhere.
Nevermind, I guess it works just like button.js
which means it's called every time by the browser.
Hi, I'm having issues with the test-framework
: it does not find AccountContactRelation
during the data-export
test.
Do you have any insights on where it looks for this Relation?
Everything else works fine. I'm still having troubles getting it to work on firefox
- running the firefoxAddon branch by itself does not make the addon to load
- after branching from firefoxAddon and merging my devs, firefox refuses the manifest
May you please check what's going on here, please?
Here are some new insighs.
AccountContactRelation
Have you deployed the /test folder to your org as described in UnitTest section ?
It contains account settings to enable this https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/test/main/default/settings/Account.settings-meta.xml
Yes, I did and I've also followed the other steps. I've tried to reupload all of the metadata and Inspector_Test__c, SfInspctor and Account (settings) have been changed so I guess that the first time didn't work.
It is still not working though. The issue is still on that AccountContactRelation
.
- Account
- AccountChangeEvent
- AccountCleanInfo
- AccountContactRole
- AccountContactRoleChangeEvent
- AccountFeed
- AccountHistory
- AccountPartner
- AccountShare
- ThirdPartyAccountLink
- UserProvAccount
- UserProvAccountStaging
That's 12 account autocompletes
I found a rather interesting fact: while trying to disable the feature "contacts to multiple accounts", I found that Salesforce has not "registered" that the feature was enabled as it gives out the error You can't disable Contacts to Multiple Accounts unless the feature is enabled.
It seems like there could be an issue with deploying this specific setting.
I've created a new dev org and have manually enabled this setting. Now the test-framework is working correctly on Chrome
The edits do not work on firefox due to the export in the links.js file (I know for sure because I found a fix for this and the extension now works on firefox as well [kinda])
Hey great job resurrecting the project. Could you please add a dark mode? Link to issue in previous project.
@Damecek hah you beat me this time. My first thought was, oh someone requested on the old project?... oh yeah it was me hah.
Saw the PR has had a lot of activity. Thanks for all the work @Astisme and @tprouvot! Was also happy to hear you on the SalesforceWay Podcast :).