Issue displayed in Modal, Sidebar or Full Page view. How to know?

Hi, community

I’m trying to get the information on my Forge issuePanel module somehow if it’s currently displayed on the Modal, Sidepanel or Fullscreen version.

Potential options?
From my perspective, it could be defined in one of the following ways:

  1. Checking the current page URL
  2. Some flag on FullContext or any other parameter from view, or some method from the router (@forge/bridge).
  3. Somehow calculate the real displayed width of my components and compare them to expected values on the modal/fullscreen view

But, I couldn’t find a way to get any of this info from my app. It’s impossible, or am I missing something?

Why do I need it?
The modal view has a limitation to its max width, and for my app with many elements to display it appears to be not the best User Experience in this case (still workable anyway). I want to show some hint to the user with the “For better Experience - open issue in fullscreen view - button with redirect link” text.

But, without getting info about the current issue view state - impossible to implement.

If anyone has ever solved a similar task - would be glad for knowledge sharing. Or a question to @AtlassianSupport

Hey @kapitonik,

I’m not sure of how you would solve this, particularly in UI Kit apps I don’t think there is a solution.

I had a look over at the Forge project on ecosystem.atlassian.net and it doesn’t look like there’s an existing suggestion for this functionality.

You should be able to create a suggestion ticket over there for this functionality so that it can be considered by the Forge team.

Cheers!
Mel

1 Like