From 60fdf3a789db678c24908e146ed01fd0141dd665 Mon Sep 17 00:00:00 2001 From: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com> Date: Fri, 20 Oct 2023 09:16:22 -0600 Subject: [PATCH 1/4] fix: nav order (#92) --- scripts/generate-links/getSortedLinks.mjs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/generate-links/getSortedLinks.mjs b/scripts/generate-links/getSortedLinks.mjs index 0fdb52bf3..53286aa96 100644 --- a/scripts/generate-links/getSortedLinks.mjs +++ b/scripts/generate-links/getSortedLinks.mjs @@ -192,15 +192,18 @@ export default function getSortedLinks(config, docs) { .replaceAll(' ', '_') .replaceAll('-', '_'); - const pathLength = isLatest ? 4 : 3; - const isIndexA = a.slug.split('/').length === pathLength; - if (isIndexA) { - return -1; - } - const isIndexB = b.slug.split('/').length === pathLength; - if (isIndexB) { - return 1; + if (a.slug.includes('fuels-ts')) { + const pathLength = isLatest ? 4 : 3; + const isIndexA = a.slug.split('/').length === pathLength; + if (isIndexA) { + return -1; + } + const isIndexB = b.slug.split('/').length === pathLength; + if (isIndexB) { + return 1; + } } + const aIdx = catOrder ? catOrder.indexOf(lowerA) : 0; const bIdx = catOrder ? catOrder.indexOf(lowerB) : 0; const result = aIdx - bIdx; From 394f1f7423a57788e5c95f4cf0af5282eab944f7 Mon Sep 17 00:00:00 2001 From: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:25:54 -0600 Subject: [PATCH 2/4] style: minor fixes (#93) --- src/components/FeedbackForm.tsx | 3 +++ src/components/Layout.tsx | 1 + src/styles/index.css | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/src/components/FeedbackForm.tsx b/src/components/FeedbackForm.tsx index 564f67667..5a5839e93 100644 --- a/src/components/FeedbackForm.tsx +++ b/src/components/FeedbackForm.tsx @@ -292,6 +292,9 @@ const styles = { submit: cssObj({ '&:hover': { backgroundColor: '$semanticSolidInfoBg !important', + 'html[class="fuel_light-theme"] &': { + color: '$gray6', + }, }, }), helpful: cssObj({ diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 67123c2b5..670e650fc 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -104,6 +104,7 @@ const styles = { maxWidth: '1000px', width: '100vw', boxSizing: 'border-box', + margin: 'auto', }, '@xl': { diff --git a/src/styles/index.css b/src/styles/index.css index a21c885de..7e890d636 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -77,3 +77,7 @@ textarea { .form-textarea:focus { outline: 1px solid var(--colors-inputBaseBorder) !important; } + +select { + color: inherit !important; +} From e41dbe8bd38abd35c3c9fb615258ab9277418a36 Mon Sep 17 00:00:00 2001 From: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:10:15 -0600 Subject: [PATCH 3/4] patch fix for wallet examples (#94) --- package.json | 3 ++- scripts/wallet-examples.mjs | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 scripts/wallet-examples.mjs diff --git a/package.json b/package.json index b9fd7f540..2b79b22f2 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "build": "next build", - "build:ci": "run-s docs:* generate:* build", + "build:ci": "run-s docs:* generate:* patch:wallet build", "check": "run-s lint prettier:check", "check:prod": "run-s lint:prod prettier:check", "copy:icons": "cp -r ./node_modules/@fuel-ui/icons/dist/icons/sprite.svg ./public/icons", @@ -22,6 +22,7 @@ "prettier:check": "prettier --check .", "prettier:format": "prettier --write .", "start": "next start", + "patch:wallet": "node scripts/wallet-examples.mjs", "test:guides": "npx playwright test tests/test.spec.ts", "test:guides:debug": "DEBUG=pw:api npx playwright test tests/test.spec.ts", "ts:check": "tsc --noEmit", diff --git a/scripts/wallet-examples.mjs b/scripts/wallet-examples.mjs new file mode 100644 index 000000000..ea138bc18 --- /dev/null +++ b/scripts/wallet-examples.mjs @@ -0,0 +1,34 @@ +import fs from 'fs'; +import path from 'path'; + +const examplesPath = './docs/fuels-wallet/packages/docs/examples'; +const latestExamplesPath = './docs/latest/fuels-wallet/packages/docs/examples'; + +const propToReplace = 'onPress'; +const replacementProp = 'onClick'; + +const pattern = new RegExp(`\\b${propToReplace}\\s*=\\s*\\{([^}]+)\\}`, 'g'); + +function replaceInFile(filePath) { + const content = fs.readFileSync(filePath, 'utf8'); + const newContent = content.replace(pattern, `${replacementProp}={$1}`); + fs.writeFileSync(filePath, newContent); +} + +function processDirectory(directory) { + const files = fs.readdirSync(directory); + + files.forEach((fileName) => { + const filePath = path.join(directory, fileName); + const stat = fs.statSync(filePath); + + if (stat.isDirectory()) { + processDirectory(filePath); + } else if (fileName.endsWith('.tsx')) { + replaceInFile(filePath); + } + }); +} + +processDirectory(examplesPath); +processDirectory(latestExamplesPath); From b8af5e10ff749838edc6b21ea87df2568a4556f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 08:52:03 -0600 Subject: [PATCH 4/4] chore: update latest docs (#95) --- docs/latest/fuel-indexer | 2 +- docs/latest/fuel-specs | 2 +- docs/latest/fuels-ts | 2 +- docs/latest/fuels-wallet | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/latest/fuel-indexer b/docs/latest/fuel-indexer index 604f71dfa..18f846cde 160000 --- a/docs/latest/fuel-indexer +++ b/docs/latest/fuel-indexer @@ -1 +1 @@ -Subproject commit 604f71dfa8eb08343583efad99ca281d6a4769c6 +Subproject commit 18f846cde049ad37623d9f66db8adbd549b4c6b4 diff --git a/docs/latest/fuel-specs b/docs/latest/fuel-specs index efc31b0cc..89b2a2a26 160000 --- a/docs/latest/fuel-specs +++ b/docs/latest/fuel-specs @@ -1 +1 @@ -Subproject commit efc31b0cc210bb0f7df62da1de71c01734aae026 +Subproject commit 89b2a2a2644bc3da41321409f53b49aa46d054a5 diff --git a/docs/latest/fuels-ts b/docs/latest/fuels-ts index 5b125a874..158d88f4d 160000 --- a/docs/latest/fuels-ts +++ b/docs/latest/fuels-ts @@ -1 +1 @@ -Subproject commit 5b125a874f1ffad6e7f09f77cd290fa73c33f7e6 +Subproject commit 158d88f4d7929225bc9e470487ca923fe61ce09e diff --git a/docs/latest/fuels-wallet b/docs/latest/fuels-wallet index c7bed9380..c1cb6da31 160000 --- a/docs/latest/fuels-wallet +++ b/docs/latest/fuels-wallet @@ -1 +1 @@ -Subproject commit c7bed9380ed00c497e59783cff8d2f4642d6910e +Subproject commit c1cb6da31397b9a58c540248c6c3edcd05e553e5