From 88a91bdfc7611a58d94714cae6bae8648ccc6766 Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:32:58 -0500 Subject: [PATCH] chore(website): enhance plugin search ui (#4294) * chore(website): enhance plugin search ui * Delete .changeset/popular-nails-behave.md * Update addons.json --- scripts/addon-update.ts | 4 +++ website/sidebars.js | 2 +- .../components/EcosystemSearch/AddonCard.tsx | 14 ++++++++- .../components/EcosystemSearch/CardLogo.tsx | 13 ++++++++ .../EcosystemSearch/FilterControl.tsx | 2 +- .../src/components/EcosystemSearch/Icon.tsx | 12 +++---- .../components/EcosystemSearch/addons.json | 31 ------------------- website/src/components/Header.tsx | 7 ++--- website/src/components/Logo.tsx | 17 ++++++++++ .../version-5.x-sidebars.json | 2 +- .../version-6.x-sidebars.json | 2 +- 11 files changed, 59 insertions(+), 47 deletions(-) create mode 100644 website/src/components/EcosystemSearch/CardLogo.tsx create mode 100644 website/src/components/Logo.tsx diff --git a/scripts/addon-update.ts b/scripts/addon-update.ts index 76c3ebf9d..e901b672b 100644 --- a/scripts/addon-update.ts +++ b/scripts/addon-update.ts @@ -12,6 +12,10 @@ import path from 'path'; ).json(); // @ts-ignore item.description = d.description; + // remove html tags from description (e.g. ) + item.description = item.description.replace(/<[^>]*>?/gm, ''); + // remove markdown links from description (e.g. [link](url)) + item.description = item.description.replace(/\[(.*?)\]\(.*?\)/gm, '$1'); item.url = `https://www.npmjs.org/${item.name}`; item.registry = `https://registry.npmjs.org/${item.name}`; item.bundled = typeof item.bundled === 'boolean' ? item.bundled : false; diff --git a/website/sidebars.js b/website/sidebars.js index 0f3e92b9a..72136194a 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -70,7 +70,7 @@ module.exports = { 'plugin-filter', { type: 'link', - label: 'Search Plugins', + label: 'Search for Plugins & Tools', href: '/dev/plugins-search', }, ], diff --git a/website/src/components/EcosystemSearch/AddonCard.tsx b/website/src/components/EcosystemSearch/AddonCard.tsx index 2163d7a7e..19e7d74dd 100644 --- a/website/src/components/EcosystemSearch/AddonCard.tsx +++ b/website/src/components/EcosystemSearch/AddonCard.tsx @@ -17,6 +17,7 @@ import { useTheme } from '@mui/styles'; import * as React from 'react'; import { FC } from 'react'; +import CardLogo from './CardLogo'; import Icon from './Icon'; import { Addon } from './types'; @@ -54,6 +55,15 @@ const AddonCard: FC = ({ } + action={ + + + + } /> @@ -75,6 +85,7 @@ const AddonCard: FC = ({ > @@ -85,10 +96,11 @@ const AddonCard: FC = ({ /> - +