From bf9a2af2928d12e2c3c09b2432d6a64f4aeb5048 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Fri, 4 Feb 2022 17:31:40 +0530 Subject: [PATCH 1/5] drop hash while sending log to sentry --- sentry.client.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sentry.client.config.js b/sentry.client.config.js index 8d85c07d9..34ad71aa9 100644 --- a/sentry.client.config.js +++ b/sentry.client.config.js @@ -22,6 +22,13 @@ Sentry.init({ attachStacktrace: true, autoSessionTracking: false, tunnel: getSentryTunnelURL(), + beforeSend(event) { + event.request = event.request || {}; + const currentURL = new URL(document.location.href); + currentURL.hash = ''; + event.request.url = currentURL; + return event; + }, // ... // Note: if you want to override the automatic release value, do not set a // `release` value here - use the environment variable `SENTRY_RELEASE`, so From 09a4be46fda6347298655abec3a0daff3492c630 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Fri, 4 Feb 2022 17:41:42 +0530 Subject: [PATCH 2/5] fix footer positioning issue --- src/components/PhotoList.tsx | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/PhotoList.tsx b/src/components/PhotoList.tsx index 72e239e39..e60ea715e 100644 --- a/src/components/PhotoList.tsx +++ b/src/components/PhotoList.tsx @@ -17,6 +17,7 @@ import { getVariantColor, ButtonVariant } from './pages/gallery/LinkButton'; const A_DAY = 24 * 60 * 60 * 1000; const NO_OF_PAGES = 2; +const FOOTER_HEIGHT = 90; enum ITEM_TYPE { TIME = 'TIME', @@ -84,7 +85,11 @@ const DateContainer = styled.div<{ span: number }>` height: ${DATE_CONTAINER_HEIGHT}px; `; -const BannerContainer = styled.div<{ span: number }>` +const FooterContainer = styled.div<{ span: number }>` + font-size: 14px; + @media (max-width: 540px) { + font-size: 12px; + } color: #979797; text-align: center; grid-column: span ${(props) => props.span}; @@ -94,10 +99,6 @@ const BannerContainer = styled.div<{ span: number }>` & > p { margin: 0; } - margin: 1rem 0; -`; - -const AlbumsFooterContainer = styled(BannerContainer)` margin: calc(2rem + 20px) 0 1rem 0; `; @@ -254,7 +255,7 @@ export function PhotoList({ const getCurrentItemSize = getItemSize(timeStampList); for (let i = 0; i < timeStampList.length; i++) { sum += getCurrentItemSize(i); - if (height - sum <= 70) { + if (height - sum <= FOOTER_HEIGHT) { break; } } @@ -263,16 +264,16 @@ export function PhotoList({ return { itemType: ITEM_TYPE.OTHER, item: <>, - height: Math.max(height - photoFrameHeight - 70, 0), + height: Math.max(height - photoFrameHeight - FOOTER_HEIGHT, 0), }; }; const getAppDownloadFooter = () => { return { itemType: ITEM_TYPE.OTHER, item: ( - +

{constants.INSTALL_MOBILE_APP()}

-
+ ), }; }; @@ -281,7 +282,7 @@ export function PhotoList({ return { itemType: ITEM_TYPE.OTHER, item: ( - +

{constants.PRESERVED_BY}{' '}

-
+ ), }; }; From a4681fa7b50cc069eff213fde2d9190317a70b01 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Fri, 4 Feb 2022 17:45:59 +0530 Subject: [PATCH 3/5] fix overscrolling photoframe --- src/components/PhotoList.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/PhotoList.tsx b/src/components/PhotoList.tsx index e60ea715e..5886acff3 100644 --- a/src/components/PhotoList.tsx +++ b/src/components/PhotoList.tsx @@ -270,6 +270,7 @@ export function PhotoList({ const getAppDownloadFooter = () => { return { itemType: ITEM_TYPE.OTHER, + height: FOOTER_HEIGHT, item: (

{constants.INSTALL_MOBILE_APP()}

@@ -281,6 +282,7 @@ export function PhotoList({ const getAlbumsFooter = () => { return { itemType: ITEM_TYPE.OTHER, + height: FOOTER_HEIGHT, item: (

From f361ad516be43a9bb65207d453c68c545ae0b938 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Fri, 4 Feb 2022 19:18:50 +0530 Subject: [PATCH 4/5] log cache response --- src/services/publicCollectionDownloadManager.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/publicCollectionDownloadManager.ts b/src/services/publicCollectionDownloadManager.ts index 757059e73..6f083b55d 100644 --- a/src/services/publicCollectionDownloadManager.ts +++ b/src/services/publicCollectionDownloadManager.ts @@ -37,6 +37,7 @@ class PublicCollectionDownloadManager { const cacheResp: Response = await thumbnailCache?.match( file.id.toString() ); + console.log(cacheResp); if (cacheResp) { return URL.createObjectURL(await cacheResp.blob()); } From fdd06b1ece22400c18288e22a7ba5791acdcf8d7 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Fri, 4 Feb 2022 19:44:25 +0530 Subject: [PATCH 5/5] add album meta description for alubms domain --- src/pages/_app.tsx | 9 +++++++++ src/pages/_document.tsx | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 8ba8808a3..08a981ad8 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -659,6 +659,15 @@ export default function App({ Component, err }) { <> {constants.TITLE} + {typeof window !== 'undefined' && + window.location.host === getAlbumSiteHost() ? ( + + ) : ( + + )} {showNavbar && ( diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 44773354b..c49b46ae1 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -33,10 +33,6 @@ export default class MyDocument extends Document { return ( -