Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Signals MVP #1516

Merged
merged 26 commits into from Jun 19, 2019
Merged

Signals MVP #1516

merged 26 commits into from Jun 19, 2019

Conversation

lucksus
Copy link
Collaborator

@lucksus lucksus commented Jun 15, 2019

PR summary

This adds an HDK function:

hdk::emit_signal("my signal", args.into());

which will send Signal::UserSignals over the signal channel and websocket interface to the UI where it can be listened to like so:

const { onSignal } = await this.webClientConnect({url})

onSignal((msg) => {
  console.log(msg.signal) // -> { signal_type: 'User', name: 'test-signal', arguments: '{"message":"test message"}' }
})

So it is a bare-bones signal implementation without all the checks and DNA defintions that we were hinting towards in the Signals ADR.

But it should be enough to get Basic-Chat rolling with a UI that refreshes automatically and without polling :) (pinging @philipbeadle and @willemolding)

Is using some changes to Diorama to actually test if signals arrive at the interface client.

followups

  • Use this in Basic-Chat or Hylo :)
  • Implement the rest of Signals as described in the ADR which will make it possible to introspect about signals and set them up as bridges etc.

changelog

  • this is a code change that effects some consumer (e.g. zome developers) of holochain core so it is added to the CHANGELOG-UNRELEASED.md (linked above), with the format - summary of change [PR#1234](https://github.com/holochain/holochain-rust/pull/1234)

@lucksus lucksus requested review from willemolding, maackle and zippy and removed request for maackle, willemolding and zippy June 15, 2019 19:13
app_spec/test/test.js Outdated Show resolved Hide resolved
@lucksus lucksus marked this pull request as ready for review June 15, 2019 19:33
@willemolding
Copy link
Collaborator

This is amazing. So excited to play around with it.

Copy link
Member

@zippy zippy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Approving for functionality, but I notice that there's nothing in the MD Book. Can you please at least add a place-holder so that we don't forget?

@zippy zippy merged commit e4f36b3 into develop Jun 19, 2019
Copy link
Contributor

@philipbeadle philipbeadle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great in basic chat

@zippy zippy deleted the signals-mvp branch October 4, 2019 18:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants