diff --git a/src/components/ui/tables/CommunityToolsTable.astro b/src/components/ui/tables/CommunityToolsTable.astro index 2ca4a10..9233085 100644 --- a/src/components/ui/tables/CommunityToolsTable.astro +++ b/src/components/ui/tables/CommunityToolsTable.astro @@ -7,28 +7,41 @@ interface Props { } function getUniqueAttributes(tools: CommunityToolCollection) { - const creatorNames = new Set(); - const tags = new Set(); - const licenses = new Set(); + const creatorNames = new Map(); + const tags = new Map(); + const licenses = new Map(); for (const tool of tools) { - if (!tool.creators) { - continue; + if (tool.creators) { + for (const creator of tool.creators) { + creatorNames.set(creator.name, true); + } + } + if (tool.tags) { + for (const tag of tool.tags) { + tags.set(tag.toLowerCase(), true); + } } - tool.creators.forEach(creator => creatorNames.add(creator.name)); - (tool.tags || []).forEach(tag => tags.add(tag)); - licenses.add(tool.license); + licenses.set(tool.license, true); } return { - creatorNames: Array.from(creatorNames), - tags: Array.from(tags), - licenses: Array.from(licenses), + creatorNames: Array.from(creatorNames.keys()).sort((a, b) => a.localeCompare(b)), + tags: Array.from(tags.keys()).sort((a, b) => a.localeCompare(b)), + licenses: Array.from(licenses.keys()).sort((a, b) => a.localeCompare(b)), }; } const { tools } = Astro.props; const { creatorNames, tags, licenses } = getUniqueAttributes(tools); + +// Process tools: lowercase and sort tags +const processedTools = tools.map((tool) => ({ + ...tool, + tags: tool.tags + ? tool.tags.map((tag) => tag.toLowerCase()).sort((a, b) => a.localeCompare(b)) + : [], +})); ---
@@ -69,7 +82,7 @@ const { creatorNames, tags, licenses } = getUniqueAttributes(tools);
@@ -233,19 +246,33 @@ const { creatorNames, tags, licenses } = getUniqueAttributes(tools); }, enableSorting: false, cell: (props) => { - const { description } = props.row.original; + const { description, tags } = props.row.original; - if (!description) { - return ''; - } + const tagsHtml = tags?.map((tag) => ` + + ${tag} + + `).join('') || ''; - return ` + const tagsWrapper = tagsHtml + ? `
${tagsHtml}
` + : ''; + + const descriptionHtml = description + ? `
${description}
- `; + ` + : ''; + + return `${descriptionHtml}${tagsWrapper}`; } }), + columnHelper.accessor('tags', { + cell: props => props.getValue(), + filterFn: 'arrIncludesSome', + }), columnHelper.accessor('license', { header: () => 'License', filterFn: 'arrIncludesSome', @@ -310,6 +337,9 @@ const { creatorNames, tags, licenses } = getUniqueAttributes(tools); getFilteredRowModel: getFilteredRowModel(), state: { columnPinning: {}, + columnVisibility: { + tags: false, + }, pagination: { pageIndex: 0, pageSize: 20, diff --git a/src/components/ui/tables/TableSelectFilter.astro b/src/components/ui/tables/TableSelectFilter.astro index 8993e6e..bb8ab3d 100644 --- a/src/components/ui/tables/TableSelectFilter.astro +++ b/src/components/ui/tables/TableSelectFilter.astro @@ -14,6 +14,10 @@ const { selectId, placeholder, options } = Astro.props; multiple="" class="hidden" data-hs-select=`{ + "hasSearch": true, + "searchPlaceholder": "Search...", + "searchClasses": "block w-full text-sm border-gray-200 rounded-lg focus:border-blue-500 focus:ring-blue-500 before:absolute before:inset-0 before:z-[1] dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 py-2 px-3", + "searchWrapperClasses": "bg-white p-2 -mx-1 sticky top-0 dark:bg-neutral-900", "placeholder": "${placeholder}", "toggleTag": "", "toggleClasses": "hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative py-2 ps-4 pe-9 flex gap-x-2 text-nowrap w-full cursor-pointer bg-white border border-gray-200 rounded-lg text-start text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600", diff --git a/src/content/community-tools/cli-toolkit.yaml b/src/content/community-tools/cli-toolkit.yaml index 3b251b7..ee6b43d 100644 --- a/src/content/community-tools/cli-toolkit.yaml +++ b/src/content/community-tools/cli-toolkit.yaml @@ -3,7 +3,7 @@ subtitle: Spryker Community CLI Toolkit description: >- A suite of utilities designed to enhance performance in your day-to-day operations with Spryker Cloud Commerce OS. -tags: [] +tags: ["dev", "cli"] license: MIT creators: - name: Community diff --git a/src/content/community-tools/codeception-module.yaml b/src/content/community-tools/codeception-module.yaml index ff499f8..42b7f79 100644 --- a/src/content/community-tools/codeception-module.yaml +++ b/src/content/community-tools/codeception-module.yaml @@ -1,7 +1,7 @@ title: "Codeception Module" subtitle: "" description: "This module allows developers to test Spryker modules isolated." -tags: [] +tags: ["testing", "dev"] license: "MIT" creators: - name: "Fond Of" diff --git a/src/content/community-tools/contentful-connector.yaml b/src/content/community-tools/contentful-connector.yaml index 0fdf46e..9665e0a 100644 --- a/src/content/community-tools/contentful-connector.yaml +++ b/src/content/community-tools/contentful-connector.yaml @@ -1,7 +1,7 @@ title: "Contentful connector" subtitle: "" description: "A Spryker-Contentful connector. Import content from Contentful to storage and updates it via cronjob." -tags: [] +tags: ["cms"] license: "MIT" creators: - name: "Fond Of" diff --git a/src/content/community-tools/google-tag-manager-integration.yaml b/src/content/community-tools/google-tag-manager-integration.yaml index d8870e0..45ff2c9 100644 --- a/src/content/community-tools/google-tag-manager-integration.yaml +++ b/src/content/community-tools/google-tag-manager-integration.yaml @@ -1,7 +1,7 @@ title: "Google Tag Manager integration" subtitle: "" description: "The title speaks for itself 🙂" -tags: [] +tags: ["analytics"] license: "MIT" creators: - name: "Fond Of" diff --git a/src/content/community-tools/i18n-translations.yaml b/src/content/community-tools/i18n-translations.yaml index b066e28..34bf3a7 100644 --- a/src/content/community-tools/i18n-translations.yaml +++ b/src/content/community-tools/i18n-translations.yaml @@ -1,7 +1,7 @@ title: "i18n Translations" subtitle: "" description: "Adds support for multiple languages to Spryker OS" -tags: [] +tags: ["translation"] license: "MIT" creators: - name: "Community" diff --git a/src/content/community-tools/novalnet-b2b-payment-integration.yaml b/src/content/community-tools/novalnet-b2b-payment-integration.yaml index e828e59..b9511e4 100644 --- a/src/content/community-tools/novalnet-b2b-payment-integration.yaml +++ b/src/content/community-tools/novalnet-b2b-payment-integration.yaml @@ -1,7 +1,7 @@ title: "Novalnet B2B Payment integration" subtitle: "" description: "Novalnet payment module for Spryker simplifies your daily work by automating the entire payment process, from checkout till collection. This module is designed to help you increase your sales by offering various payment methods on a one-page checkout. The module which is perfectly adjusted to the Spryker shop with top-quality range of services of the payment provider." -tags: [] +tags: ["payment"] license: "Custom" creators: - name: "Novalnet" diff --git a/src/content/community-tools/novalnet-b2c-marketplace-payment-integration.yaml b/src/content/community-tools/novalnet-b2c-marketplace-payment-integration.yaml index 6d2d1b0..159ea51 100644 --- a/src/content/community-tools/novalnet-b2c-marketplace-payment-integration.yaml +++ b/src/content/community-tools/novalnet-b2c-marketplace-payment-integration.yaml @@ -1,7 +1,7 @@ title: "Novalnet B2C Marketplace Payment Integration" subtitle: "" description: "Novalnet payment module for Spryker simplifies your daily work by automating the entire payment process, from checkout till collection. This module is designed to help you increase your sales by offering various payment methods on a one-page checkout. The module which is perfectly adjusted to the Spryker shop with top-quality range of services of the payment provider." -tags: [] +tags: ["payment"] license: "Custom" creators: - name: "Novalnet" diff --git a/src/content/community-tools/product-management-ai-translator-module.yaml b/src/content/community-tools/product-management-ai-translator-module.yaml index 14438ca..493967c 100644 --- a/src/content/community-tools/product-management-ai-translator-module.yaml +++ b/src/content/community-tools/product-management-ai-translator-module.yaml @@ -1,7 +1,7 @@ title: "ProductManagementAiTranslator Module" subtitle: "" description: "This module provides product-related AI translation functionality." -tags: [] +tags: ["translation", "ai"] license: "MIT" creators: - name: "Community" diff --git a/src/content/community-tools/pyz-for-php-storm.yaml b/src/content/community-tools/pyz-for-php-storm.yaml index e951416..3fa30ea 100644 --- a/src/content/community-tools/pyz-for-php-storm.yaml +++ b/src/content/community-tools/pyz-for-php-storm.yaml @@ -9,7 +9,7 @@ description: >
  • Goto-handling for Zed stub calls and their gateway controller actions (URLs are clickable)
  • Resolve usages of gateway controller actions in Zed stub calls
  • -tags: [] +tags: ["phpstorm", "dev", "ide"] license: MIT creators: - name: Turbine Kreuzberg diff --git a/src/content/community-tools/spryker-debug.yaml b/src/content/community-tools/spryker-debug.yaml index 8e877e0..2d60012 100644 --- a/src/content/community-tools/spryker-debug.yaml +++ b/src/content/community-tools/spryker-debug.yaml @@ -1,7 +1,7 @@ title: "Spryker Debug" subtitle: "" description: "Collection of Spryker-compatible debug and development tools." -tags: [] +tags: ["dev"] license: "MIT" creators: - name: "Inviqa" diff --git a/src/content/community-tools/spryker-kit-for-php-storm.yaml b/src/content/community-tools/spryker-kit-for-php-storm.yaml index ddc5ae7..5308722 100644 --- a/src/content/community-tools/spryker-kit-for-php-storm.yaml +++ b/src/content/community-tools/spryker-kit-for-php-storm.yaml @@ -9,7 +9,7 @@ description: |
  • Supported Layers Client, Glue, Service, Shared, Yves, Zed
  • Configure desired project namespace
  • -tags: [] +tags: ["phpstorm", "dev", "ide"] license: "MIT" creators: - name: "Valantic" diff --git a/src/content/community-tools/two-factor-backend-authentication.yaml b/src/content/community-tools/two-factor-backend-authentication.yaml index e34acca..0869fc0 100644 --- a/src/content/community-tools/two-factor-backend-authentication.yaml +++ b/src/content/community-tools/two-factor-backend-authentication.yaml @@ -1,7 +1,7 @@ title: "Two-factor Backend Authentication" subtitle: "" description: "Second Factor Authentication for the Spryker Administration Interface" -tags: [] +tags: ["backoffice", "authentication", "2fa", "security"] license: "MIT" creators: - name: "UFirst Group"