Coder Social home page Coder Social logo

Context Clearing about fdc3 HOT 6 OPEN

hellosmithy avatar hellosmithy commented on August 13, 2024 2
Context Clearing

from fdc3.

Comments (6)

kriswest avatar kriswest commented on August 13, 2024 1

@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.

hellosmithy avatar hellosmithy commented on August 13, 2024

I've updated the above proposal to reflect the discussion from the last WG

from fdc3.

kriswest avatar kriswest commented on August 13, 2024

Many thanks @hellosmithy!

from fdc3.

kriswest avatar kriswest commented on August 13, 2024

@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 to getCurrentContext will receive a null 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:

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.

robmoffat avatar robmoffat commented on August 13, 2024

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.

kriswest avatar kriswest commented on August 13, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.