Add option to make fileviewer height fill remaining height

Issue #17089 resolved
Seppe Stas created an issue

When adding a fileviewer module the height of the iframe for the fileviewer is sized to fit the content, not to fill the remaining space on the page. This works well for e.g text based viewers, but for graphical viewers, especially those utilizing zooming, sizing to take up all available space makes a lot more sense.

It would be very useful to have the module tell Bitbucket whether the iFrame should fit the content or fill the remaining space.

E.g I am working on a file viewer for PCB CAD files. These CAD files are typically big (mostly landscape A4 format) and thus the fileviewer allows to pan and zoom these files and the viewbox takes all available space. However, since Bitbucket sets the height of the iframe for the viewer to fit it's contents, the iframe is only as big as the fixed-height menu items, making the fileviewer pretty much useless:

Screen Shot 2018-09-03 at 00.46.15.png

The only way to currently fix this is to set a fixed height to the viewbox, either resulting in unused space or extra scrollbars negatively impacting usability, or coming up with a complicated workaround to detect the maximum height impacting performance.

Comments (5)

  1. Seppe Stas reporter

    It looks like this is solved by configuring the Javascript API, however this causes the iframe to be too high. See #17109.

  2. Log in to comment