From bfb0ae7a89d228f70699d5bcf0d141e42b78f8ca Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Fri, 20 Sep 2024 08:28:52 -0400 Subject: [PATCH] refactor: remove tailwind gray styles and update zoom controls Signed-off-by: Adam Setch --- src/components/AllRead.tsx | 2 +- src/components/NotificationRow.tsx | 2 +- .../AccountNotifications.test.tsx.snap | 20 +- .../__snapshots__/AllRead.test.tsx.snap | 4 +- .../NotificationRow.test.tsx.snap | 8 +- .../settings/AppearanceSettings.tsx | 100 ++++---- src/components/settings/SettingsFooter.tsx | 2 +- src/electron/index.html | 20 +- src/routes/Accounts.tsx | 2 +- src/routes/Filters.tsx | 2 +- .../__snapshots__/Accounts.test.tsx.snap | 2 +- .../__snapshots__/Filters.test.tsx.snap | 4 +- .../__snapshots__/Settings.test.tsx.snap | 234 +++++++++--------- tailwind.config.js | 7 - 14 files changed, 195 insertions(+), 214 deletions(-) diff --git a/src/components/AllRead.tsx b/src/components/AllRead.tsx index 206c31c..5d785cc 100644 --- a/src/components/AllRead.tsx +++ b/src/components/AllRead.tsx @@ -12,7 +12,7 @@ export const AllRead: FC = () => { ); return ( -
+
diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index e1802a9..ddbf864 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -55,7 +55,7 @@ export const NotificationRow: FC = ({
, "container":
, "container":
, "container":
{ options={themeOptions} defaultValue={settings.theme} value={settings.theme} - isDisabled={true} + // isDisabled={true} onChange={(evt) => { updateSetting('theme', evt.target.value as Theme); }} @@ -70,53 +71,56 @@ export const AppearanceSettings: FC = () => { /> -
- - - - zoomPercentage > 0 && - webFrame.setZoomLevel(zoomPercentageToLevel(zoomPercentage - 10)) - } - testId="settings-zoom-out" - /> - - - {zoomPercentage.toFixed(0)}% - - - - zoomPercentage < 120 && - webFrame.setZoomLevel(zoomPercentageToLevel(zoomPercentage + 10)) - } - testId="settings-zoom-in" - /> - - - webFrame.setZoomLevel(0)} - testId="settings-zoom-reset" - /> - -
+ + + + + zoomPercentage > 0 && + webFrame.setZoomLevel( + zoomPercentageToLevel(zoomPercentage - 10), + ) + } + testId="settings-zoom-out" + /> + + {zoomPercentage.toFixed(0)}% + + + zoomPercentage < 120 && + webFrame.setZoomLevel( + zoomPercentageToLevel(zoomPercentage + 10), + ) + } + testId="settings-zoom-in" + /> + + + ( + + )} + shape="circle" + spacing="compact" + onClick={() => webFrame.setZoomLevel(0)} + testId="settings-zoom-reset" + /> + + + ); }; diff --git a/src/components/settings/SettingsFooter.tsx b/src/components/settings/SettingsFooter.tsx index f2b6a9a..4c52edc 100644 --- a/src/components/settings/SettingsFooter.tsx +++ b/src/components/settings/SettingsFooter.tsx @@ -26,7 +26,7 @@ export const SettingsFooter: FC = () => { }, []); return ( -
+
diff --git a/src/electron/index.html b/src/electron/index.html index 7126ab1..57c1c91 100644 --- a/src/electron/index.html +++ b/src/electron/index.html @@ -9,10 +9,7 @@ -
+
@@ -42,21 +39,6 @@ border-radius: 10px; } - html.dark::-webkit-scrollbar-track, - html.dark div.flex-grow::-webkit-scrollbar-track { - background-color: #090e15; - } - - html.dark::-webkit-scrollbar-thumb, - html.dark div.flex-grow::-webkit-scrollbar-thumb { - background-color: #24292e; - } - - html.dark::-webkit-scrollbar-thumb:hover, - html.dark div.flex-grow::-webkit-scrollbar-thumb:hover { - background-color: #3a3f44; - } - body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", diff --git a/src/routes/Accounts.tsx b/src/routes/Accounts.tsx index 41a120c..f4099ee 100644 --- a/src/routes/Accounts.tsx +++ b/src/routes/Accounts.tsx @@ -129,7 +129,7 @@ export const AccountsRoute: FC = () => {
-
+
diff --git a/src/routes/Filters.tsx b/src/routes/Filters.tsx index adfc463..b841c7f 100644 --- a/src/routes/Filters.tsx +++ b/src/routes/Filters.tsx @@ -182,7 +182,7 @@ export const FiltersRoute: FC = () => {
-
+
diff --git a/src/routes/__snapshots__/Accounts.test.tsx.snap b/src/routes/__snapshots__/Accounts.test.tsx.snap index 6566866..aefa818 100644 --- a/src/routes/__snapshots__/Accounts.test.tsx.snap +++ b/src/routes/__snapshots__/Accounts.test.tsx.snap @@ -262,7 +262,7 @@ exports[`routes/Accounts.tsx General should render itself & its children 1`] = `
- + - - 100 - % - -
-
+ - - - Zoom In - + 100 + % - -
-
- +
+
+ + +
@@ -891,7 +893,7 @@ exports[`routes/Settings.tsx should render itself & its children 1`] = `