Recent searches
No recent searches
Support App ticket_sidebar cannot use `app.collapsed` and `app.expanded` events
Posted May 02, 2023
I would like to know when an App is expanded or collapsed. According to this documentation this feature is available for Support Apps. I have a Support App (ticket_sidebar) but I see no event changes when following the documentation.
Neither of these events fire.
```
client.on('app.collapsed', () => console.log('collapsed'))
client.on('app.expanded', () => console.log('expanded'))
```
I took a look at the `zaf_sdk.min.js.` in the browser dev tools and can only see 'app.activated' as a supported event. Does that mean that 'app.collapsed' and 'app.expanded' are no longer supported?
0
5
5 comments
Tipene Hughes
I've just tested both events on my end and they are functioning as expected. Are you seeing any errors in the console that are related to the events? If not, would you mind sharing a bit more of your code so I can take a look in more detail?
Thanks!
Tipene
0
Chris Ellis
Hey folks, I'm experiencing this as well.
```
```

Debugger doesn't even run, but I am seeing "Registering event listeners" and the client which has these _messageHandlers in it.
0
Chris Ellis
I've confirmed that a console.log runs with in `app.registered` and `app.deactivated` that are defined in the same scope.
0
Omar
Hi Tipene Hughes , I see “app.expanded” and “app.collapsed” work with ticket sidebar when the app is inside the Apps window. However, when the app is pinned these do not work.
There is a note in the docs, “Note: There is no collapse state in app shortcuts. The expanded state will be true every time. When an app is pinned or unpinned, the state persists across tickets.”
Is there a workaround for a expanded/collapsed state for shortcuts/pinned apps? This would be really helpful.
Thanks!
0
Erica Girges
Can you elaborate on what it is you're trying to achieve? Are you looking to just track the app state or change it?
0