Open Bug 1263135 Opened 8 years ago Updated 2 years ago

Better represent service worker ScriptURL vs Scope in about:debugging

Categories

(DevTools :: about:debugging, defect, P3)

48 Branch
defect

Tracking

(firefox48 affected)

Tracking Status
firefox48 --- affected

People

(Reporter: janx, Unassigned)

References

(Blocks 1 open bug)

Details

(In reply to Helen V. Holmes (:helenvholmes) (:✨)(pls ni?)) from comment #33)
> (In reply to Jan Keromnes [:janx] from comment #30)
> > Maybe as a follow-up improvement, we could show only the scope URI, i.e.
> > "/immediate-claim/" (instead of the full URL
> > "https://serviceworke.rs/immediate-claim/")? That would remove most of the
> > redundant text (the base URL "https://serviceworke.rs", which I think will
> > always be the same in both script URL and scope).
> 
> Working on this as a follow-up seems good — no need to block on it, it isn't
> doing any harm.
> 
> I almost feel like for quick readability, you might be able to do:
> 
> my-cool-worker.js                                            debug
> scope/scope/scope/my-cool-worker.js    unregister
> 
> ... assuming the file name is what people are really quickly glancing for.

So the question is mostly where to show the origin. Having:

    my-cool-worker.js                                        Push  Debug
    Scope  https://origin.com/scope/scope/  unregister
    Push Service  https://push.com/endpoint/  unsubscribe

could work, but my main worry is that most scripts will actually be called "serviceworker.js" or "service-worker.js" (so you'd have to glance at the scope to know where they're from).

However,

    https://origin.com/scope/scope/my-cool-worker.js         Push  Debug
    Scope  /scope/scope/  unregister
    Push Service  https://push.com/endpoint/  unsubscribe

looks imbalanced, mostly because the Push Service subscription I'll add will always show an origin (often different from the service worker's I think).

Julian, any thoughts/preference on the issue?
Flags: needinfo?(jdescottes)
(In reply to Jan Keromnes [:janx] from comment #0)
> (In reply to Helen V. Holmes (:helenvholmes) (:✨)(pls ni?)) from comment #33)
> > (In reply to Jan Keromnes [:janx] from comment #30)
> > > Maybe as a follow-up improvement, we could show only the scope URI, i.e.
> > > "/immediate-claim/" (instead of the full URL
> > > "https://serviceworke.rs/immediate-claim/")? That would remove most of the
> > > redundant text (the base URL "https://serviceworke.rs", which I think will
> > > always be the same in both script URL and scope).
> > 
> > Working on this as a follow-up seems good — no need to block on it, it isn't
> > doing any harm.
> > 
> > I almost feel like for quick readability, you might be able to do:
> > 
> > my-cool-worker.js                                            debug
> > scope/scope/scope/my-cool-worker.js    unregister
> > 
> > ... assuming the file name is what people are really quickly glancing for.
> 
> So the question is mostly where to show the origin. Having:
> 
>     my-cool-worker.js                                        Push  Debug
>     Scope  https://origin.com/scope/scope/  unregister
>     Push Service  https://push.com/endpoint/  unsubscribe
> 
> could work, but my main worry is that most scripts will actually be called
> "serviceworker.js" or "service-worker.js" (so you'd have to glance at the
> scope to know where they're from).

100% agree, most service worker scripts today are called sw.js or service-worker.js so we can't really use it as a "title".

> 
> However,
> 
>     https://origin.com/scope/scope/my-cool-worker.js         Push  Debug
>     Scope  /scope/scope/  unregister
>     Push Service  https://push.com/endpoint/  unsubscribe
> 
> looks imbalanced, mostly because the Push Service subscription I'll add will
> always show an origin (often different from the service worker's I think).
> 
> Julian, any thoughts/preference on the issue?

I think this second version is a good compromise for now. Removing the domain from the scope looks fine. Maybe aligning the scope and the push endpoint URL would help?

    https://origin.com/scope/scope/my-cool-worker.js         Push  Debug
    Scope         /scope/scope/   unregister
    Push Service  https://push.com/endpoint/   unsubscribe

In the long run, maybe the scope and push endpoints could be hidden by default (behind a "more" link à la about:addons ?) ; the unregister/unsubscribe actions could go inside a dropdown button?

What about the "domain" highlighting I tried in attachment 8739429 [details] (Bug 1260568)? Could help users scan the list quickly.
Flags: needinfo?(jdescottes)
Flags: needinfo?(janx)
Flags: needinfo?(janx)
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.