After enabling allowDownload={true} on <limel-file-viewer> (BB PR #1432), two visual problems surfaced:
Problem 1: Toolbar buttons overlap with consumer-positioned UI
.buttons in file-viewer/partial-styles/ui-controls.scss is position: absolute; top: 0.25rem; right: 0.25rem. Any consumer that places its own controls in the top-right (e.g. limebb-summary-popover puts its close button at top: 0.125rem; right: 0.125rem) will collide. With more allow* flags enabled, more buttons stack down and the collision area grows.
There's no CSS ::part exposed on .buttons and no CSS variable for offset, so consumers can't reposition the toolbar.
Problem 2: Duplicate download button in renderText / renderEmail fallback
renderText (file-viewer.tsx:265-274) and renderEmail (file-viewer.tsx:276-291) render renderButtons() (the toolbar) AND wrap their <object> / <limel-email-viewer> with renderNoFileSupportMessage() as fallback. That message has its own inline download button (file-viewer.tsx:343). When the embedded view fails to render natively (observed for .json blob URLs in Chrome), both render → two download buttons.
Related
After enabling
allowDownload={true}on<limel-file-viewer>(BB PR #1432), two visual problems surfaced:Problem 1: Toolbar buttons overlap with consumer-positioned UI
.buttonsinfile-viewer/partial-styles/ui-controls.scssisposition: absolute; top: 0.25rem; right: 0.25rem. Any consumer that places its own controls in the top-right (e.g.limebb-summary-popoverputs its close button attop: 0.125rem; right: 0.125rem) will collide. With moreallow*flags enabled, more buttons stack down and the collision area grows.There's no CSS
::partexposed on.buttonsand no CSS variable for offset, so consumers can't reposition the toolbar.Problem 2: Duplicate download button in renderText / renderEmail fallback
renderText(file-viewer.tsx:265-274) andrenderEmail(file-viewer.tsx:276-291) renderrenderButtons()(the toolbar) AND wrap their<object>/<limel-email-viewer>withrenderNoFileSupportMessage()as fallback. That message has its own inline download button (file-viewer.tsx:343). When the embedded view fails to render natively (observed for.jsonblob URLs in Chrome), both render → two download buttons.Related
limebb-summary-popovervialimebb-document-chips, which now renders attachment previews in the email composer.