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

Provide a way to update the production host in side kick #477

Closed
ravkiran opened this issue Aug 8, 2023 · 6 comments
Closed

Provide a way to update the production host in side kick #477

ravkiran opened this issue Aug 8, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@ravkiran
Copy link

ravkiran commented Aug 8, 2023

Description
During the validation/QA, customer installed the Franklin Sidekick browser extension. After going live, the extension is only working with hlx pages, not with the production host, even after we update the production host in github and sharepoint. The only way it worked is to remove the project from sidekick and re-add it.

To Reproduce
Steps to reproduce the behavior:

  1. Install the side kick during development
  2. Configure side kick with github url but with out production host name
  3. After going live, add the production host name to /tools/sidekick/config.json
  4. Check the side kick will not show Edit/Preview actions when on the production site but only shows when on the Franklin url
  5. The only way to make the side kick work on the production host is to remove the project from the side kick and re-add it, this time since the github has the production host information, it'll work on the Franklin url and production host url as well.

Expected behavior
There should be easy way to update the production host in the side kick with out having to remove the project and re-adding it

@ravkiran ravkiran added the bug Something isn't working label Aug 8, 2023
@rofe
Copy link
Contributor

rofe commented Aug 10, 2023

You can add the host to /tools/sidekick/config.json, which will be fetched every time the sidekick is loaded.

@rofe rofe closed this as completed Aug 10, 2023
@ravkiran
Copy link
Author

@rofe we did the same thing couple of weeks back, but the side kick isn't fetching the new host configuration and not showing edit/preview when we're on the production host https://www.theiotintegrator.com/ but the same is working fine when we're on https://main--channelco-iot--hlxsites.hlx.live/

May I ask when this functionality was added to sidekick?

cc: @amol-anand

@rofe
Copy link
Contributor

rofe commented Aug 11, 2023

@ravkiran you're right, i got confused: before the sidekick can read the config.json, the extension needs to know when to inject the sidekick in the first place - classic chicken/egg :)

So as you already pointed out, the only workaround for early users is currently is to remove and re-add the project. This is a 5 seconds operation via the extension's context menu. Alternatively (or additionally) we could add a "refresh" button to the project config on the options page, but that would probably even take the user longer than removing and adding the project again. And once they found the options page, they can also quickly add the host name for their project manually.

The 3rd option that comes to mind is for the extension to periodically auto-refresh all project configs, say on startup, or when the browser is idling. But I'm a bit worried about that generating a lot of (mostly useless) traffic.

@ravkiran
Copy link
Author

Thank you @rofe for the alternate proposals.

Alternatively (or additionally) we could add a "refresh" button to the project config on the options page,

This sounds good to me, we can document this with screenshot easily and ask the customer just to click on the refresh button agains main--.... Asking the customer to remove and re-add seems counter intuitive IMHO.
I like the third option too, but rather than periodic refresh, I think its better to add a Refresh button in the right click of the sidekick and that will refresh all the projects. As you've pointed out this could lead to more traffic, but this option is doing only when the user Refreshes manually, rather than periodically.
WDYT?

@rofe
Copy link
Contributor

rofe commented Aug 30, 2023

Actually, I like the context menu option, but I'd probably limit it to the current project to minimize the impact. I don't think refresh all is a common use case, and most people probably only have 1 or 2 projects configured.

@rofe
Copy link
Contributor

rofe commented May 23, 2024

Fixed with #723

@rofe rofe closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants