Let viewer tell runtime if it has capability for "cid" storage
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 Can you drop this into a milestone? "Current" (working on now), "Next" (soon), or "Backlog" (future)
/cc @ericfs Could you please confirm you currently include #cid=1 in viewer params?
Yes, we always set #cid=1. We do not set a cap param.
@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?
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.
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.
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.
@dvoytenko thoughts about dialog and history?
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 @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.
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?
Not yet. I will create.
@chenshay since you're making the open source viewer, is this something in your scope?
this is introduced in latest Search Viewer