Comments (6)
@hellosmithy Many thanks for the detailed write up. This was previously considered under issue #301, and has subsequently been raised as a question in a meeting at least once. Hence, I believe this is worth revisiting and I propose to do so at the May SWG meeting.
from fdc3.
I've updated the above proposal to reflect the discussion from the last WG
from fdc3.
Many thanks @hellosmithy!
from fdc3.
@hellosmithy one thing I would update in the write up:
Functionality:
- Clear the specified context type if provided, or all contexts if no type is specified
- Internal context is updated by the desktop agent
- Any subsequent joiners to the channel or calls togetCurrentContext
will receive anull
value for the cleared context type- Update all channel listeners that are subscribed to the
fdc3.nothing
context type
- If a single context is being cleared then a
subType
is provided- If all contexts are being cleared then
subType
is omitted
They wouldn't receive a null
context - rather they would:
- if working through the desktop agent API (
fdc3.joinChannel
,fdc3.addContextListener
): NOT receive the specified contexts on joining or adding a context listener - these are sent automatically if present and would no longer be present - if working through the Channel interface: NOT receive the specified contexts when calling
theChannel.getCurrentContext
- you don't receive context automatically on adding a listener via the channel interface - confusing I know!
From there this needs a PR to implement it that will touch:
- https://github.com/finos/FDC3/blob/main/src/api/Channel.ts
- https://github.com/finos/FDC3/blob/main/docs/api/ref/Channel.md
- https://github.com/finos/FDC3/blob/main/docs/api/spec.md (compliance and Context channels sections - explaining if its required for compliance and providing an overview of the capability).
- https://github.com/finos/FDC3/blob/main/schemas/context/nothing.schema.json (both docs for fdc3.nothing and Typescript type are generated from this file now so the new property needs adding here and usage explained in the description)
I'd be most happy for you to take that on ;-) although we'll need your CLA in place to merge it. Ideally, it gets done before next months SWG meeting so we can get it adopted into the 2.2 scope. If the CLa is likeloy to get in the way of that timeline, let me know and I'll see if I can help get the PR done!
from fdc3.
I really like the idea of the clearContext
method. I'm less sure about the fdc3.nothing
approach, it seems like it is a bit confusing, but I get how this could work right now rather than waiting for a new version of FDC3 to come out.
Backward Compatibility: Broadcasting fdc3.nothing with a subType allows context listeners to opt-in to receive specific contexts that have been cleared, without requiring major breaking changes to existing context listeners
So one thing that isn't really clear then is:
- is broadcasting
fdc3.nothing
with no subtype clearing all context? - would it mean something to raise an intent with
fdc3.nothing
with a subtype?
Perhaps this would be better in a specific, new context type, say fdc3.clear
?
from fdc3.
@robmoffat by 'the fdc3.nothing approach' do you mean manual broadcast of that triggering a clear? If so I think that very much optional and not something we need to do.
However, if you mean the DA broadcasting fdc3.nothing to indicate that a clear has happened, then I do think we need a form of notification and fdc3.nothing works pretty well for it. Its got few other uses (raising intents without a context) that seem semantically compatible as its just supposed to represent a lack of context.
from fdc3.
Related Issues (20)
- Client-side example mistakenly refer to wrong name "symbol" in PrivateChannel doc HOT 4
- Merge api/ref/types and api/ref/metadata pages and correct links, including from generated context docs HOT 1
- Another Duplicate Name HOT 2
- Add property to support analytics across apps HOT 3
- Standardize the representation of currency pairs by fdc3.instrument HOT 7
- Standard WG Meeting - July 25th, 2024 HOT 10
- Adding Event Listeners on Private Channel HOT 1
- Inconsistent Use of Promises HOT 3
- Bug or Inconsistency? HOT 1
- Question: AddContextListenerResponsePayload does not contain channelId HOT 2
- FDC3 monorepo HOT 2
- Use Cases and Workflows Discussion Group - 1st August 2024 HOT 5
- Make Listener.unsubscribe() async for consistency HOT 7
- Simplify Web Connection Protocol HOT 7
- IFramePositioning HOT 2
- RaiseIntentResultResponse HOT 3
- Question: resolvers / channel selectors UI HOT 5
- Spelling Error: FindIntentsByContextsResponse HOT 1
- broadcastEvent on no channel
- Adding Channel State For JoinUserChannel / AddContextListener
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fdc3.