From 37d45d61d749f2962309760c532c2a657e03bb8b Mon Sep 17 00:00:00 2001 From: Randy Tolentino Date: Thu, 20 Jul 2023 09:58:48 -0700 Subject: [PATCH 01/16] feat(ecosystem): remove tier tabs --- pages/ecosystem.vue | 108 ++++++-------------------------------------- 1 file changed, 14 insertions(+), 94 deletions(-) diff --git a/pages/ecosystem.vue b/pages/ecosystem.vue index 0b01a0a390..64f8d4380a 100644 --- a/pages/ecosystem.vue +++ b/pages/ecosystem.vue @@ -26,29 +26,6 @@ :label="joinAction.label" :url="joinAction.url" /> -
- - - - {{ `${tierName} (${filteredMembersByTier[tierName].length})` }} - - -
- {{ selectedTierDescription }} -
-
-
@@ -135,10 +99,6 @@ import rawTiers from "~/content/ecosystem/tiers.json"; import { Member, Tier } from "~/types/ecosystem"; import { TextLink } from "~/types/links"; -interface MembersByTier { - [key: string]: Member[]; -} - const members = rawMembers as Member[]; const config = useRuntimeConfig(); @@ -173,19 +133,6 @@ useSeoMeta({ */ const tiers = rawTiers as Tier[]; const tiersNames = tiers.map((tier) => tier.name); -const selectedTab = ref("Main"); - -const selectedTier = computed(() => { - return tiers.find((tier) => tier.name === selectedTab.value); -}); - -const selectedTierDescription = computed(() => { - return selectedTier.value?.description ?? ""; -}); - -function updateSelectedTab(tab: string) { - selectedTab.value = tab; -} /** * Category filters @@ -269,31 +216,12 @@ const filteredMembers = computed(() => { return filteredMembers; }); -const filteredMembersByTier = computed(() => { - const result: MembersByTier = {}; - - tiersNames.forEach((tierName) => { - result[tierName] = filteredMembers.value.filter( - (member) => member.tier === tierName - ); - }); - - return result; -}); - -const filteredMembersFromSelectedTier = computed(() => { - return filteredMembersByTier.value[selectedTab.value]; -}); - -const filteredMembersFromSelectedTierSorted = computed(() => { +const filteredMembersSorted = computed(() => { if (selectedSortingOption.value === "stars") { - return filteredMembersFromSelectedTier.value.sort( - (a, b) => b.stars - a.stars - ); + return filteredMembers.value.sort((a, b) => b.stars - a.stars); } - // The list of members is sorted by name by default. - return filteredMembersFromSelectedTier.value; + return filteredMembers.value.sort((a, b) => a.name.localeCompare(b.name)); }); @@ -302,14 +230,6 @@ const filteredMembersFromSelectedTierSorted = computed(() => { @use "~/assets/scss/helpers/classes.scss"; .ecosystem-page { - &__tiers { - margin-top: carbon.$spacing-10; - - &__description { - padding-top: carbon.$spacing-05; - } - } - &__tier-panel { margin-top: carbon.$spacing-07; } From 1f4b6cb77075fe5e57b265a4c5d5d523cf5ffd1b Mon Sep 17 00:00:00 2001 From: Randy Tolentino Date: Thu, 20 Jul 2023 11:14:23 -0700 Subject: [PATCH 02/16] feat(ecosystem): add tier filters --- pages/ecosystem.vue | 62 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/pages/ecosystem.vue b/pages/ecosystem.vue index 64f8d4380a..37c0f6db76 100644 --- a/pages/ecosystem.vue +++ b/pages/ecosystem.vue @@ -26,8 +26,22 @@ :label="joinAction.label" :url="joinAction.url" /> - +