Hey community!
I’d like to create a page in project context accessible from sidebar. I’d like my page to have “floating” (persistent) header. To achieve that, I need connect iframe to extend to parent height, but no bigger, so that scrollbar is inside my iframe.
So far I have this configuration:
"webPanels": [
{
"key": "some-key",
"url": "/my-page?projectId={project.id}&boardId={board.id}",
"location": "my-addon__my-web-item", // pointing to webitem in jira.project.sidebar.plugins.navigation
"weight": 1,
"name": {
"value": "Some name"
},
"layout": {
"width": "100%",
"height": "100%"
}
}
]
webpanel head fragment:
<script src="{{atlassian-connect-all-js-url}}" type="text/javascript"
data-options="sizeToParent:true;hideFooter:true"></script>
<script>
AJS.toInit(function($) {
$(window).resize(function() {
AP.sizeToParent(true);
});
})(AJS.$)
</script>
<div class="ac-content">
<!-- my whole content generated via react comes here -->
</div>
Unfortunately this gets my page extend beyond parent height, so that scrollbar is in parent page and not inside iframe. Any ideas what could I try next?
Bonus question:
I’m experimenting with weight both on my webItem and webPanel, but I can’t get it higher than last item in sidebar - any clues?