Connect condition - show only on confluence page

Is there a condition that only displays a module only if a user is currently viewing a confluence page?

I’m trying to integrate a web panel module in the atl.general location to display an info banner.

I had a look at the available list of conditions and thought that viewing_content would be the most suitable but the module still appears even when viewing space settings which I don’t want. Any ideas?

Hi @rcsr ,

I’m not sure why this is not working for you. The conditions documentation is a bit terse so I’ve reached out to the Confluence Cloud team to see if they can help.

Regards,
Dugald

Many thanks. Agree that the documentation can be more thorough regarding the conditions…

1 Like

Hi @rcsr ,

I’ve produced a simple Glitch app that I think replicates the behaviour you observe. The viewing_content condition doesn’t seem to restrict the panel’s visibility to when the user is viewing a page or blog so it’s not clear what the condition relates to.

You can install the app using the descriptor URL https://dx-viewing-content-condition.glitch.me/connect.json and the source of the app is available at https://glitch.com/edit/#!/dx-viewing-content-condition?path=connect.json%3A25%3A5.

Regards,
Dugald

1 Like

@dmorrow thank you, I can reproduce it on my end too (screenshot below).

Q: Is this already being tracked internally or should I raise a bug ticket?

1 Like

Hi @rcsr,
I’ve played a little bit with this condition. In the source code I see that there is a viewMode context parameter exists for it. From the various places in the code I see that we set its value to true. However when I tried to set it in the Connect app, the panel just stops being displayed, no matter what value I set to this parameter.

It might be possible that we lost the support of this condition when Confluence updated its look and feel in the recent years.

Would appreciate if you could raise a bug ticket here: Issue Navigator - Create and track feature requests for Atlassian products.

Thanks!

2 Likes

Thanks for your help @RomanToropov. I have created CONFCLOUD-74974: The viewing_content condition does not work.

Regards,
Dugald

1 Like

Thank you @RomanToropov and @dmorrow for the help.

Interestingly, I didn’t even know that the viewing_content condition accepts the viewMode param (it’s not mentioned in the docs at all from what I can see).

Neither did I @rcsr . Hopefully the resolution of the bug also involves the documentation being improved.

1 Like