From 5e87123d4a6c1edeb05f83c31ee8f096b5558e0f Mon Sep 17 00:00:00 2001 From: lauramargar <114984466+lauramargar@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:01:17 +0200 Subject: [PATCH 01/21] feat: migrate PartialQueryButton and PartialResultsList (#1501) --- packages/_vue3-migration-test/src/router.ts | 6 ++ .../src/x-modules/search/components/index.ts | 1 + .../components/test-partial-results-list.vue | 50 ++++++++++ .../src/x-modules/search/x-module.ts | 2 + .../components/partial-query-button.vue | 82 ++++++++++------- .../components/partial-results-list.vue | 92 +++++++++++-------- 6 files changed, 160 insertions(+), 73 deletions(-) create mode 100644 packages/_vue3-migration-test/src/x-modules/search/components/test-partial-results-list.vue diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts index 7b921ae201..fd15497d2e 100644 --- a/packages/_vue3-migration-test/src/router.ts +++ b/packages/_vue3-migration-test/src/router.ts @@ -27,6 +27,7 @@ import { TestBaseResultImages, TestBasePanel, TestBaseKeyboardNavigation, + TestPartialResultsList, TestBaseEventsModal, TestBaseIdModal } from './'; @@ -167,6 +168,11 @@ const routes = [ name: 'TestBaseKeyboardNavigation', component: TestBaseKeyboardNavigation }, + { + path: '/partial-results-list', + name: 'PartialResultsList', + component: TestPartialResultsList + }, { path: '/base-events-modal', name: 'BaseEventsModal', diff --git a/packages/_vue3-migration-test/src/x-modules/search/components/index.ts b/packages/_vue3-migration-test/src/x-modules/search/components/index.ts index 32ee402482..b1a112de7d 100644 --- a/packages/_vue3-migration-test/src/x-modules/search/components/index.ts +++ b/packages/_vue3-migration-test/src/x-modules/search/components/index.ts @@ -1,3 +1,4 @@ export { default as TestSortDropdown } from './test-sort-dropdown.vue'; export { default as TestSortList } from './test-sort-list.vue'; export { default as TestSortPickerList } from './test-sort-picker-list.vue'; +export { default as TestPartialResultsList } from './test-partial-results-list.vue'; diff --git a/packages/_vue3-migration-test/src/x-modules/search/components/test-partial-results-list.vue b/packages/_vue3-migration-test/src/x-modules/search/components/test-partial-results-list.vue new file mode 100644 index 0000000000..463b8cca0b --- /dev/null +++ b/packages/_vue3-migration-test/src/x-modules/search/components/test-partial-results-list.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/packages/_vue3-migration-test/src/x-modules/search/x-module.ts b/packages/_vue3-migration-test/src/x-modules/search/x-module.ts index dae572726c..2ab2f330a1 100644 --- a/packages/_vue3-migration-test/src/x-modules/search/x-module.ts +++ b/packages/_vue3-migration-test/src/x-modules/search/x-module.ts @@ -3,6 +3,7 @@ import { getBannersStub } from '../../../../x-components/src/__stubs__/banners-s import { getPromotedsStub } from '../../../../x-components/src/__stubs__/promoteds-stubs.factory'; import { PrivateXModuleOptions } from '../../../../x-components/src/plugins'; import { SearchXModule } from '../../../../x-components/src/x-modules/search'; +import { getPartialResultsStub } from '../../../../x-components/src/__stubs__/partials-results-stubs.factory'; export const searchXModule = { storeModule: { @@ -11,6 +12,7 @@ export const searchXModule = { results: getResultsStub(10), promoteds: getPromotedsStub(), banners: getBannersStub(), + partialResults: getPartialResultsStub(), status: 'success' } } diff --git a/packages/x-components/src/x-modules/search/components/partial-query-button.vue b/packages/x-components/src/x-modules/search/components/partial-query-button.vue index df942bd6ab..3aaa0f5e94 100644 --- a/packages/x-components/src/x-modules/search/components/partial-query-button.vue +++ b/packages/x-components/src/x-modules/search/components/partial-query-button.vue @@ -1,5 +1,6 @@ diff --git a/packages/x-components/src/x-modules/history-queries/components/history-queries-switch.vue b/packages/x-components/src/x-modules/history-queries/components/history-queries-switch.vue index f32ea08109..44026e2fc9 100644 --- a/packages/x-components/src/x-modules/history-queries/components/history-queries-switch.vue +++ b/packages/x-components/src/x-modules/history-queries/components/history-queries-switch.vue @@ -3,14 +3,13 @@ diff --git a/packages/x-components/src/x-modules/history-queries/components/history-queries.vue b/packages/x-components/src/x-modules/history-queries/components/history-queries.vue index fd5fd310a5..1243fc01f6 100644 --- a/packages/x-components/src/x-modules/history-queries/components/history-queries.vue +++ b/packages/x-components/src/x-modules/history-queries/components/history-queries.vue @@ -1,7 +1,7 @@ diff --git a/packages/x-components/src/x-modules/history-queries/components/history-query.vue b/packages/x-components/src/x-modules/history-queries/components/history-query.vue index 05736a0649..e3450665c0 100644 --- a/packages/x-components/src/x-modules/history-queries/components/history-query.vue +++ b/packages/x-components/src/x-modules/history-queries/components/history-query.vue @@ -40,14 +40,11 @@ diff --git a/packages/x-components/src/x-modules/history-queries/components/my-history.vue b/packages/x-components/src/x-modules/history-queries/components/my-history.vue index 8f7135c2ec..c789d4a3bd 100644 --- a/packages/x-components/src/x-modules/history-queries/components/my-history.vue +++ b/packages/x-components/src/x-modules/history-queries/components/my-history.vue @@ -57,18 +57,16 @@