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

handle_links manifest field ✨ #695

Closed
diekus opened this issue Dec 6, 2021 · 7 comments
Closed

handle_links manifest field ✨ #695

diekus opened this issue Dec 6, 2021 · 7 comments
Assignees
Labels
Progress: review complete Resolution: satisfied The TAG is satisfied with this design Review type: CG early review An early review of general direction from a Community Group Topic: packaging

Comments

@diekus
Copy link

diekus commented 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: #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

@diekus diekus added Progress: untriaged Review type: CG early review An early review of general direction from a Community Group labels Dec 6, 2021
@etnos
Copy link

etnos commented Dec 15, 2021

Hi @diekus and @luhuang !

Please answer these questions to help us better understand the proposal.

  1. After a PWA is installed, is it possible to change the handle_links mode? E.g., the mode is set to "all" and at some point, I want to set it to "none" or "auto".

  2. Is it a new behavior or it is possible to achieve it via SW?

Thanks!

@cynthia cynthia self-assigned this Dec 20, 2021
@LuHuangMSFT
Copy link

LuHuangMSFT commented Jan 14, 2022

Hi @etnos

  1. After a PWA is installed, is it possible to change the handle_links mode? E.g., the mode is set to "all" and at some point, I want to set it to "none" or "auto".

handle_links should be treated as a hint or suggestion from the app to the UA. As such, it's not something that the end user needs to interact with directly. The UA may implement link handling settings for apps that the end user can control. Those settings need not correspond 1-1 with these options. The user interacts with the setting of the installed app and not the hint from the app.

For our first implementation, we intend to use handle_links to decide the initial setting for an app after install. These settings may look like: [handle link in app client directly | prompt user to handle link in app | never handle link in app]. Afterwards, the user may override this setting.

  1. Is it a new behavior or it is possible to achieve it via SW?

This is a new behavior. There is no previous behavior that captures the same information from the app to the UA. It should not be achieved with a service worker because 1. it is a declarative API suited to the manifest, 2. it is not expected to change often or depend on other state, and 3. it is useful even when no SW is found.

@torgo torgo added this to the 2022-02-07 milestone Feb 2, 2022
@torgo torgo assigned ylafon and torgo and unassigned diekus Feb 2, 2022
@cynthia
Copy link
Member

cynthia commented Feb 8, 2022

The user interacts with the setting of the installed app and not the hint from the app.

This is a bit unclear - does this assume that the user agent provide a mechanism to set this?

Afterwards, the user may override this setting.

Could you clarify if this is something that the application is expected to provide or the user agent? What happens if the application decides to not provide a way to set this?

@cynthia
Copy link
Member

cynthia commented Feb 14, 2022

See also: WICG/pwa-url-handler#42

@torgo torgo modified the milestones: 2022-02-07, 2022-02-21-week Feb 17, 2022
@torgo
Copy link
Member

torgo commented Feb 22, 2022

Hi @diekus have you achieved any clarity on where this might end up after WICG? Maybe Web Applications working group?

@cynthia cynthia added the Progress: pending external feedback The TAG is waiting on response to comments/questions asked by the TAG during the review label Feb 22, 2022
@torgo torgo modified the milestones: 2022-02-21-week, 2022-02-28-week Feb 22, 2022
@LuHuangMSFT
Copy link

The user interacts with the setting of the installed app and not the hint from the app.

This is a bit unclear - does this assume that the user agent provide a mechanism to set this?

I can clarify. The proposed handle_links manifest field is something that the user agent may choose to consider. If the user agent makes use of this information, it may also want to allow users to control or override the effects through user settings. I don't think such settings need to be standardized so it's outside of the scope of this proposal.

Afterwards, the user may override this setting.

Could you clarify if this is something that the application is expected to provide or the user agent? What happens if the application decides to not provide a way to set this?

The user agent would provide the user setting mechanism if it does provide it. It is not required to provide one.

@torgo
Copy link
Member

torgo commented Mar 24, 2022

Hi @diekus @LuHuangMSFT we're just reviewing today at our F2F. We're largely happy with the initial proposal. We're slightly concerned about the possibility that the user might get an unexpected user experience - and to what the balance should be between user choice and author choice. Overall we would like to see how this experiment turns out so we would appreciate the opportunity to re-review with some early implementation feedback. Also as mentioned we would like to see this work on a trajectory to the web applications working group. ✨

@torgo torgo closed this as completed Mar 24, 2022
@torgo torgo added Resolution: satisfied The TAG is satisfied with this design Progress: review complete and removed Progress: pending external feedback The TAG is waiting on response to comments/questions asked by the TAG during the review labels Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: review complete Resolution: satisfied The TAG is satisfied with this design Review type: CG early review An early review of general direction from a Community Group Topic: packaging
Projects
None yet
Development

No branches or pull requests

6 participants