From d98d8b5b5ffdfe29ba9c046351ab9c3c65f235a0 Mon Sep 17 00:00:00 2001 From: hassnian Date: Wed, 2 Oct 2024 17:30:46 +0500 Subject: [PATCH 1/5] add(ExploreSort): price_ASC as price_ASC_NULLS_LAST --- components/explore/ExploreSort.vue | 20 -------------------- components/items/ItemsGrid/useItemsGrid.ts | 18 ------------------ components/profile/OrderByDropdown.vue | 20 -------------------- locales/de.json | 8 ++++---- locales/en.json | 4 ++-- locales/es.json | 8 ++++---- locales/fr.json | 4 ++-- locales/hi.json | 4 ++-- locales/id.json | 2 +- locales/pt.json | 8 ++++---- locales/ru.json | 8 ++++---- locales/ua.json | 8 ++++---- utils/constants.ts | 2 +- utils/sort.ts | 18 ++++++++++++++++++ 14 files changed, 46 insertions(+), 86 deletions(-) create mode 100644 utils/sort.ts diff --git a/components/explore/ExploreSort.vue b/components/explore/ExploreSort.vue index ca121f8a8f..2fb0cb9415 100644 --- a/components/explore/ExploreSort.vue +++ b/components/explore/ExploreSort.vue @@ -71,26 +71,6 @@ const { $i18n } = useNuxtApp() const { hasItems: isItems } = useHasRoute() const { options } = useRouteSortByOptions() -function removeDuplicateSortKeys(options: string[]) { - const uniqueOptions = {} - - if (!Array.isArray(options)) { - return [] - } - - options.forEach((option) => { - const opt = option.split('_') - const identifier = opt[0] - const sort = opt[1] - - uniqueOptions[identifier] = sort - }) - - return Object.keys(uniqueOptions).map((identifier) => { - return `${identifier}_${uniqueOptions[identifier]}` - }) -} - const sortOptions = ref([]) const selectedSort = computed({ get: () => sortOptions.value, diff --git a/components/items/ItemsGrid/useItemsGrid.ts b/components/items/ItemsGrid/useItemsGrid.ts index 6fb8733be8..5b22c5225f 100644 --- a/components/items/ItemsGrid/useItemsGrid.ts +++ b/components/items/ItemsGrid/useItemsGrid.ts @@ -140,24 +140,6 @@ export function useFetchSearch({ ]), } - const isPriceSortActive = (sort?: string | null | (string | null)[]) => { - if (!sort) { - return false - } - const sortArray = Array.isArray(sort) ? sort : [sort] - return sortArray.some(sortBy => (sortBy ?? '').includes('price')) - } - watch( - () => route.query.sort, - (newSort, oldSort) => { - const priceSortHasBeenActivated - = isPriceSortActive(newSort) && !isPriceSortActive(oldSort) - if (priceSortHasBeenActivated && route.query.listed !== 'true') { - route.query.listed = 'true' - } - }, - ) - const searchForToken = getSearchCriteria( search?.length ? search : searchParams.value, ) diff --git a/components/profile/OrderByDropdown.vue b/components/profile/OrderByDropdown.vue index 0a49754a02..60ca2616a1 100644 --- a/components/profile/OrderByDropdown.vue +++ b/components/profile/OrderByDropdown.vue @@ -100,26 +100,6 @@ const options = computed(() => { : NFT_SQUID_SORT_CONDITION_LIST }) -function removeDuplicateSortKeys(options: string[]) { - const uniqueOptions = {} - - if (!Array.isArray(options)) { - return [] - } - - options.forEach((option) => { - const opt = option.split('_') - const identifier = opt[0] - const sort = opt[1] - - uniqueOptions[identifier] = sort - }) - - return Object.keys(uniqueOptions).map((identifier) => { - return `${identifier}_${uniqueOptions[identifier]}` - }) -} - const sortOptions = ref([]) const selectedSort = computed({ get: () => sortOptions.value, diff --git a/locales/de.json b/locales/de.json index e479614c06..4e5e10e26e 100644 --- a/locales/de.json +++ b/locales/de.json @@ -622,7 +622,7 @@ "BLOCK_NUMBER_ASC": "Älteste", "BLOCK_NUMBER_DESC": "Kürzlich erstellt", "EMOTES_COUNT_DESC": "Meiste Reaktionen", - "PRICE_ASC": "Presi: Niedrig zu Hoch", + "price_ASC_NULLS_LAST": "Presi: Niedrig zu Hoch", "PRICE_DESC": "Preis: Hoch zu Niedrig", "SN_ASC": "Alphabetisch", "UPDATED_AT_ASC": "Unpopulär", @@ -633,7 +633,7 @@ "BLOCK_NUMBER_ASC": "Älteste", "BLOCK_NUMBER_DESC": "Kürzlich erstellt", "EMOTES_COUNT_DESC": "Meiste Reaktionen", - "PRICE_ASC": "Preis: Niedrig zu Hoch", + "price_ASC_NULLS_LAST": "Preis: Niedrig zu Hoch", "PRICE_DESC": "Preis: Hoch zu Niedrig", "SN_ASC": "Alphabetisch", "UPDATED_AT_ASC": "Unpopulär", @@ -641,7 +641,7 @@ "blockNumber_ASC": "Ältere zuerst", "blockNumber_DESC": "Neue zuerst", "listed": "Jetzt kaufen", - "price_ASC": "Preis: Niedrig zu Hoch", + "price_ASC_NULLS_LAST": "Preis: Niedrig zu Hoch", "price_DESC": "Preis: Hoch zu Niedrig", "sn_ASC": "Alphabetisch", "updatedAt_ASC": "Unpopulär", @@ -649,7 +649,7 @@ }, "listed": "Jetzt kaufen", "own": "Eigene", - "price_ASC": "Preis: Niedrig zu Hoch", + "price_ASC_NULLS_LAST": "Preis: Niedrig zu Hoch", "price_DESC": "Preis: Hoch zu Niedrig", "sn_ASC": "Alphabetisch", "updatedAt_ASC": "Unpopulär", diff --git a/locales/en.json b/locales/en.json index ec2eefb832..181912f14c 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1720,7 +1720,7 @@ "blockNumber_ASC": "Oldest", "blockNumber_DESC": "Newest", "highestSale_DESC": "Highest Sale", - "price_ASC": "Price: Low to High", + "price_ASC_NULLS_LAST": "Price: Low to High", "price_DESC": "Price: High to Low", "sn_ASC": "Serial (Low→High)", "sn_DESC": "Serial (High→Low)", @@ -1735,7 +1735,7 @@ "listed": "Listed for sale", "listed_RMRK": "Listed", "own": "Own", - "price_ASC": "Price: Low to High", + "price_ASC_NULLS_LAST": "Price: Low to High", "price_DESC": "Price: High to Low", "sn_ASC": "Serial (Low→High)", "sn_DESC": "Serial (High→Low)", diff --git a/locales/es.json b/locales/es.json index 02045f9818..b2165233b4 100644 --- a/locales/es.json +++ b/locales/es.json @@ -587,7 +587,7 @@ "BLOCK_NUMBER_ASC": "El más antiguo", "BLOCK_NUMBER_DESC": "Recién creado", "EMOTES_COUNT_DESC": "El mas reaccionado", - "PRICE_ASC": "Precio: de menor a mayor", + "price_ASC_NULLS_LAST": "Precio: de menor a mayor", "PRICE_DESC": "Precio: de mayor a menor", "SN_ASC": "Alfabéticamente", "UPDATED_AT_ASC": "Impopular", @@ -598,7 +598,7 @@ "BLOCK_NUMBER_ASC": "El más antiguo", "BLOCK_NUMBER_DESC": "Recién creado", "EMOTES_COUNT_DESC": "El mas reaccionado", - "PRICE_ASC": "Precio: de menor a mayor", + "price_ASC_NULLS_LAST": "Precio: de menor a mayor", "PRICE_DESC": "Precio: de mayor a menor", "SN_ASC": "Alfabéticamente", "UPDATED_AT_ASC": "Impopular", @@ -606,7 +606,7 @@ "blockNumber_ASC": "Antiguo primero", "blockNumber_DESC": "Nuevo primero", "listed": "Compre ahora", - "price_ASC": "Precio: de menor a mayor", + "price_ASC_NULLS_LAST": "Precio: de menor a mayor", "price_DESC": "Precio: de mayor a menor", "sn_ASC": "Alfabéticamente", "updatedAt_ASC": "Impopular", @@ -614,7 +614,7 @@ }, "listed": "Compre ahora", "own": "En posesión", - "price_ASC": "Precio: de menor a mayor", + "price_ASC_NULLS_LAST": "Precio: de menor a mayor", "price_DESC": "Precio: de mayor a menor", "sn_ASC": "Alfabéticamente", "updatedAt_ASC": "Impopular", diff --git a/locales/fr.json b/locales/fr.json index bcde48bdad..e016dc3032 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -292,7 +292,7 @@ "blockNumber_ASC": "Ancien", "blockNumber_DESC": "Nouveau", "listed": "En vente", - "price_ASC": "Prix : du plus bas au plus haut", + "price_ASC_NULLS_LAST": "Prix : du plus bas au plus haut", "price_DESC": "Prix : du plus haut au plus bas", "sn_ASC": "Alphabétiquement", "sortBy": "Trier par", @@ -303,7 +303,7 @@ }, "listed": "En vente", "own": "Possédé", - "price_ASC": "Prix : du plus bas au plus haut", + "price_ASC_NULLS_LAST": "Prix : du plus bas au plus haut", "price_DESC": "Prix : du plus haut au plus bas", "sn_ASC": "Alphabétiquement", "updatedAt_ASC": "Peu populaire", diff --git a/locales/hi.json b/locales/hi.json index 61d59b0eb0..6bccd7e82e 100644 --- a/locales/hi.json +++ b/locales/hi.json @@ -1328,7 +1328,7 @@ "blockNumber_DESC": "नवीनतम", "highestSale_DESC": "सबसे अधिक बिक्री", "listed": "अब खरीदें", - "price_ASC": "मूल्य: कम से उच्च", + "price_ASC_NULLS_LAST": "मूल्य: कम से उच्च", "price_DESC": "मूल्य: उच्च से कम", "sn_ASC": "वर्णमाला के अनुसार", "sortBy": "क्रमबद्ध करें द्वारा", @@ -1341,7 +1341,7 @@ "instance_ASC": "क्रम", "listed": "अभी खरीदें", "own": "अपना", - "price_ASC": "मूल्य: कम से उच्च", + "price_ASC_NULLS_LAST": "मूल्य: कम से उच्च", "price_DESC": "मूल्य: उच्च से कम", "sn_ASC": "वर्णक्रमानुसार", "updatedAt_ASC": "अप्रसार्पित", diff --git a/locales/id.json b/locales/id.json index c69baf9e28..9974a5b198 100644 --- a/locales/id.json +++ b/locales/id.json @@ -397,7 +397,7 @@ "sort": { "BLOCK_NUMBER_ASC": "Urutan Akhir", "BLOCK_NUMBER_DESC": "Urutan Pertama", - "PRICE_ASC": "Harga Rendah Ke Tinggi", + "price_ASC_NULLS_LAST": "Harga Rendah Ke Tinggi", "PRICE_DESC": "Harga Tinggi Ke Rendah", "UPDATED_AT_ASC": "Aktifitas Terakhir", "UPDATED_AT_DESC": "Aktifitas Terbaru", diff --git a/locales/pt.json b/locales/pt.json index 40d8645156..a976a971a7 100644 --- a/locales/pt.json +++ b/locales/pt.json @@ -560,7 +560,7 @@ "BLOCK_NUMBER_ASC": "O mais antigo", "BLOCK_NUMBER_DESC": "Criado recentemente", "EMOTES_COUNT_DESC": "O Mais reagido", - "PRICE_ASC": "Preço: Menor para Maior", + "price_ASC_NULLS_LAST": "Preço: Menor para Maior", "PRICE_DESC": "Preço: Maior para Menor", "SN_ASC": "Alfabeticamente", "UPDATED_AT_ASC": "Impopular", @@ -571,7 +571,7 @@ "BLOCK_NUMBER_ASC": "O mais antigo", "BLOCK_NUMBER_DESC": "Criado recentemente", "EMOTES_COUNT_DESC": "O Mais reagido", - "PRICE_ASC": "Preço: Menor para Maior", + "price_ASC_NULLS_LAST": "Preço: Menor para Maior", "PRICE_DESC": "Preço: Maior para Menor", "SN_ASC": "Alfabeticamente", "UPDATED_AT_ASC": "Impopular", @@ -579,7 +579,7 @@ "blockNumber_ASC": "Antigo primeiro", "blockNumber_DESC": "Novo primeiro", "listed": "Compre agora", - "price_ASC": "Preço: Menor para Maior", + "price_ASC_NULLS_LAST": "Preço: Menor para Maior", "price_DESC": "Preço: Maior para Menor", "sn_ASC": "Alfabeticamente", "updatedAt_ASC": "Impopular", @@ -587,7 +587,7 @@ }, "listed": "Compre agora", "own": "Em posse", - "price_ASC": "Preço: Menor para Maior", + "price_ASC_NULLS_LAST": "Preço: Menor para Maior", "price_DESC": "Preço: Maior para Menor", "sn_ASC": "Alfabeticamente", "updatedAt_ASC": "Impopular", diff --git a/locales/ru.json b/locales/ru.json index a1fa52b795..741833bdbd 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -404,7 +404,7 @@ "BLOCK_NUMBER_ASC": "Старейший", "BLOCK_NUMBER_DESC": "Недавно созданный", "EMOTES_COUNT_DESC": "Наибольшее количество реакций", - "PRICE_ASC": "Цена: от низкой до высокой", + "price_ASC_NULLS_LAST": "Цена: от низкой до высокой", "PRICE_DESC": "Цена: от высокой до низкой", "SN_ASC": "В алфавитном порядке", "UPDATED_AT_ASC": "Непопулярный", @@ -413,7 +413,7 @@ "blockNumber_DESC": "Недавно созданный", "listed": "Купить сейчас", "own": "Собственный", - "price_ASC": "Цена: от низкой до высокой", + "price_ASC_NULLS_LAST": "Цена: от низкой до высокой", "price_DESC": "Цена: от высокой до низкой", "sn_ASC": "В алфавитном порядке", "updatedAt_ASC": "Непопулярный", @@ -422,7 +422,7 @@ "BLOCK_NUMBER_ASC": "Старейший", "BLOCK_NUMBER_DESC": "Недавно созданный", "EMOTES_COUNT_DESC": "Наибольшее количество реакций", - "PRICE_ASC": "Цена: от низкой до высокой", + "price_ASC_NULLS_LAST": "Цена: от низкой до высокой", "PRICE_DESC": "Цена: от высокой до низкой", "SN_ASC": "В алфавитном порядке", "UPDATED_AT_ASC": "Непопулярный", @@ -430,7 +430,7 @@ "blockNumber_ASC": "Сначала старый", "blockNumber_DESC": "Сначала новый", "listed": "Купить сейчас", - "price_ASC": "Цена: от низкой до высокой", + "price_ASC_NULLS_LAST": "Цена: от низкой до высокой", "price_DESC": "Цена: от высокой до низкой", "sn_ASC": "В алфавитном порядке", "updatedAt_ASC": "Непопулярный", diff --git a/locales/ua.json b/locales/ua.json index ac47b1d918..170eec96f7 100644 --- a/locales/ua.json +++ b/locales/ua.json @@ -376,7 +376,7 @@ "BLOCK_NUMBER_ASC": "Найстаріший", "BLOCK_NUMBER_DESC": "Нещодавно створений", "EMOTES_COUNT_DESC": "Найбільше реакцій", - "PRICE_ASC": "Ціна: від низької до високої", + "price_ASC_NULLS_LAST": "Ціна: від низької до високої", "PRICE_DESC": "Ціна: від високої до низької", "SN_ASC": "За алфавітом", "UPDATED_AT_ASC": "Непопулярний", @@ -385,7 +385,7 @@ "blockNumber_DESC": "Нещодавно створений", "listed": "Купити зараз", "own": "Власний", - "price_ASC": "Ціна: від низької до високої", + "price_ASC_NULLS_LAST": "Ціна: від низької до високої", "price_DESC": "Ціна: від високої до низької", "sn_ASC": "За алфавітом", "updatedAt_ASC": "Непопулярний", @@ -394,7 +394,7 @@ "BLOCK_NUMBER_ASC": "Найстаріший", "BLOCK_NUMBER_DESC": "Нещодавно створений", "EMOTES_COUNT_DESC": "Найбільше реакцій", - "PRICE_ASC": "Ціна: від низької до високої", + "price_ASC_NULLS_LAST": "Ціна: від низької до високої", "PRICE_DESC": "Ціна: від високої до низької", "SN_ASC": "За алфавітом", "UPDATED_AT_ASC": "Непопулярний", @@ -402,7 +402,7 @@ "blockNumber_ASC": "Спочатку старий", "blockNumber_DESC": "Спочатку новий", "listed": "Купити зараз", - "price_ASC": "Ціна: від низької до високої", + "price_ASC_NULLS_LAST": "Ціна: від низької до високої", "price_DESC": "Ціна: від високої до низької", "sn_ASC": "За алфавітом", "updatedAt_ASC": "Непопулярний", diff --git a/utils/constants.ts b/utils/constants.ts index 5bf0aa8717..5396c7af75 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -74,7 +74,7 @@ export const NFT_SQUID_SORT_CONDITION_LIST: string[] = [ 'blockNumber_ASC', 'updatedAt_DESC', 'updatedAt_ASC', - 'price_ASC', + 'price_ASC_NULLS_LAST', 'price_DESC', ] diff --git a/utils/sort.ts b/utils/sort.ts new file mode 100644 index 0000000000..f76f80df96 --- /dev/null +++ b/utils/sort.ts @@ -0,0 +1,18 @@ +export function removeDuplicateSortKeys(options: string[]) { + const uniqueOptions = {} + + if (!Array.isArray(options)) { + return [] + } + + options.forEach((option) => { + const [identifier, ...rest] = option.split('_') + const sort = rest.join('_') + + uniqueOptions[identifier] = sort + }) + + return Object.keys(uniqueOptions).map((identifier) => { + return `${identifier}_${uniqueOptions[identifier]}` + }) +} From 910c2ab31627059d2f0e3b51eb2122ad757856e9 Mon Sep 17 00:00:00 2001 From: hassnian <44554284+hassnian@users.noreply.github.com> Date: Mon, 21 Oct 2024 08:46:46 +0500 Subject: [PATCH 2/5] ref(explore-items): remove preselct listed filter --- components/search/Search.vue | 6 ------ pages/[prefix]/explore/items.vue | 14 +------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/components/search/Search.vue b/components/search/Search.vue index 9b2af27213..afb03738c0 100644 --- a/components/search/Search.vue +++ b/components/search/Search.vue @@ -161,12 +161,6 @@ const updateSortBy = useDebounceFn((value: string[] | string) => { const final = (Array.isArray(value) ? value : [value]).filter(condition => sortByOptions.value.includes(condition), ) - const listed = final.some( - condition => condition.toLowerCase().indexOf('price') > -1, - ) - if (listed && !vListed.value) { - vListed.value = true - } replaceUrl({ sort: final }) diff --git a/pages/[prefix]/explore/items.vue b/pages/[prefix]/explore/items.vue index 7bd0bcbab2..8a7c93a2ed 100644 --- a/pages/[prefix]/explore/items.vue +++ b/pages/[prefix]/explore/items.vue @@ -43,19 +43,7 @@ watch(urlPrefix, () => checkRouteAvailability()) onBeforeMount(() => checkRouteAvailability()) definePageMeta({ - layout: 'explore-layout', - middleware: [ - function (to) { - if (to.query.listed === undefined) { - return navigateTo({ - path: to.path, - query: { - ...to.query, - listed: 'true', - } }) - } - }, - ], + layout: 'explore-layout' }) useSeoMeta({ From 2d1fc2c46b6a92fdc80e198efc8456ac3dab3d85 Mon Sep 17 00:00:00 2001 From: hassnian <44554284+hassnian@users.noreply.github.com> Date: Mon, 21 Oct 2024 08:56:29 +0500 Subject: [PATCH 3/5] format: run lint:fix --- pages/[prefix]/explore/items.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/[prefix]/explore/items.vue b/pages/[prefix]/explore/items.vue index 8a7c93a2ed..b778bfbbd8 100644 --- a/pages/[prefix]/explore/items.vue +++ b/pages/[prefix]/explore/items.vue @@ -43,7 +43,7 @@ watch(urlPrefix, () => checkRouteAvailability()) onBeforeMount(() => checkRouteAvailability()) definePageMeta({ - layout: 'explore-layout' + layout: 'explore-layout', }) useSeoMeta({ From b4862c306a8d8c969cded98aa75af54641567529 Mon Sep 17 00:00:00 2001 From: hassnian <44554284+hassnian@users.noreply.github.com> Date: Mon, 21 Oct 2024 08:57:28 +0500 Subject: [PATCH 4/5] format(locales): run locales:order --- locales/de.json | 2 -- locales/es.json | 2 -- locales/id.json | 4 ++-- locales/pt.json | 2 -- locales/ru.json | 2 -- locales/ua.json | 2 -- 6 files changed, 2 insertions(+), 12 deletions(-) diff --git a/locales/de.json b/locales/de.json index 4e5e10e26e..eff3857975 100644 --- a/locales/de.json +++ b/locales/de.json @@ -622,7 +622,6 @@ "BLOCK_NUMBER_ASC": "Älteste", "BLOCK_NUMBER_DESC": "Kürzlich erstellt", "EMOTES_COUNT_DESC": "Meiste Reaktionen", - "price_ASC_NULLS_LAST": "Presi: Niedrig zu Hoch", "PRICE_DESC": "Preis: Hoch zu Niedrig", "SN_ASC": "Alphabetisch", "UPDATED_AT_ASC": "Unpopulär", @@ -633,7 +632,6 @@ "BLOCK_NUMBER_ASC": "Älteste", "BLOCK_NUMBER_DESC": "Kürzlich erstellt", "EMOTES_COUNT_DESC": "Meiste Reaktionen", - "price_ASC_NULLS_LAST": "Preis: Niedrig zu Hoch", "PRICE_DESC": "Preis: Hoch zu Niedrig", "SN_ASC": "Alphabetisch", "UPDATED_AT_ASC": "Unpopulär", diff --git a/locales/es.json b/locales/es.json index b2165233b4..f44ab696fc 100644 --- a/locales/es.json +++ b/locales/es.json @@ -587,7 +587,6 @@ "BLOCK_NUMBER_ASC": "El más antiguo", "BLOCK_NUMBER_DESC": "Recién creado", "EMOTES_COUNT_DESC": "El mas reaccionado", - "price_ASC_NULLS_LAST": "Precio: de menor a mayor", "PRICE_DESC": "Precio: de mayor a menor", "SN_ASC": "Alfabéticamente", "UPDATED_AT_ASC": "Impopular", @@ -598,7 +597,6 @@ "BLOCK_NUMBER_ASC": "El más antiguo", "BLOCK_NUMBER_DESC": "Recién creado", "EMOTES_COUNT_DESC": "El mas reaccionado", - "price_ASC_NULLS_LAST": "Precio: de menor a mayor", "PRICE_DESC": "Precio: de mayor a menor", "SN_ASC": "Alfabéticamente", "UPDATED_AT_ASC": "Impopular", diff --git a/locales/id.json b/locales/id.json index 9974a5b198..0b827536f8 100644 --- a/locales/id.json +++ b/locales/id.json @@ -397,11 +397,11 @@ "sort": { "BLOCK_NUMBER_ASC": "Urutan Akhir", "BLOCK_NUMBER_DESC": "Urutan Pertama", - "price_ASC_NULLS_LAST": "Harga Rendah Ke Tinggi", "PRICE_DESC": "Harga Tinggi Ke Rendah", "UPDATED_AT_ASC": "Aktifitas Terakhir", "UPDATED_AT_DESC": "Aktifitas Terbaru", - "listed": "Beli Sekarang" + "listed": "Beli Sekarang", + "price_ASC_NULLS_LAST": "Harga Rendah Ke Tinggi" }, "spotlight": { "averagePrice": "Ø Harga", diff --git a/locales/pt.json b/locales/pt.json index a976a971a7..bafe82b2a4 100644 --- a/locales/pt.json +++ b/locales/pt.json @@ -560,7 +560,6 @@ "BLOCK_NUMBER_ASC": "O mais antigo", "BLOCK_NUMBER_DESC": "Criado recentemente", "EMOTES_COUNT_DESC": "O Mais reagido", - "price_ASC_NULLS_LAST": "Preço: Menor para Maior", "PRICE_DESC": "Preço: Maior para Menor", "SN_ASC": "Alfabeticamente", "UPDATED_AT_ASC": "Impopular", @@ -571,7 +570,6 @@ "BLOCK_NUMBER_ASC": "O mais antigo", "BLOCK_NUMBER_DESC": "Criado recentemente", "EMOTES_COUNT_DESC": "O Mais reagido", - "price_ASC_NULLS_LAST": "Preço: Menor para Maior", "PRICE_DESC": "Preço: Maior para Menor", "SN_ASC": "Alfabeticamente", "UPDATED_AT_ASC": "Impopular", diff --git a/locales/ru.json b/locales/ru.json index 741833bdbd..5e74c4b7d8 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -404,7 +404,6 @@ "BLOCK_NUMBER_ASC": "Старейший", "BLOCK_NUMBER_DESC": "Недавно созданный", "EMOTES_COUNT_DESC": "Наибольшее количество реакций", - "price_ASC_NULLS_LAST": "Цена: от низкой до высокой", "PRICE_DESC": "Цена: от высокой до низкой", "SN_ASC": "В алфавитном порядке", "UPDATED_AT_ASC": "Непопулярный", @@ -422,7 +421,6 @@ "BLOCK_NUMBER_ASC": "Старейший", "BLOCK_NUMBER_DESC": "Недавно созданный", "EMOTES_COUNT_DESC": "Наибольшее количество реакций", - "price_ASC_NULLS_LAST": "Цена: от низкой до высокой", "PRICE_DESC": "Цена: от высокой до низкой", "SN_ASC": "В алфавитном порядке", "UPDATED_AT_ASC": "Непопулярный", diff --git a/locales/ua.json b/locales/ua.json index 170eec96f7..a8178f6957 100644 --- a/locales/ua.json +++ b/locales/ua.json @@ -376,7 +376,6 @@ "BLOCK_NUMBER_ASC": "Найстаріший", "BLOCK_NUMBER_DESC": "Нещодавно створений", "EMOTES_COUNT_DESC": "Найбільше реакцій", - "price_ASC_NULLS_LAST": "Ціна: від низької до високої", "PRICE_DESC": "Ціна: від високої до низької", "SN_ASC": "За алфавітом", "UPDATED_AT_ASC": "Непопулярний", @@ -394,7 +393,6 @@ "BLOCK_NUMBER_ASC": "Найстаріший", "BLOCK_NUMBER_DESC": "Нещодавно створений", "EMOTES_COUNT_DESC": "Найбільше реакцій", - "price_ASC_NULLS_LAST": "Ціна: від низької до високої", "PRICE_DESC": "Ціна: від високої до низької", "SN_ASC": "За алфавітом", "UPDATED_AT_ASC": "Непопулярний", From 52c1df9ed94f4cdf2a78d516cf907fdf59049139 Mon Sep 17 00:00:00 2001 From: hassnian <44554284+hassnian@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:09:21 +0500 Subject: [PATCH 5/5] fix(explore.spec.ts): `price asc` filter click --- tests/e2e/explore.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/explore.spec.ts b/tests/e2e/explore.spec.ts index 2bdb313ea2..22154967c5 100644 --- a/tests/e2e/explore.spec.ts +++ b/tests/e2e/explore.spec.ts @@ -79,8 +79,8 @@ test('Explore Items', async ({ page, Commands }) => { await test.step('Sort results by price, ascending', async () => { const exploreSort = page.getByTestId('explore-sort-dropdown').nth(1) await exploreSort.click() - await page.getByTestId('price_ASC').nth(1).click() - const btnAsc = await page.$('[value="price_ASC"]') + await page.getByTestId('price_ASC_NULLS_LAST').nth(1).click() + const btnAsc = await page.$('[value="price_ASC_NULLS_LAST"]') await btnAsc?.click() await page.keyboard.press('Escape') })