From 04ff8eca4c420420a69feca6d6427639a456b3c1 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 27 Dec 2022 01:44:41 +0800 Subject: [PATCH 1/5] Make modal backdrop appear nicely I probably created too many similar keyframes --- src/components/loader.css | 10 +--------- src/components/modal.css | 1 + src/index.css | 9 +++++++++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/loader.css b/src/components/loader.css index 09f827b7..dd327cb4 100644 --- a/src/components/loader.css +++ b/src/components/loader.css @@ -3,18 +3,10 @@ width: 16px; height: 16px; pointer-events: none; - animation: slow-appear 0.3s ease-in-out 1s both; + animation: appear 0.3s ease-in-out 1s both; vertical-align: middle; margin: 8px; } -@keyframes slow-appear { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} .loader-container.abrupt { animation: none; } diff --git a/src/components/modal.css b/src/components/modal.css index 53b1fb26..406e68da 100644 --- a/src/components/modal.css +++ b/src/components/modal.css @@ -10,6 +10,7 @@ align-items: center; background-color: var(--backdrop-color); backdrop-filter: blur(24px); + animation: appear 0.5s var(--timing-function) both; } #modal-container > .light { diff --git a/src/index.css b/src/index.css index 635a46ea..8c01e487 100644 --- a/src/index.css +++ b/src/index.css @@ -267,6 +267,15 @@ code { /* KEYFRAMES */ +@keyframes appear { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + @keyframes fade-in { from { opacity: 0; From f7489710a1030586d6e38f396d92504b4ca2695a Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 27 Dec 2022 08:52:01 +0800 Subject: [PATCH 2/5] Temporary fix for corrupted data --- src/components/compose.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 06b277f2..e032fc62 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -67,8 +67,11 @@ function Compose({ console.log(config); return config; } catch (e) { - alert('Failed to load instance configuration. Please try again.'); console.error(e); + alert('Failed to load instance configuration. Please try again.'); + // Temporary fix for corrupted data + store.local.del('instances'); + location.reload(); return {}; } }, []); From fb88129ae72c694f4974324ca449b26c39c70d13 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 27 Dec 2022 09:05:45 +0800 Subject: [PATCH 3/5] Check for ref before access scrollTop --- src/pages/status.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/status.jsx b/src/pages/status.jsx index fe7cdacc..33846f5c 100644 --- a/src/pages/status.jsx +++ b/src/pages/status.jsx @@ -36,6 +36,7 @@ function StatusPage({ id }) { useEffect(() => { const onScroll = debounce(() => { // console.log('onScroll'); + if (!scrollableRef.current) return; const { scrollTop } = scrollableRef.current; states.scrollPositions.set(id, scrollTop); }, 100); From c006a791b93646e46f4689426a7fea3f8bf981f7 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 27 Dec 2022 09:05:54 +0800 Subject: [PATCH 4/5] Comment out log --- src/app.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.jsx b/src/app.jsx index 9e1d2c49..cfe88e54 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -243,7 +243,7 @@ export function App() { const mastoAccount = await masto.v1.accounts.verifyCredentials(); - console.log({ tokenJSON, mastoAccount }); + // console.log({ tokenJSON, mastoAccount }); let account = accounts.find((a) => a.info.id === mastoAccount.id); if (account) { From 97e214cec7cea88835feb0327944a56c32b04c3b Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 27 Dec 2022 09:46:25 +0800 Subject: [PATCH 5/5] Possible fix for mask-image? --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8c031daf..c389db54 100644 --- a/package.json +++ b/package.json @@ -45,5 +45,9 @@ "postcss-dark-theme-class": {}, "autoprefixer": {} } - } + }, + "browserslist": [ + "defaults", + "android >= 4" + ] }