amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Let viewer tell runtime if it has capability for "cid" storage

Open lannka opened this issue 10 years ago • 14 comments

When iframed, right now the runtime blindly assume the viewer can persist cid for it, which might not be true. Ideally, runtime should communicate with viewer via the hasCapability API, which requires viewer to write the URL fragment accordingly.

@dvoytenko

lannka avatar Aug 10 '16 22:08 lannka

@lannka Can you drop this into a milestone? "Current" (working on now), "Next" (soon), or "Backlog" (future)

rudygalfi avatar Aug 10 '16 23:08 rudygalfi

/cc @ericfs Could you please confirm you currently include #cid=1 in viewer params?

dvoytenko avatar Aug 12 '16 00:08 dvoytenko

Yes, we always set #cid=1. We do not set a cap param.

ericfs avatar Aug 12 '16 12:08 ericfs

@ericfs thanks for confirming. @dvoytenko and I were discussing should we migrate it to the cap param. Your thoughts?

Also, is this piece of code shared with other viewer (news viewer)? If not, who should be contact?

lannka avatar Aug 12 '16 16:08 lannka

I am completely unfamiliar with cap. I didn't know it existed so presumably nothing is using it now? Why do you prefer it, because it's more compact?

Other viewers are using cid=1, but I don't know github the right github usernames. I sent an email instead.

ericfs avatar Aug 12 '16 17:08 ericfs

The cap param was introduced recently in #3711 for runtime to check if the viewer supports "a2a". Is this "a2a" support already implemented in viewer?

We think it's a good pattern to follow. It's compact and more organized.

lannka avatar Aug 12 '16 17:08 lannka

No, the viewer hasn't implemented a2a and it never sets cap. We could definitely migrate to using it, but we should decide what else needs to be moved such as dialog and history.

ericfs avatar Aug 12 '16 17:08 ericfs

@dvoytenko thoughts about dialog and history?

lannka avatar Aug 12 '16 17:08 lannka

Full list that I am aware of: cid csi (should be renamed) dialog development history log p2r signin storage webview

Those are all boolean, but I'm not sure if they all make sense in cap or not.

ericfs avatar Aug 12 '16 17:08 ericfs

@ericfs @lannka

Yes, most of these (but not all) will eventually be moved to cap. I'll file an internal bug first when we are ready.

dvoytenko avatar Aug 15 '16 17:08 dvoytenko

Good, shall we start to migrate? The migration can start at viewer side, by providing them in both places. Once deployed in all viewers, and then runtime can have a simple switch.

@dvoytenko Do we have any doc explaining those items?

lannka avatar Aug 16 '16 16:08 lannka

Not yet. I will create.

dvoytenko avatar Aug 17 '16 02:08 dvoytenko

@chenshay since you're making the open source viewer, is this something in your scope?

lannka avatar Jun 02 '17 20:06 lannka

this is introduced in latest Search Viewer

lannka avatar Aug 04 '17 15:08 lannka