service-worker-gateway icon indicating copy to clipboard operation
service-worker-gateway copied to clipboard

ux: unable to exit config editor on inbrowser.tld

Open lidel opened this issue 1 year ago • 4 comments

Problem

If I open https://inbrowser.dev and click on config editor:

2024-06-10_15-25

There is no way to close editor and go back to the main screen where i can enter the content path, i am stuck in config editor and have to manually edit URL in address bar:

2024-06-10_15-22

Fix ideas

  • make clickin "Save config" collapse config when embedded on Iframe and remove /#/ipfs-sw-config from URL if not in iframe (on main domain)
  • Or keep "Save Config" as-is and add dedicated "Close" button that does the above.

lidel avatar Jun 10 '24 13:06 lidel

make clicking "Save config" collapse config when embedded on Iframe and remove /#/ipfs-sw-config from URL if not in iframe (on main domain)

this is supposed to already exist. Will look into this now.

SgtPooki avatar Jun 12 '24 22:06 SgtPooki

~~"save config" does close config edit screen on inbrowser.dev and local.~~

Actually, after clicking "reset config" it doesn't... interesting.

SgtPooki avatar Jun 12 '24 22:06 SgtPooki

Actually, after clicking "reset config" it doesn't... interesting.

After clearing all storage in the browser, and having a valid config, the reload button works fine, I can't reproduce on inbrowser.dev when using the settings gear icon directly from the homepage, and clicking "save config" to close it.

clicking "reset config" and then "save config" also continues to work after I cleared browser settings

SgtPooki avatar Jun 13 '24 15:06 SgtPooki

and now I can reproduce locally with the code from https://github.com/ipfs/service-worker-gateway/pull/293.... I need to figure out what is going on

SgtPooki avatar Jun 13 '24 17:06 SgtPooki

This was fixed by https://github.com/ipfs/service-worker-gateway/commit/c83830714475a7a20d949d5bf9f74bf65c7e387d & the implementation of await fetch('/#/ipfs-sw-config-reload')

SgtPooki avatar Dec 02 '24 16:12 SgtPooki