sfccdevops / sfcc-devtools

Support Browser Interaction with VS Code, Eclipse, and SFCC Business Manager via DevTools Web Inspector.
MIT License
5 stars 0 forks source link

Option to override default linking for "Business Manager" #4

Closed nathanhemesath closed 2 years ago

nathanhemesath commented 4 years ago

Overview:

Have an option to set the default linking for "Open in Business Manager". So instead of being based off whether or not you are viewing staging or production, allow the user to set the link to always open business manager in the staging instance.

Acceptance Criteria:

This will allow the convenience of finding an asset currently in production, and opening it in the staging instance of business manager.

Steps to Duplicate ( required for bug reports ):

System Info ( required for bug reports ):

MacOS 10.15.4 Chrome Version 81.0.4044.92

manifestinteractive commented 4 years ago

@nathanhemesath I actually REALLY like this idea, as I have found that sometimes I am on my sandbox and need to see what the same dwContentID is on a dev or staging environment.

What are your thoughts on how this would work ? Like, would you want maybe the OPEN IN BM button to have like a little drop down next to it? So clicking the button would open it in the current site, but clicking the drop down arrow would give you options to open it in other sites?

Something like this ( here, the Primary would open in current site ) :

button

I would also need to add a way for you to manage alternate environments to connect ... as I can see it being handy to actually use this in different ways, like if you were on your sandbox, and wanted to open something in staging, or visa versa. But we would probably need to group these relationships.

Browser extensions have a preferences panel that you can flush out ( if you have used DWEase, you know what I am talking about ) ... so we can certainly make this happen, mainly just need to flush out HOW it should happen.

If you have some specific use cases in mind, let me know :)

nathanhemesath commented 4 years ago

@manifestinteractive I like the drop down idea a lot. Easy one click button, while allowing to choose a different instance on the side. Sounds perfect!

A lot of developers on our team use DWEase, so throwing preferences in might be a good idea.

manifestinteractive commented 4 years ago

@nathanhemesath just a heads up that I have started development of this feature and hope to have a release for it in the next couple of weeks.

manifestinteractive commented 4 years ago

@nathanhemesath so, random question for you about this feature idea.

After looking more into the CQuotient variable that exists on SFCC sites, I have an idea where I could just keep track of client / site ID for sites you visit, as all I really need are the URL, siteId & instanceType from each page.

Basically, if I used localStorage to just track those bits, I could automatically generate the list by grouping client / site ID's. So when you select the Open in BM drop down, it would just pull from matching sites, with just different instanceType.

I like this idea since you would never need to actually configure anything, it would just be a smart list that would pull from sites you already visited. And if you did not see the item in your list, you would simply need to visit the site ONCE to have it added.

Usability wise, I plan on adding a little Add New Instance ... option at the bottom of the drop down list that would just give you those instructions.

I would love to hear your thoughts on that. IMO, this would make it WAY easier to just have this stuff be collected, and we are talking maybe like 40-50 characters of data stored for this option per site on initial page load. I personally hate having to remember to configure things, a big pain point with DWEase for me personally is adding sandbox configs for instances I do not use very often.

nathanhemesath commented 4 years ago

@manifestinteractive I like that idea a lot, it would make setup a breeze for people on other teams that are not as tech savvy.

manifestinteractive commented 4 years ago

@nathanhemesath OK, last question for you, as I believe I have this close to working ... for comments like this:

<!-- dwMarker="content" dwContentID="abd5cb91891e14bcf379763a9a" -->

The issue is this ID will likely be unique to the instance it is installed on. So, while we could generate a link for all related sandboxes, that abd5cb91891e14bcf379763a9a is only going to work on one of them ( unless I am mistaken ).

So maybe this should just work for Content Slots.

FYI, this is what it is currently looking like. Basically made it so if you ever open the SFCC tool in DevTools for a new site, and that site has the same clientId and siteId it groups the sites together. That way you get a nice little dropdown for all the sites you have inspected, and as soon as you inspect on a new site just once, it gets saved.

sample

manifestinteractive commented 4 years ago

@nathanhemesath OK, so if you wanted to tinker with the latest build, feel free to test using these files:

https://github.com/redvanworkshop/sfcc-devtools/tree/feature/link-override/dist

Instruction for how to manually install are here: https://github.com/redvanworkshop/sfcc-devtools/tree/feature/link-override#manual-install

Just make sure to uninstall the old version first. And once this is released to production, you can switch back to installing it from the native extension stores.

nathanhemesath commented 4 years ago

@manifestinteractive , Sorry I didn't see your comments on this in my inbox. I do like what you have for this, keep up the great work!