Skip to content

feat: Add pub/sub support [AP-58]#537

Merged
dougmartin merged 3 commits intomasterfrom
AP-58-add-pub-sub-support
Dec 24, 2025
Merged

feat: Add pub/sub support [AP-58]#537
dougmartin merged 3 commits intomasterfrom
AP-58-add-pub-sub-support

Conversation

@dougmartin
Copy link
Member

This commit introduces a publish-subscribe (pub/sub) mechanism to facilitate communication between managed interactives within the Activity Player. The PubSubManager class handles the creation of channels, publishing messages, and managing subscriptions.

This commit introduces a publish-subscribe (pub/sub) mechanism to
facilitate communication between managed interactives within the
Activity Player. The PubSubManager class handles the creation of
channels, publishing messages, and managing subscriptions.
@dougmartin dougmartin requested a review from scytacki December 23, 2025 13:42
Copy link
Member

@scytacki scytacki left a comment

Choose a reason for hiding this comment

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

Any reason this is limited to managed interactives? It seems like it could work for interactives that are setup directly by authors too. I didn't look at the code carefully though, perhaps the managed interactive class is used by the other interactives too.

@cypress
Copy link

cypress bot commented Dec 24, 2025

activity-player    Run #1857

Run Properties:  status check passed Passed #1857  •  git commit a8da8a2cc0: Added PubSubManager mock to test
Project activity-player
Branch Review AP-58-add-pub-sub-support
Run status status check passed Passed #1857
Run duration 05m 12s
Commit git commit a8da8a2cc0: Added PubSubManager mock to test
Committer Doug Martin
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 96
View all changes introduced in this branch ↗︎

@dougmartin
Copy link
Member Author

Any reason this is limited to managed interactives? It seems like it could work for interactives that are setup directly by authors too. I didn't look at the code carefully though, perhaps the managed interactive class is used by the other interactives too.

It is used for both managed and MWInteractives. You can see that here:

https://github.com/concord-consortium/activity-player/blob/master/src/components/activity-page/embeddable.tsx#L95-L107

@dougmartin dougmartin merged commit 441d09b into master Dec 24, 2025
6 checks passed
@dougmartin dougmartin deleted the AP-58-add-pub-sub-support branch December 24, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants