#695: `handle_links` manifest field ✨

Visit on Github.

Opened Dec 6, 2021

Hola TAG!

I’m requesting an early TAG review of web app link handling.

When clicking on a link, the default behavior is that the browser will open and navigate to the specified URL. However, if a compatible application is installed, a user might prefer to have that application launch and "open" said link. This is the case for native apps that range from media consumption to productivity, where if installed, will open when clicking on a link with related content. This is generally the preferred way to interact with the referenced content. To achieve this, an installed application might want to register itself to handle links and create this seamless flow. From a UX perspective, it is desirable to give users choice on how they prefer the link to be opened, and it is important since it creates the cohesive and integrated experience mentioned previously.

Further details:

  • [ x ] I have reviewed the TAG's Web Platform Design Principles
  • The group where the incubation/design work on this is being done (or is intended to be done in the future): WICG
  • The group where standardization of this work is intended to be done ("unknown" if not known): unknown
  • Existing major pieces of multi-stakeholder review or discussion of this design:
  • Major unresolved issues with or opposition to this design: N/A
  • This work is being funded by: Microsoft

You should also know that this work is the evolution of the URL Handling feature. We have iterated on the idea of how URL handling should work on installed web apps, creating a clearer separation of roles between handle_links and scope_extensions .

The explainer to the previous “shape” of this feature is listed here: https://github.com/WICG/pwa-url-handler/blob/main/explainer.md.

The TAG review for the previous “shape” of this feature is: https://github.com/w3ctag/design-reviews/issues/552 .

Related APIs: scope_extensions: https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md

We'd prefer the TAG provide feedback as: 💬 leave review feedback as a comment in this issue and @-notify : @diekus, @luhuang

Discussions

2022-02-07

Minutes

Dan: extension to the manifest file, to do with handling links

Yves: difficult to review without looking at all things -- goal is to replace pwaURLhandler - here they want to be able to use mediatype regexp on URL (which is bad) - so really need more time to look at all ramifications... so handle_links in manifest seems pretty harmless but need to look at big picture.

Sangwhan: it seems reasonable.

Dan: why do they need regex on urls?

Yves: they want to use regexps to understand if it's a media file etc...

Dan: that's not happening.

Sangwhan: [not mninutable]

Yves: in the past they defined new protocol handlers... so it's getting a bit better but still need to focus on using proper media type - can be dedicated for e.g. if you have audio/something then can pop up audio player - use the scope as a way to match. Still - it should be based on media type.

Dan: you can't assume based on the contents of a link

Yves: you might have a permission prompt or a login. And it's not playable.

Dan: this is basic web architecture

Sangwhan: there's a question about if iti's possible to change the handle after the pwa has been installed. I'd guess no?

Yves: the manifest should be a hint, just sets the initial value in that case

Sangwhan: and you have a getter and setter against the manifest?

Yves: against the manifest I don't know but may be used as an initial setter for the app, depends how it's used

Sangwhan: imagine the case where you have a settings dialog where the user can switch between open in the pwa or as a new thing. That would require modifying the value from the application, I don't know if that's possible. Seems like something application would want to do?

Yves: should be based on user preference

2022-02-21

Minutes

Dan: the one with the URL processing.. Sangwhan wrote some comments

Sangwhan: given a PWA - and the PWA indicating a specific link handling mode - there doesn't seem to be a way for the user to switch it... User "not supposed to care" - but shouldn't the user have some level control. That aligns with the previous one - [web app launch handler].

Dan: it aligns with the ethical web principles - giving users control

Yves: supposed to be a hint

Laura: if you have 3 apps that hear music - which ones do you prefer... if you have content played using only one application and not the other... There are some cases where "I always want to use xyz application for pqd" doesn't work.

Sangwhan: we haven't got a response...

Dan: is the feedback about user choice something we mentioned? The EWP about users view content the way they want. With a PWA it can come up in full screen so you don't have access to browser controls. You can go back to the browser and use controls that way, but there's no UI affordances that help you to make a change if you wanted to change the way that something worked. I'm worried this might be a way for web app developers to constrain the user experiences to create walled gardens or stop people opening links the way they want to open links

Sangwhan: if they have a preference on the PWA shouldn't the user be offered the choice? Given that they suggest this is just a hint - that's dodging the issue. If it's just a hint then what will UAs do? What is the user expectation? Some browers might ignore it? I don't think we've given them that feedback. There's a philosophical question here