We're seeing an issue with the Twitch extension JS helper. Specifically, the .onContext event. When an extension is activated as a Component and we click the gear icon to go to the config page, that event never fires. We've seen the expected behavior work when an extension is set as a Panel and the gear icon is clicked, that event fires and the context.mode is 'config'.
How to reproduce
In your extension logic, listen for the Twitch.ext.onContext event
On the /extension/manage page, set your extension as a Component.
Click the gear icon.
The event from step 1 will never fire
Expected behavior
onContext event should trigger. This behavior does work when the extension is set as a Panel. The event will trigger as expected. It's only when the extension is set as a Component.
Screenshots
Expected context object - as seen when the extension is set as a Panel:
Additional context or questions
Our extensions routing is based off of what the context object returns to us. i.e. if context.mode = 'config', we route to and display the config page. The above scenario is breaking our first time user setup flow when they install the extension as a Component.
Brief description
Environment: Hosted Test
We're seeing an issue with the Twitch extension JS helper. Specifically, the .onContext event. When an extension is activated as a Component and we click the gear icon to go to the config page, that event never fires. We've seen the expected behavior work when an extension is set as a Panel and the gear icon is clicked, that event fires and the
context.mode
is'config'
.How to reproduce
Twitch.ext.onContext
eventTwitch.ext.onContext((context: Partial<Twitch.ext.Context>) => { console.log(context) });
Expected behavior
onContext event should trigger. This behavior does work when the extension is set as a Panel. The event will trigger as expected. It's only when the extension is set as a Component.
Screenshots Expected context object - as seen when the extension is set as a Panel:
Additional context or questions
Our extensions routing is based off of what the context object returns to us. i.e. if
context.mode = 'config'
, we route to and display the config page. The above scenario is breaking our first time user setup flow when they install the extension as a Component.