Skip to content
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

[general] Customize favicon's color #197

Closed
ashish-rs opened this issue Nov 3, 2023 · 13 comments
Closed

[general] Customize favicon's color #197

ashish-rs opened this issue Nov 3, 2023 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@ashish-rs
Copy link

When we open multiple tabs, both Salesforce and Inspector, then the inspector tabs are not easily identifiable (screenshots below).
For fewer tabs it's fine, but it becomes slightly difficult when we've many tabs open in a single browser window.

Would it be possible to change the color of the icon please or give users an option to do so?
Thanks.

image

It was easy in the original inspector:
image

@ashish-rs ashish-rs added the enhancement New feature or request label Nov 3, 2023
@tprouvot tprouvot changed the title Color of the extension's icon for easy identification [general] Customize favicon's color Dec 28, 2023
@tprouvot
Copy link
Owner

That's a good idea which has been requested by other members of the community 👍

tprouvot added a commit that referenced this issue Mar 6, 2024
## Describe your changes
This PR allows users to customize favicons with a custom url or
predefined colors (green, orange, pink, purple, red, yellow)

## Issue ticket number and link
#197

## Checklist before requesting a review
- [x] I have read and understand the [Contributions
section](https://github.com/tprouvot/Salesforce-Inspector-reloaded#contributions)
- [x] Target branch is releaseCandidate and not master
- [x] I have performed a self-review of my code
- [x] I ran the [unit
tests](https://github.com/tprouvot/Salesforce-Inspector-reloaded#unit-tests)
and my PR does not break any tests
- [x] I documented the changes I've made on the
[CHANGES.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/CHANGES.md)
and followed actual conventions
- [x] I added a new section on
[how-to.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/docs/how-to.md)
(optional)

<img width="901" alt="image"
src="https://github.com/tprouvot/Salesforce-Inspector-reloaded/assets/35368290/1bbd9cc8-2425-4e79-8a92-a4e954f3d369">
@tprouvot
Copy link
Owner

tprouvot commented Mar 6, 2024

Will be released in 1.23 🚀 and in the beta version sooner

@tprouvot tprouvot closed this as completed Mar 6, 2024
@RebbePod
Copy link

Anyway to not have to set it for each org manually?

Perhpas it can match the color of this extension somehow
https://chromewebstore.google.com/detail/salesforce-colored-favico/peohlnebahcddpmfaplmilpkgbkkcdho?hl=en

@tprouvot
Copy link
Owner

Hi @RebbePod,
I prefer to keep the default favicon as it is for the users who don't want custom favicons.

I don't know how are you dev skills but I think you/we can code something in order to add a favicon for all the orgs you've visited.
Let me know if you're interested in this solution

@RebbePod
Copy link

@tprouvot Theres two parts to this, one the way I see it, have an option to auto set each org a different color. So every org visited is unique. Second part is copying the functionality of that other extension, giving an option for the favicon to be colored for the org pages not just inspector.
If we get part two complete the colors should match to part 1.

My skills are limited, but I can definitely try to take a look if you give me some direction

@tprouvot
Copy link
Owner

Part 2 is already developed and available in the beta version.
How many orgs are you working on ? Because to me it would be much more faster to configure each color on the org when needed

@RebbePod
Copy link

Over 30 😀

@RebbePod
Copy link

RebbePod commented May 14, 2024

it's also about ease of use. A setting to change the color makes sense, but why shouldn't auto assign one to start off?

@tprouvot
Copy link
Owner

@RebbePod

  1. Open data export page
  2. Right click on the page and select inspect
  3. Paste following code in chrome dev console
let colors = ['green', 'orange', 'pink', 'purple', 'red', 'yellow'];

let orgs = Object.keys(localStorage).filter((localKey) =>
    localKey.endsWith("_isSandbox")
);
orgs.forEach((org) => {
    let sfHost = org.substring(0, org.indexOf(("_isSandbox")));
    let randomFavicon = colors[(Math.floor(Math.random() * colors.length))]
    console.info(sfHost + "_customFavicon", randomFavicon);
    localStorage.setItem(sfHost + "_customFavicon", randomFavicon);
});

@RebbePod
Copy link

Will this keep the color of each one, so it's the same color everytime I reopen it?

@tprouvot
Copy link
Owner

@RebbePod yes

@RebbePod
Copy link

@tprouvot it's working great so far, not sure if you'd like to incorporate it in somehow

@tprouvot
Copy link
Owner

@RebbePod actually I documented the code in the how-to section and enhanced the feature by increasing the available colors with HTML codes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants