From c2cdbe76f1509329e4b21e1669b3fe91067b1fe3 Mon Sep 17 00:00:00 2001 From: Muhammed Rahif Date: Thu, 30 Mar 2023 09:01:54 +0530 Subject: [PATCH 1/4] feat(ui): update ionic to v7 --- package.json | 4 ++-- yarn.lock | 53 ++++++++++++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 680dcfa..c0ddf3e 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "@capacitor/ios": "4.7.1", "@capacitor/keyboard": "4.1.1", "@capacitor/status-bar": "4.1.1", - "@ionic/react": "^6.7.0", - "@ionic/react-router": "^6.7.0", + "@ionic/react": "^7.0.0-rc.5", + "@ionic/react-router": "^7.0.0-rc.5", "@tanstack/react-query": "^4.27.0", "@tanstack/react-query-devtools": "^4.27.0", "@testing-library/jest-dom": "^5.11.9", diff --git a/yarn.lock b/yarn.lock index 6c1f8f2..7170aa4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1251,30 +1251,30 @@ debug "^4.0.0" tslib "^2.0.1" -"@ionic/core@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@ionic/core/-/core-6.7.0.tgz#9972c27b15c611a67fb321883038b6538f65fc6b" - integrity sha512-PAwqiH3daFN9R70EoIyX0UJ3Aa6MA8BWqU6x2IKiomyutvQkNvBO15zaAQrlH9XXeaDu9GzjC2qn7Jjzf5POQw== +"@ionic/core@7.0.0-rc.5": + version "7.0.0-rc.5" + resolved "https://registry.yarnpkg.com/@ionic/core/-/core-7.0.0-rc.5.tgz#d24c5eb0c35e10dfa85c47dddba068b019f7db2d" + integrity sha512-c8st2bhM+mlauv2/1Xm++cZIoAXG5mEK2LA+HbO5RAUI6045k/GbXsVbpDyGI0HtrOvOq8+IyCH5i+AdwqzyWQ== dependencies: - "@stencil/core" "^2.18.0" - ionicons "^6.1.3" + "@stencil/core" "^3.1.0" + ionicons "^7.1.0" tslib "^2.1.0" -"@ionic/react-router@^6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@ionic/react-router/-/react-router-6.7.0.tgz#5614e433eb5f3670c7d461b4a9c0785091c0dc2d" - integrity sha512-QUm24h9Ja3JWj7Dwz8LBCwQSsL2phNXN/DY7KDA1jZICJBJHTDtgMqLTR1qLgXqMCwOWbKUJaeXEP+Z018T77Q== +"@ionic/react-router@^7.0.0-rc.5": + version "7.0.0-rc.5" + resolved "https://registry.yarnpkg.com/@ionic/react-router/-/react-router-7.0.0-rc.5.tgz#89d7c7865ee53e58fc0eaeaec5713737ed6e91f9" + integrity sha512-3VBpXjFEtpXQSTQL27gpd5yWuHdbfY6k3BpBYrHH6dPX+E/sT80/Y2AMD/uayLQHVit9rrBQ0WO2O/rziVlh0w== dependencies: - "@ionic/react" "6.7.0" + "@ionic/react" "7.0.0-rc.5" tslib "*" -"@ionic/react@6.7.0", "@ionic/react@^6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@ionic/react/-/react-6.7.0.tgz#5a35689e7c70f0da4be310bde108d5f8548b9bf4" - integrity sha512-UpSNO4F3Mw0+T0liz/2fdEciPZXOvnqurZYfT5yUjY6iOzKfrWQ5eEYv9WfUONE8UfJiWeoBnGhAHSS7Cu2yhA== +"@ionic/react@7.0.0-rc.5", "@ionic/react@^7.0.0-rc.5": + version "7.0.0-rc.5" + resolved "https://registry.yarnpkg.com/@ionic/react/-/react-7.0.0-rc.5.tgz#2b7e54fb67c959c2cc840342dbcd8bbbde2c34de" + integrity sha512-D6PWjKEyboG9yTGjJ4kw92fECd0cZXLv0suraTp7Lg8nS4BGwthTxHq+xqJePEXZqMcoCCqgFrwDpS4bCXCDkw== dependencies: - "@ionic/core" "6.7.0" - ionicons "^6.1.3" + "@ionic/core" "7.0.0-rc.5" + ionicons "^7.0.0" tslib "*" "@ionic/utils-array@2.1.5", "@ionic/utils-array@^2.1.5": @@ -2103,6 +2103,11 @@ resolved "https://registry.yarnpkg.com/@stencil/core/-/core-2.22.3.tgz#83987e20bba855c450f6d6780e3a20192603f13f" integrity sha512-kmVA0M/HojwsfkeHsifvHVIYe4l5tin7J5+DLgtl8h6WWfiMClND5K3ifCXXI2ETDNKiEk21p6jql3Fx9o2rng== +"@stencil/core@^3.1.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@stencil/core/-/core-3.2.0.tgz#be869b68bbe588d33fe3109c5aea08fda6de761e" + integrity sha512-vAZiHg4h6hZn4GP6P4w/d7qJwovW0xroitVAn/Ay0rUOeMHqMDYTX5jq0Vy/bgKactKam5WL/to50esGe6lDUQ== + "@surma/rollup-plugin-off-main-thread@^2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz#ee34985952ca21558ab0d952f00298ad2190c053" @@ -5518,13 +5523,6 @@ into-stream@^6.0.0: from2 "^2.3.0" p-is-promise "^3.0.0" -ionicons@^6.1.3: - version "6.1.3" - resolved "https://registry.yarnpkg.com/ionicons/-/ionicons-6.1.3.tgz#32ce7dd0ed00bb71a9df612501745ad0d2e5d2df" - integrity sha512-ptzz38dd/Yq+PgjhXegh7yhb/SLIk1bvL9vQDtLv1aoSc7alO6mX2DIMgcKYzt9vrNWkRu1f9Jr78zIFFyOXqw== - dependencies: - "@stencil/core" "^2.18.0" - ionicons@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/ionicons/-/ionicons-7.0.0.tgz#7597e4954a00facac928809cde162d80d3d9427d" @@ -5532,6 +5530,13 @@ ionicons@^7.0.0: dependencies: "@stencil/core" "^2.18.0" +ionicons@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/ionicons/-/ionicons-7.1.0.tgz#25daa91345acedcb0f4fb7da670f5aff2e1f266a" + integrity sha512-iE4GuEdEHARJpp0sWL7WJZCzNCf5VxpNRhAjW0fLnZPnNL5qZOJUcfup2Z2Ty7Jk8Q5hacrHfGEB1lCwOdXqGg== + dependencies: + "@stencil/core" "^2.18.0" + ip-regex@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" From c5da2a8517a654eac8a30b1d4f6e8d4d4b0a0ed5 Mon Sep 17 00:00:00 2001 From: Muhammed Rahif Date: Thu, 30 Mar 2023 09:26:25 +0530 Subject: [PATCH 2/4] fix(settings): change theme select option to dark mode toggle btn --- package.json | 4 +-- .../settings/components/GeneralSettings.tsx | 19 +++++-------- yarn.lock | 28 +++++++++---------- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index c0ddf3e..3df2184 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "@capacitor/ios": "4.7.1", "@capacitor/keyboard": "4.1.1", "@capacitor/status-bar": "4.1.1", - "@ionic/react": "^7.0.0-rc.5", - "@ionic/react-router": "^7.0.0-rc.5", + "@ionic/react": "^7.0.0", + "@ionic/react-router": "^7.0.0", "@tanstack/react-query": "^4.27.0", "@tanstack/react-query-devtools": "^4.27.0", "@testing-library/jest-dom": "^5.11.9", diff --git a/src/features/settings/components/GeneralSettings.tsx b/src/features/settings/components/GeneralSettings.tsx index d8d1b6e..e4735cb 100644 --- a/src/features/settings/components/GeneralSettings.tsx +++ b/src/features/settings/components/GeneralSettings.tsx @@ -4,9 +4,10 @@ import { IonSelect, IonSelectOption, IonText, + IonToggle, } from '@ionic/react'; import { useAtom } from 'jotai/react'; -import { useCallback, useEffect } from 'react'; +import { useCallback } from 'react'; import { settingsAtom, SettingsType } from 'stores/settings'; const GeneralSettings: React.FC = () => { @@ -30,22 +31,16 @@ const GeneralSettings: React.FC = () => {

General

-

Theme

+

Dark Mode

- updateGeneralSettings({ - theme: e.detail.value, + theme: e.detail.checked ? 'dark' : 'light', }) } - > - Dark - Light - + className="py-0" + >
diff --git a/yarn.lock b/yarn.lock index 7170aa4..b465697 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1251,29 +1251,29 @@ debug "^4.0.0" tslib "^2.0.1" -"@ionic/core@7.0.0-rc.5": - version "7.0.0-rc.5" - resolved "https://registry.yarnpkg.com/@ionic/core/-/core-7.0.0-rc.5.tgz#d24c5eb0c35e10dfa85c47dddba068b019f7db2d" - integrity sha512-c8st2bhM+mlauv2/1Xm++cZIoAXG5mEK2LA+HbO5RAUI6045k/GbXsVbpDyGI0HtrOvOq8+IyCH5i+AdwqzyWQ== +"@ionic/core@7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@ionic/core/-/core-7.0.0.tgz#a38ba73e10caf4fc31b97008e1adf20956cb9cc3" + integrity sha512-pM8qOaea9ZbqZbGnoIswaeeTiHJKNQ9ziSNHSILDpdd4FjpxZjOeMgNUdvYzh5rX9fA6hEM2wodg7McIWHgvZQ== dependencies: "@stencil/core" "^3.1.0" ionicons "^7.1.0" tslib "^2.1.0" -"@ionic/react-router@^7.0.0-rc.5": - version "7.0.0-rc.5" - resolved "https://registry.yarnpkg.com/@ionic/react-router/-/react-router-7.0.0-rc.5.tgz#89d7c7865ee53e58fc0eaeaec5713737ed6e91f9" - integrity sha512-3VBpXjFEtpXQSTQL27gpd5yWuHdbfY6k3BpBYrHH6dPX+E/sT80/Y2AMD/uayLQHVit9rrBQ0WO2O/rziVlh0w== +"@ionic/react-router@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@ionic/react-router/-/react-router-7.0.0.tgz#95312875a8dcb229819732c8bc71bff2c2558e0c" + integrity sha512-rlYWI9Rh8lk3STZ38J7AGx0wnCHYpLg7Ocoxjsvxyuif5PEqQlzZyu0UN9IWVyEMctZEZ2cN0CLayBVaOCMYuA== dependencies: - "@ionic/react" "7.0.0-rc.5" + "@ionic/react" "7.0.0" tslib "*" -"@ionic/react@7.0.0-rc.5", "@ionic/react@^7.0.0-rc.5": - version "7.0.0-rc.5" - resolved "https://registry.yarnpkg.com/@ionic/react/-/react-7.0.0-rc.5.tgz#2b7e54fb67c959c2cc840342dbcd8bbbde2c34de" - integrity sha512-D6PWjKEyboG9yTGjJ4kw92fECd0cZXLv0suraTp7Lg8nS4BGwthTxHq+xqJePEXZqMcoCCqgFrwDpS4bCXCDkw== +"@ionic/react@7.0.0", "@ionic/react@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@ionic/react/-/react-7.0.0.tgz#35abdaab505fd01e1f2fd03a81d273cc10b11d81" + integrity sha512-t9NlHZTiH/NvT3GLcO4yS5Whe9stpsZ9AtNOYS+aPcKM5vhxJSFGXDUvKtABOLi2CniW2kFE8krHwjz9V0GQYA== dependencies: - "@ionic/core" "7.0.0-rc.5" + "@ionic/core" "7.0.0" ionicons "^7.0.0" tslib "*" From 0bc45b3959980a1354e4ab2546eb4d83f2075b1e Mon Sep 17 00:00:00 2001 From: Muhammed Rahif Date: Thu, 30 Mar 2023 09:41:14 +0530 Subject: [PATCH 3/4] fix(ionic): v7 warning about input aria-label --- git-conventional-commits.yaml | 1 + src/components/AppTypeahead.tsx | 6 +++++- .../settings/components/GeneralSettings.tsx | 13 ++++--------- src/features/settings/components/QuranSettings.tsx | 6 ++++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/git-conventional-commits.yaml b/git-conventional-commits.yaml index 3d256ab..68f2f07 100644 --- a/git-conventional-commits.yaml +++ b/git-conventional-commits.yaml @@ -43,6 +43,7 @@ convention: "atom-state", "community", "deps", + "ionic", ] releaseTagGlobPattern: v[0-9]*.[0-9]*.[0-9]* changelog: diff --git a/src/components/AppTypeahead.tsx b/src/components/AppTypeahead.tsx index 9173f49..e76c860 100644 --- a/src/components/AppTypeahead.tsx +++ b/src/components/AppTypeahead.tsx @@ -135,8 +135,12 @@ function AppTypeahead(props: TypeaheadProps) { data={filteredItems} itemContent={(index, { text, value }) => ( - {text} + + {text} + {

General

-

Dark Mode

+

Dark mode

updateGeneralSettings({ theme: e.detail.checked ? 'dark' : 'light', diff --git a/src/features/settings/components/QuranSettings.tsx b/src/features/settings/components/QuranSettings.tsx index c9bd059..2d9d1f0 100644 --- a/src/features/settings/components/QuranSettings.tsx +++ b/src/features/settings/components/QuranSettings.tsx @@ -88,7 +88,8 @@ const QuranSettings: React.FC = () => { { updateQuranSettings({ @@ -112,7 +113,8 @@ const QuranSettings: React.FC = () => { { updateQuranSettings({ From 89a2ba8efa9c6ea70922a4ed76af66260fa9643f Mon Sep 17 00:00:00 2001 From: Muhammed Rahif Date: Thu, 30 Mar 2023 10:00:45 +0530 Subject: [PATCH 4/4] test(quran): search bar test failing issue --- src/screens/Quran.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/Quran.tsx b/src/screens/Quran.tsx index e48fdf6..1e52c4f 100644 --- a/src/screens/Quran.tsx +++ b/src/screens/Quran.tsx @@ -26,7 +26,7 @@ const Quran: React.FC = () => { setSearch(e.detail.value!)} + onIonInput={(e) => setSearch(e.detail.value!)} className="sticky top-0 z-30" color="light" />