suggested docs UI tweaks
This commit is contained in:
parent
29d7e8077d
commit
b41e601798
5 changed files with 20 additions and 24 deletions
|
|
@ -39,7 +39,6 @@ export class PythonPackageCrawler implements PackageCrawler {
|
|||
packageInfo: ParsedPackageInfo,
|
||||
): Promise<PackageDetails> {
|
||||
// Fetch metadata from PyPI to find the documentation link
|
||||
|
||||
const response = await fetch(
|
||||
`https://pypi.org/pypi/${packageInfo.name}/json`,
|
||||
);
|
||||
|
|
|
|||
2
extensions/vscode/package-lock.json
generated
2
extensions/vscode/package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
8
gui/package-lock.json
generated
8
gui/package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -167,14 +167,17 @@ function AddDocsDialog() {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="px-2 py-4 sm:px-4">
|
||||
<div className="">
|
||||
<div className="px-2 pt-4 sm:px-4">
|
||||
<div className="mb-2">
|
||||
<h1 className="mb-0 hidden sm:block">Add documentation</h1>
|
||||
<h1 className="sm:hidden">Add docs</h1>
|
||||
<p className="m-0 mt-2 p-0 text-stone-500">
|
||||
For the @docs context provider
|
||||
</p>
|
||||
{sortedDocsSuggestions.length && (
|
||||
<p className="m-0 mb-1 mt-4 p-0 font-semibold">Suggestions</p>
|
||||
)}
|
||||
<div className="border-vsc-foreground-muted max-h-[175px] overflow-y-scroll rounded-sm py-1 pr-2">
|
||||
<div className="border-vsc-foreground-muted max-h-[145px] overflow-y-scroll rounded-sm py-1 pr-2">
|
||||
{sortedDocsSuggestions.map((docsResult) => {
|
||||
const { error, details } = docsResult;
|
||||
const { language, name, version } = docsResult.packageInfo;
|
||||
|
|
@ -328,14 +331,13 @@ function AddDocsDialog() {
|
|||
</div>
|
||||
|
||||
<DocsIndexingPeeks statuses={docsIndexingStatuses} />
|
||||
<div className="flex flex-row items-end justify-between gap-2">
|
||||
<div>
|
||||
{docsIndexingStatuses.length ? (
|
||||
<p className="mt-2 p-0 text-xs text-stone-500">
|
||||
It is safe to close this form while indexing
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="flex flex-row items-end justify-start gap-2">
|
||||
{docsIndexingStatuses.length ? (
|
||||
<p className="mt-2 flex flex-row items-center gap-1 p-0 px-1 text-xs text-stone-500">
|
||||
<CheckIcon className="h-3 w-3" />
|
||||
It is safe to close this form while indexing
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<div className="flex flex-col">
|
||||
<p className="mx-0 my-1.5 p-0 text-stone-500">Currently Indexing</p>
|
||||
<p className="mx-0 my-1.5 p-0 px-1 font-semibold text-stone-500">
|
||||
Currently Indexing
|
||||
</p>
|
||||
<div className="max-h-[100px] overflow-y-auto pr-2">
|
||||
{statuses.map((status) => {
|
||||
return <DocsIndexingPeek key={status.id} status={status} />;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue