Skip to content

Commit

Permalink
Merge pull request #324 from bento-platform/fix/spreadsheet-view
Browse files Browse the repository at this point in the history
fix: file view modal display for wide content (e.g., spreadsheets)
  • Loading branch information
davidlougheed authored Nov 2, 2023
2 parents e2b45ad + 1bf1b59 commit 5d0ed27
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bento_web",
"version": "3.2.1",
"version": "3.2.2",
"description": "Bento platform front-end",
"main": "src/index.js",
"dependencies": {
Expand Down
8 changes: 6 additions & 2 deletions src/components/display/FileModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ const FileModal = ({ title, visible, onCancel, hasTriggered, url, fileName, load
title={title}
visible={visible}
onCancel={onCancel}
width={1080}
width={1180}
style={{
// the flex display allows items which are less wide (e.g., portrait PDFs) to have a narrower modal
display: "flex",
justifyContent: "center",
alignItems: "center",
top: 50, // down from default of 100; gives a bit more screen real estate
}}
bodyStyle={{ minWidth: "692px" }}
bodyStyle={{
minWidth: "692px",
maxWidth: "1180px", // needed, otherwise this ends up being more than the parent width for some reason
}}
footer={null}
// destroyOnClose in order to stop audio/video from playing & avoid memory leaks at the cost of re-fetching:
destroyOnClose={true}
Expand Down
2 changes: 1 addition & 1 deletion src/components/manager/ManagerDropBoxContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const DROP_BOX_ACTION_CONTAINER_STYLE = {
position: "sticky",
paddingBottom: 4,
backgroundColor: "white",
boxShadow: "0 12px 12px white, 0 -10px 0 white",
boxShadow: "0 10px 10px white, 0 -10px 0 white",
top: 8,
zIndex: 10,
};
Expand Down

0 comments on commit 5d0ed27

Please sign in to comment.