-
Notifications
You must be signed in to change notification settings - Fork 135
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
FDC3 for Web specification #1191
Conversation
Draft Agent agnostic fdc3 spec
✅ Deploy Preview for fdc3 canceled.
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@kemerava many thanks for the detailed review. I've resolved most of the comments for things fixed. I've left a few open for you to look at, please resolve those as well. Our branch protection will require you to post another review/confirm requested changes have been made. |
|
||
```js | ||
const desktopAgent = await getAgent({ | ||
timeoutMs: 250, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeouts are usually counted in milliseconds. Isn’t it overkill to name it timeoutMs
rather than just timeout
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Pavlo, we actually started out with timeout
but moved to timeoutMs
after review comments suggested its slightly more intuitive. I think it probably boils down to personal preference.
@@ -603,7 +613,7 @@ To find a User channel, one calls: | |||
```ts | |||
// returns an array of channels | |||
const allChannels = await fdc3.getUserChannels(); | |||
const redChannel = allChannels.find(c => c.id === 'red'); | |||
const redChannel = allChannels.find(c => c.id === "red"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be the correct example.
const redChannel = allChannels.find(c => c.id === "fdc3.channel.1");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point (match IDs to the recommended FDC3 channels). I'll implement that change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, well technically this example significantly predates this PR (and in fact the recommended channels).
To be honest, I don't think it a good example at all. If you already know the channel name (as it the case in this example) you wouldn't do this at all. Rather you would more simply do:
const redChannel = fdc3.getOrCreateChannel("fdc3.channel.1");
Frankly, I think we should replace this example and the matching one at: https://fdc3.finos.org/docs/api/ref/DesktopAgent#getuserchannels
Particularly as the use case for fdc3.getUserChannels
is not to find a specific channel, but to get the whole list to do something with.
Let me know if you're up for raising that as a separate issue (and perhaps PR), otherwise I can take care of it. It can be done quickly and without a vote as its not changing the standard, jsut improving its docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this documentation improvement can be done in-place as it doesn't affect any functionality.
@@ -2,7 +2,7 @@ | |||
"$schema": "http://json-schema.org/draft-07/schema#", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't think we're going to need this message. Would be nice to merge my PoC into @julianna-ciq 's add-on module to prove that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach that you very briefly explained to positioning the iframe from inside by first resizing it to cover the whole parent window still seems risky, likely to cause display artefacts and is likely slower to apply (requires more messaging and rendering).
We've also reviewed the current standard docs multiple times and checked the consensus of the SWG on them which we'd have to repeat if changing them significantly. We would need both a write-up and discussion of what you propose doing to change it and, personally, I don't think it worth further delaying this project to do so - no actual benefit to it has been articulated as yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, content looks good 👍
Co-authored-by: Hugh Troeger <[email protected]>
Co-authored-by: Hugh Troeger <[email protected]>
Co-authored-by: Hugh Troeger <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
resolves #896
resolves #1385
resolves #1402
This PR adds specifications and documentation related to enabling FDC3 for the web. This was based off of the committee's working doc and an initial PR (#1167) with the draft by @thorsent.
This assumes that "@finos/fdc3" will implement getAgent() and communication mechanisms to work with a Desktop Agent running in a different browser window.
The protocols were codified as "Web Connection Protocol (WCP)" for negotiating the handshake between the library and desktop agents, and "Browser Communication Protocol (BCP)" which encompasses the complete "wire protocol". The former is entirely specific to working in a Web Browser, however the latter might be reused in other implementations and hence may change name (e.g. 'The FDC3 Wire Protocol' or similar).
This documentation followed three streams:
Some changes and additions were made from the original working document:
Deep links to docs for review:
getAgent()
for gaining access to an API implementation for web apps: https://deploy-preview-1191--fdc3.netlify.app/docs/next/api/supported-platformsgetAgent()
reference docs for app implementors: https://deploy-preview-1191--fdc3.netlify.app/docs/next/api/ref/GetAgentAgentError
enumeration added for connection issues: https://deploy-preview-1191--fdc3.netlify.app/docs/next/api/ref/Errors#agenterror