Hide plugin pill in Tasklist based on some condition


I have 2 custom client-side plugins which I’m adding by using ViewsProvider.registerDefaultView() .

My problem is that I want to hide one of plugin pills based on condition. For example I have 2 type of tasks (A and B) and 2 custom plugins (X and Y). I want to show X-pill on A task only and Y-pill on B task only.
Is it possible? How can I manage to do that?

Thanks in advance :slight_smile: