diff --git a/common/constants.js b/common/constants.js index 4e4763d4..a678c6c7 100644 --- a/common/constants.js +++ b/common/constants.js @@ -9,6 +9,7 @@ export const sizes = { intercomWidget: 60, sidebar: 416, filterNavbar: 42, + carouselMobileFooterHeight: 52, topOffset: 0, //NOTE(martina): Pushes UI down. 16 when there is a persistent announcement banner, 0 otherwise mobile: 768, diff --git a/components/core/ApplicationHeader.js b/components/core/ApplicationHeader.js index 79469910..a0877c95 100644 --- a/components/core/ApplicationHeader.js +++ b/components/core/ApplicationHeader.js @@ -160,7 +160,7 @@ export default function ApplicationHeader({ viewer, page, data, onAction, isMobi ) : ( - +
diff --git a/components/core/Upload/Popup.js b/components/core/Upload/Popup.js index 4ab93964..6c59ac6f 100644 --- a/components/core/Upload/Popup.js +++ b/components/core/Upload/Popup.js @@ -32,6 +32,12 @@ const STYLES_POPUP_WRAPPER = (theme) => css` box-shadow: ${theme.shadow.lightLarge}; `; +const STYLES_POPUP_CAROUSEL_POSITION = (theme) => css` + @media (max-width: ${theme.sizes.mobile}px) { + bottom: ${Constants.sizes.carouselMobileFooterHeight + 16}px; + } +`; + const STYLES_DISMISS_BUTTON = (theme) => css` ${Styles.BUTTON_RESET}; position: absolute; @@ -161,7 +167,7 @@ const useUploadSummary = ({ fileLoading }) => }; }, [fileLoading]); -export function Popup({ isMobile }) { +export function Popup({ page, isMobile }) { const { state: { isFinished, fileLoading }, handlers: { resetUploadState }, @@ -176,11 +182,12 @@ export function Popup({ isMobile }) { { hideUploadPopup, expandUploadSummary, collapseUploadSummary, cancelAutoCollapseOnMouseEnter }, ] = useUploadPopup({ totalFilesSummary }); + const isGlobalCarouselOpen = !!page.params.id; return ( {popupState.isVisible ? ( { +const Root = ({ children, page, data, isMobile }) => { return ( <> {children} {isMobile ? : } - + diff --git a/components/system/components/GlobalCarousel/index.js b/components/system/components/GlobalCarousel/index.js index 59d70049..ec6b270d 100644 --- a/components/system/components/GlobalCarousel/index.js +++ b/components/system/components/GlobalCarousel/index.js @@ -559,8 +559,6 @@ function CarouselHeaderMobile({ ); } -const MOBILE_FOOTER_HEIGHT = 52; - const STYLES_CAROUSEL_MOBILE_FOOTER = (theme) => css` ${Styles.HORIZONTAL_CONTAINER_CENTERED}; position: fixed; @@ -571,7 +569,7 @@ const STYLES_CAROUSEL_MOBILE_FOOTER = (theme) => css` padding: 8px 16px; border-top: 1px solid ${theme.semantic.borderGrayLight}; color: ${theme.semantic.textGrayDark}; - height: ${MOBILE_FOOTER_HEIGHT}px; + height: ${Constants.sizes.carouselMobileFooterHeight}px; background-color: ${theme.semantic.bgWhite}; @supports ((-webkit-backdrop-filter: blur(15px)) or (backdrop-filter: blur(15px))) { @@ -623,7 +621,7 @@ function CarouselFooterMobile({ file, onAction, external, isOwner, data, viewer {isEditInfoVisible && (