From c502760ad811af983d41e2ab971d94bed09034f5 Mon Sep 17 00:00:00 2001 From: Prajwal Kulkarni Date: Tue, 26 Dec 2023 13:03:00 +0530 Subject: [PATCH 1/8] Fix overflowing text content in footer link Add an ellipsis to overflowing text in the footer section for navigating between different references. --- src/components/DocsFooter.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/DocsFooter.tsx b/src/components/DocsFooter.tsx index 2fdbb0460c1..75d90dc584d 100644 --- a/src/components/DocsFooter.tsx +++ b/src/components/DocsFooter.tsx @@ -78,12 +78,12 @@ function FooterLink({ className="text-tertiary dark:text-tertiary-dark inline group-focus:text-link dark:group-focus:text-link-dark" displayDirection={type === 'Previous' ? 'start' : 'end'} /> - - +
+ {type} - {title} - + {title} +
); } From 92330571fef8f23cd7282febea705d2501e53bb7 Mon Sep 17 00:00:00 2001 From: Prajwal Kulkarni Date: Wed, 10 Jan 2024 22:38:18 +0530 Subject: [PATCH 2/8] Add min and max width to nextlink class --- src/components/DocsFooter.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DocsFooter.tsx b/src/components/DocsFooter.tsx index 75d90dc584d..2c6e99937f7 100644 --- a/src/components/DocsFooter.tsx +++ b/src/components/DocsFooter.tsx @@ -69,7 +69,7 @@ function FooterLink({ Date: Wed, 10 Jan 2024 22:39:40 +0530 Subject: [PATCH 3/8] Add minwidth to tailwind config --- tailwind.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tailwind.config.js b/tailwind.config.js index d528ff494d1..a9488ccc77a 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -57,8 +57,13 @@ module.exports = { 'meta-gradient-dark': "url('/images/meta-gradient-dark.png')", }, maxWidth: { + ...defaultTheme.maxWidth, xs: '21rem', }, + minWidth:{ + ...defaultTheme.minWidth, + 80: '20rem', + }, outline: { blue: ['1px auto ' + colors.link, '3px'], }, From 8db6691e6932aa38a1ee0e18528f8ff19ad57730 Mon Sep 17 00:00:00 2001 From: Prajwal Kulkarni Date: Sat, 13 Jan 2024 00:25:32 +0530 Subject: [PATCH 4/8] Wrap string beyond max width --- src/components/DocsFooter.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/DocsFooter.tsx b/src/components/DocsFooter.tsx index 2c6e99937f7..69c30675ad6 100644 --- a/src/components/DocsFooter.tsx +++ b/src/components/DocsFooter.tsx @@ -27,7 +27,7 @@ export const DocsPageFooter = memo( <> {prevRoute?.path || nextRoute?.path ? ( <> -
+
{prevRoute?.path ? (
- + {type} - {title} + + {title} +
); From 9cd5a29dcb733f5ae6e324e2fafc8510288433f1 Mon Sep 17 00:00:00 2001 From: Prajwal Kulkarni Date: Sat, 13 Jan 2024 00:30:47 +0530 Subject: [PATCH 5/8] Remove title attribute from span element --- src/components/DocsFooter.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/DocsFooter.tsx b/src/components/DocsFooter.tsx index 69c30675ad6..5f2330e7eae 100644 --- a/src/components/DocsFooter.tsx +++ b/src/components/DocsFooter.tsx @@ -82,9 +82,7 @@ function FooterLink({ {type} - + {title}
From 2dd2dea3037575a72cd13bc6e237fcc63904f5e1 Mon Sep 17 00:00:00 2001 From: Prajwal Kulkarni Date: Sat, 13 Jan 2024 14:59:00 +0530 Subject: [PATCH 6/8] Upgrade tailwind to 3.4.1 --- package.json | 2 +- yarn.lock | 37 ++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index b5e07d70a84..f75ffbb28a6 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "retext": "^7.0.1", "retext-smartypants": "^4.0.0", "rss": "^1.2.2", - "tailwindcss": "^3.3.2", + "tailwindcss": "^3.4.1", "typescript": "^4.0.2", "unist-util-visit": "^2.0.3", "webpack-bundle-analyzer": "^4.5.0" diff --git a/yarn.lock b/yarn.lock index c7b0f980e19..f7d63ee56c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2601,10 +2601,10 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.12: - version "3.3.0" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.0.tgz#7c40cb491e1e2ed5664749e87bfb516dbe8727c0" - integrity sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA== +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -2612,10 +2612,10 @@ fast-glob@^3.2.12: merge2 "^1.3.0" micromatch "^4.0.4" -fast-glob@^3.2.9: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== +fast-glob@^3.3.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -3371,10 +3371,10 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -jiti@^1.18.2: - version "1.20.0" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.20.0.tgz#2d823b5852ee8963585c8dd8b7992ffc1ae83b42" - integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA== +jiti@^1.19.1: + version "1.21.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" + integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" @@ -6103,20 +6103,20 @@ table@^6.0.9: string-width "^4.2.3" strip-ansi "^6.0.1" -tailwindcss@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.3.2.tgz#2f9e35d715fdf0bbf674d90147a0684d7054a2d3" - integrity sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w== +tailwindcss@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.1.tgz#f512ca5d1dd4c9503c7d3d28a968f1ad8f5c839d" + integrity sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA== dependencies: "@alloc/quick-lru" "^5.2.0" arg "^5.0.2" chokidar "^3.5.3" didyoumean "^1.2.2" dlv "^1.1.3" - fast-glob "^3.2.12" + fast-glob "^3.3.0" glob-parent "^6.0.2" is-glob "^4.0.3" - jiti "^1.18.2" + jiti "^1.19.1" lilconfig "^2.1.0" micromatch "^4.0.5" normalize-path "^3.0.0" @@ -6128,7 +6128,6 @@ tailwindcss@^3.3.2: postcss-load-config "^4.0.1" postcss-nested "^6.0.1" postcss-selector-parser "^6.0.11" - postcss-value-parser "^4.2.0" resolve "^1.22.2" sucrase "^3.32.0" From 0d238a13dd49a7be2607386424cfce2e11af7c7c Mon Sep 17 00:00:00 2001 From: Prajwal Kulkarni Date: Sat, 13 Jan 2024 15:20:47 +0530 Subject: [PATCH 7/8] Remove manual width config from minWidth --- tailwind.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index cf34559bb2f..5bf7d88ed7f 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -60,9 +60,8 @@ module.exports = { ...defaultTheme.maxWidth, xs: '21rem', }, - minWidth:{ + minWidth: { ...defaultTheme.minWidth, - 80: '20rem', }, outline: { blue: ['1px auto ' + colors.link, '3px'], From a9780cdbb8cce17a57050f7c110aec502a5ee903 Mon Sep 17 00:00:00 2001 From: Prajwal Kulkarni Date: Sun, 14 Jan 2024 12:04:52 +0530 Subject: [PATCH 8/8] Remove minWidth from tailwind config and preserve default value of min-w-xs --- src/components/Layout/Feedback.tsx | 8 ++--- src/components/Layout/Page.tsx | 16 +++++----- .../Layout/SidebarNav/SidebarNav.tsx | 4 +-- src/components/Layout/TopNav/TopNav.tsx | 30 +++++++++---------- tailwind.config.js | 5 +--- 5 files changed, 30 insertions(+), 33 deletions(-) diff --git a/src/components/Layout/Feedback.tsx b/src/components/Layout/Feedback.tsx index 0bdbc6b7cfd..34db728ced2 100644 --- a/src/components/Layout/Feedback.tsx +++ b/src/components/Layout/Feedback.tsx @@ -63,16 +63,16 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) { return (
-

+

{isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'}

{!isSubmitted && ( -
+
@@ -260,16 +260,16 @@ export default function TopNav({
-
+
@@ -313,7 +313,7 @@ export default function TopNav({ onClick={() => { window.__setPreferredTheme('dark'); }} - className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> + className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> {darkIcon}
@@ -324,7 +324,7 @@ export default function TopNav({ onClick={() => { window.__setPreferredTheme('light'); }} - className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> + className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> {lightIcon}
@@ -334,7 +334,7 @@ export default function TopNav({ target="_blank" rel="noreferrer noopener" aria-label="Open on GitHub" - className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> + className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> {githubIcon}
@@ -349,13 +349,13 @@ export default function TopNav({ className="overflow-y-scroll isolate no-bg-scrollbar lg:w-[342px] grow bg-wash dark:bg-wash-dark">