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

Note Taking: New Note URL field #648

Closed
phoglenix opened this issue Jun 15, 2021 · 15 comments
Closed

Note Taking: New Note URL field #648

phoglenix opened this issue Jun 15, 2021 · 15 comments
Assignees
Labels
Resolution: satisfied The TAG is satisfied with this design Venue: WebAppSec WG

Comments

@phoglenix
Copy link

phoglenix commented Jun 15, 2021

Kia Ora TAG!

I'm requesting a TAG review of note_taking: { new_note_url }, fields being added to the web app manifest.

eg. manifest.json

{
  "name": "My Note Taking App",
  "start_url": "/index.html",
  "note_taking": {
    "new_note_url": "/new_note.html"
  }
}

Web apps lack a semantic way of declaring and defining note-taking capabilities. This specification adds a new note_taking object member to the web app manifest, where note-taking capabilities can be added. It also adds the first such note-taking capability: a new_note_url field in the note_taking object: a URL within scope that can be used to launch the web app in order to take a new note.

Further details:

We'd prefer the TAG provide feedback as:
🐛 open issues in our GitHub repo for each point of feedback and @-notify phoglenix

@phoglenix
Copy link
Author

Hi there, I see this was in a milestone for last week. Was it discussed at all?

@kenchris kenchris self-assigned this Jul 8, 2021
@kenchris
Copy link

kenchris commented Jul 8, 2021

Explainer: none(!). Seemed like overkill.

I never really think that is overkill. On the other hand this feature feels quite specific and could mean an inflow of similar specific features so I definitely think that an explainer is in place that explains why this warrants a special manifest entry?

Also, I assume that note taking might differ from where it is instantiated within a site or single page app, so how can people do that? Is any state send to the new page (like with web share target) or maybe this makes more sense as a meta tag that can be changed, or replaced per subpage? Such things could be discussed in an explainer.

@phoglenix
Copy link
Author

Thanks for the reply.

I've put together a draft explainer here (now in review). It's mostly just the discussion on w3c/manifest#965 that tries to clarify the pros and cons of doing something general vs specific.

The URL is launched in the same way as the start_url, so it is controlled by the existing display settings in the manifest. No extra state/data is sent with the request, but it would be simple to add that later. I have noted these points in the explainer.

@kenchris
Copy link

kenchris commented Jul 8, 2021

Thanks! Hope we get to look at this soon, but expect delays as people in Europe are starting to go on vacation

@torgo torgo modified the milestones: 2021-06-28-week, 2021-07-12-week Jul 8, 2021
@torgo
Copy link
Member

torgo commented Jul 8, 2021

Thanks for the explainer @phoglenix! I've put it on the agenda for next week. @marcoscaceres what is the trajectory for manifest incubations like this? Do they eventually become manifest extensions in webapps?

@atanassov
Copy link

Hi @phoglenix we took another look at this proposal today.

I hope we have the right explainer linked above. The one you posted was already missing.

Reading through that explainer was hard to understand what the user needs are and how/why this capability will address them. Can you elaborate on these and ideally add them directly into your explainer?

@tomayac
Copy link

tomayac commented Jul 21, 2021

I tried to summarize the user benefit in a tweet. Maybe it is clearer then?

@phoglenix
Copy link
Author

Sorry, the PR for the explainer was merged into manifest-incubations. You found the correct one.

Yes, as @tomayac summarized, the user benefit is tighter (any, really) OS or UA integrations with the note-taking web app. With the current fields the UA can know "this is a note-taking app" and "this is the URL tocreate a new note in the note taking app". What they do with those fields is up to the UA, but possible examples are given at the top of the explainer: the note-taking app could be launched from keyboard shortcuts, OS buttons/tray, customisable keyboard keys, voice assistants. These launcher surfaces exist already, they just do not currently support web apps.

As a concrete example, on Chrome OS note-taking web apps will be shown in the OS stylus tools settings alongside other note-taking apps, can be selected there as the main note-taking app, and then a new note can be created from the stylus tools palette (which launches the new_note_url).

I'll update the explainer with a little more about the user needs / benefit.

phoglenix added a commit to WICG/manifest-incubations that referenced this issue Jul 23, 2021
Per comments on TAG review about lack of understanding of user needs / how this will solve them.
w3ctag/design-reviews#648
mgiuca pushed a commit to WICG/manifest-incubations that referenced this issue Jul 23, 2021
* Clarify note-taking explainer w.r.t. integration, multiple apps

Due to questions that came up on I2S email

Add more motivation to overview section, per comments on TAG review
about lack of understanding of user needs / how this will solve them.
w3ctag/design-reviews#648
@phoglenix
Copy link
Author

Hi, are you waiting on me for anything here? I have updated the explainer as mentioned above.

@kenchris
Copy link

kenchris commented Aug 17, 2021

Thanks for the explainer. Looking at the future considerations section, I am wondering whether this is flexible enough. Why does creating a new note have to result in a URL change? I could imagine a canvas app, where I would just add a graphical overlay (post it notes) on top. Could this be a global event instead where you give the options (including future ones) as part of the event details? It doesn't look like you considered this. We would like to hear your thoughts on this.

@phoglenix
Copy link
Author

The API actually serves two (closely-related) purposes: it provides a way for an app to be launched to take a note, and it provides a way for an app to declare its capability as a note-taking app. I don't think an event covers either of these two cases quite as well, or it would need to be paired with a manifest field anyway to declare these capabilities (which seems more complex and error-prone).

Launching:
Opening a URL is a natural way to launch a web app from outside the app (the UA or OS), especially as the app may not be running. An event would need to first launch the app (to the Start URL?), or perhaps find an existing app window, then fire the event at it. What if the app wants to customise this behaviour? This sounds like an entire new spec, and indeed it is: Declarative Link Capturing. I believe an app could use Declarative Link Capturing (specifically "existing-client-event" mode) to achieve the behaviour you mention (and multiple other variations) without complicating this spec.

Declaring Capabilities:
Unlike an event registration, the New Note URL is known as soon as the manifest is parsed, and relatively fixed, so it is clear to the UA when a given app is / isn't self-identifying as a note-taking app.
If new functionality is added to the New Note URL in the future, these could be added with explicit parameters or another URL declared in the manifest, which again acts as a declaration of capabilities. By contrast, an event could be very flexible with a dictionary of parameters passed in, but unless a different event listener is registered, the UA cannot know whether particular parameters are handled (which could be important, eg. take a note with text - you really don't want the extra text parameter to just be dropped).

So I believe the URL declared in the manifest is a better approach. If that sounds reasonable to you I'll update the explainer to mention these points.

@kenchris
Copy link

@phoglenix that is a lot of good content, makes a lot of sense. Do you mind to add some of this to the explainer?

@phoglenix
Copy link
Author

Will do!

phoglenix added a commit to WICG/manifest-incubations that referenced this issue Aug 19, 2021
Adding to Note-taking explainer: per [TAG review feedback](w3ctag/design-reviews#648 (comment))
- Use of Declarative Link Capturing to customise launch from URL
- Reasons for not choosing Event-based API alternative
phoglenix added a commit to WICG/manifest-incubations that referenced this issue Aug 20, 2021
Adding to Note-taking explainer: per [TAG review feedback](w3ctag/design-reviews#648 (comment))
* Use of Declarative Link Capturing to customise launch from URL
* Reasons for not choosing Event-based API alternative
* replace "Declarative Link Capturing" refs/links with "Launch Handlers"
@phoglenix
Copy link
Author

Done

@atanassov
Copy link

@kenchris and I looked at this again during our Gethen vf2f. Given that all comments and feedback has been addressed we are happy to close the review as satisfied. Thank you for working with us and good luck.

@atanassov atanassov added the Resolution: satisfied The TAG is satisfied with this design label Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: satisfied The TAG is satisfied with this design Venue: WebAppSec WG
Projects
None yet
Development

No branches or pull requests

7 participants