From b41e601798407615b504a2a52ab287d144f4716a Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 22 Nov 2024 03:05:58 -0800 Subject: [PATCH] suggested docs UI tweaks --- .../suggestions/packageCrawlers/Python.ts | 1 - extensions/vscode/package-lock.json | 2 +- gui/package-lock.json | 8 +------ gui/src/components/dialogs/AddDocsDialog.tsx | 24 ++++++++++--------- .../components/indexing/DocsIndexingPeeks.tsx | 9 +++---- 5 files changed, 20 insertions(+), 24 deletions(-) diff --git a/core/indexing/docs/suggestions/packageCrawlers/Python.ts b/core/indexing/docs/suggestions/packageCrawlers/Python.ts index 6a486c984..3a617568f 100644 --- a/core/indexing/docs/suggestions/packageCrawlers/Python.ts +++ b/core/indexing/docs/suggestions/packageCrawlers/Python.ts @@ -39,7 +39,6 @@ export class PythonPackageCrawler implements PackageCrawler { packageInfo: ParsedPackageInfo, ): Promise { // Fetch metadata from PyPI to find the documentation link - const response = await fetch( `https://pypi.org/pypi/${packageInfo.name}/json`, ); diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index b30a951df..8d680fb94 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -109,7 +109,7 @@ "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", "comment-json": "^4.2.3", - "dbinfoz": "^0.11.0", + "dbinfoz": "^0.14.0", "diff": "^7.0.0", "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", diff --git a/gui/package-lock.json b/gui/package-lock.json index 3be234fb8..1a9e4fe3f 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -56,7 +56,6 @@ "socket.io-client": "^4.7.2", "styled-components": "^5.3.6", "table": "^6.8.1", - "tailwind-scrollbar-hide": "^1.1.7", "tippy.js": "^6.3.7", "unist-util-visit": "^5.0.0", "uuid": "^9.0.1", @@ -112,7 +111,7 @@ "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", "comment-json": "^4.2.3", - "dbinfoz": "^0.11.0", + "dbinfoz": "^0.14.0", "diff": "^7.0.0", "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", @@ -8984,11 +8983,6 @@ "node": ">=10.0.0" } }, - "node_modules/tailwind-scrollbar-hide": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/tailwind-scrollbar-hide/-/tailwind-scrollbar-hide-1.1.7.tgz", - "integrity": "sha512-X324n9OtpTmOMqEgDUEA/RgLrNfBF/jwJdctaPZDzB3mppxJk7TLIDmOreEDm1Bq4R9LSPu4Epf8VSdovNU+iA==" - }, "node_modules/tailwindcss": { "version": "3.4.12", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.12.tgz", diff --git a/gui/src/components/dialogs/AddDocsDialog.tsx b/gui/src/components/dialogs/AddDocsDialog.tsx index 0a90a60d2..1467a3fa5 100644 --- a/gui/src/components/dialogs/AddDocsDialog.tsx +++ b/gui/src/components/dialogs/AddDocsDialog.tsx @@ -167,14 +167,17 @@ function AddDocsDialog() { }; return ( -
-
+
+

Add documentation

Add docs

+

+ For the @docs context provider +

{sortedDocsSuggestions.length && (

Suggestions

)} -
+
{sortedDocsSuggestions.map((docsResult) => { const { error, details } = docsResult; const { language, name, version } = docsResult.packageInfo; @@ -328,14 +331,13 @@ function AddDocsDialog() {
-
-
- {docsIndexingStatuses.length ? ( -

- It is safe to close this form while indexing -

- ) : null} -
+
+ {docsIndexingStatuses.length ? ( +

+ + It is safe to close this form while indexing +

+ ) : null}
); diff --git a/gui/src/components/indexing/DocsIndexingPeeks.tsx b/gui/src/components/indexing/DocsIndexingPeeks.tsx index e5b98d42e..9c5f96ec8 100644 --- a/gui/src/components/indexing/DocsIndexingPeeks.tsx +++ b/gui/src/components/indexing/DocsIndexingPeeks.tsx @@ -1,10 +1,9 @@ -import { useDispatch, useSelector } from "react-redux"; -import { RootState } from "../../redux/store"; +import { useDispatch } from "react-redux"; import { IndexingStatus } from "core"; import { useMemo } from "react"; import { useNavigate } from "react-router-dom"; -import { ArrowPathIcon, EyeSlashIcon } from "@heroicons/react/24/outline"; +import { ArrowPathIcon } from "@heroicons/react/24/outline"; import { setDialogMessage, setShowDialog, @@ -63,7 +62,9 @@ function DocsIndexingPeekList({ statuses }: DocsIndexingPeeksProps) { return (
-

Currently Indexing

+

+ Currently Indexing +

{statuses.map((status) => { return ;