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

Rewrite web app launch procedures in terms of the web-app-launch spec algorithm #63

Merged
merged 4 commits into from
Nov 9, 2022

Conversation

alancutter
Copy link
Collaborator

@alancutter alancutter commented Nov 2, 2022

Fixes: WICG/web-app-launch#67

This updates 3 launch sites in manifest-incubations (note taking, protocol handlers and file handlers) to make use of the [=launch a web application with handling=] algorithm being added by: https://github.com/WICG/web-app-launch/pull/79/files

Note that the removal of Launch queue and launch params from this spec is due to these concepts already existing in https://wicg.github.io/web-app-launch/#script-interfaces-to-app-launches.


Preview | Diff

index.html Outdated
protocol handler=] defined in [=HTML=], where the user agent SHOULD
navigate to [=url=] and the appropriate browsing context is set to
a new top level browsing context.
protocol handler=] defined in [=HTML=] where the user agent,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's usually best not to put which spec stuff if defined in as definitions get moved around to different docs:

Suggested change
protocol handler=] defined in [=HTML=] where the user agent,
protocol handler=] where the user agent,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a side this launch instruction seems quite iffy to me, I believe it intends to extract the |resultURL| variable in the algorithm referenced to know what URL to navigate to. I think it needs work but it's a bit out of scope for what I'm trying to do here.

Copy link
Member

@mgiuca mgiuca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

index.html Outdated
</li>
<li>[=Navigate=] |browsing context| to resource
|manifest|["note_taking"]["new_note_url"].
<li>Run the steps to [=launch a web app with handling=] passing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pass with explicit parameter names?

"setting manifest to manifest and target URL to manifest[note_taking][new_note_url]".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

index.html Outdated
protocol handler=] defined in [=HTML=], where the user agent SHOULD
navigate to [=url=] and the appropriate browsing context is set to
a new top level browsing context.
protocol handler=] where the user agent,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this is messy.

Couple of thoughts:

  1. Should we also hook into regular HTML protocol handlers so they trigger the launch as well? Or is this a special property you only get if you register using the app manifest? That's a big can of worms (you would need to edit HTML to call the launch with handler algorithm).
  2. This existing text is probably wrong, or actually, redundant (could be converted into non-normative). See above, the processing the manifest actually calls HTML's register a protocol handler. That means we should not need normative text to handle a protocol launch, it should just happen via HTML. So this text could just explain that that automatically happens. But that means we can't modify its behaviour to do anything different to plain HTML protocols.
  3. Maybe we could just leave it hand-wavy for now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want manifest protocol handlers to ever not launch the web app, I wouldn't leave that detail up to user agents to work out.
This section is gnarly at the moment and I think reworking it is out of scope for this change so I opt for 3.

</li>
<li>[=launch a web app=] with |params|.
<li><a href="https://wicg.github.io/web-app-launch/#dfn-launching-a-web-application-with-handling">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These ugly href links are due to web-app-launch not existing in specref yet. I've filed tobie/specref#721 to try and work out how to fix that.

@alancutter alancutter merged commit 76fed98 into WICG:gh-pages Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"When launching a web app" feels handwavy
3 participants