最近の検索


最近の検索はありません

Support App ticket_sidebar cannot use `app.collapsed` and `app.expanded` events



投稿日時:2023年5月02日

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件のコメント

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hey, Greg!

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


Hey folks, I'm experiencing this as well. 

```

console.log('Registering event listeners',client);
client.on('app.expanded',function(){
debugger;
console.log('app.expanded');
});

client.on('app.collapsed',function(){
console.log('app.collapsed');
});

```

Debugger doesn't even run, but I am seeing "Registering event listeners" and the client which has these _messageHandlers in it.


0


I've confirmed that a console.log runs with in `app.registered` and `app.deactivated` that are defined in the same scope.

0


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


image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Omar, 
 
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


サインインしてコメントを残してください。

お探しのものが見つかりませんか?

新規投稿