Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: query preview components allow adding extra params to the request #1270

Merged
Merged
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
b116bff
feat: Add extraParams to QueryPreviewInfo type
annacv Jul 31, 2023
b60bbd9
wip: Add new prop to add injected params to the request
annacv Jul 31, 2023
5af7914
feat: Type and doc of injectedParams changed
mariorey Aug 1, 2023
a627cc3
feat: injectedParams are now linked to their query
mariorey Aug 1, 2023
456d207
feat: injectedParams type changed
mariorey Aug 1, 2023
a75a05b
feat: Change structure of injected params
mariorey Aug 1, 2023
1b28629
feat: Change static queries preview for X-components
mariorey Aug 1, 2023
72548f6
test: Add injectedParams test
annacv Aug 1, 2023
ac45301
test: Update query-preview-list.spec.ts test & component types
annacv Aug 1, 2023
cee26fa
doc: Update doc
annacv Aug 3, 2023
8e1a008
wip: create UserAcceptedAQueryPreview XEvent
annacv Aug 3, 2023
a51a00d
wip: create searchQueryPreview action
annacv Aug 3, 2023
af6a719
wip: Delete custom event from queries preview
mariorey Aug 3, 2023
663521e
wip: Add custom event to search module to perform the query preview s…
mariorey Aug 3, 2023
48ce240
wip: save selected query preview & perform a search
annacv Aug 7, 2023
1a9c819
wip: save selected query preview & perform a search
annacv Aug 8, 2023
d7d2896
feature: Add event to add the query to the different components
mariorey Aug 8, 2023
201c7c1
bugfix: Check if request should be performed
mariorey Aug 8, 2023
e95532c
bugfix: Change from sending request to search module to sending param…
mariorey Aug 9, 2023
d0e5983
feature: Related Tags and Next Queries are now working with the Query…
mariorey Aug 9, 2023
7a560e7
Code refactoring
mariorey Aug 9, 2023
f7304ae
feat: replace request getter by a query object & use it in emitters
annacv Aug 10, 2023
4fbae0b
feat: undefined on clear selected query to avoid checking object prop
annacv Aug 10, 2023
9f8711b
feature: Add query preview custom extra params to semantic-queries mo…
mariorey Aug 10, 2023
7226167
bugfix: Add selected Query Preview check to throw the correct event i…
mariorey Aug 10, 2023
25602d4
bugfix: Remove state modifying / States shouldn't be modified directly
mariorey Aug 10, 2023
1de54b3
bugfix: Add UserAcceptedQueryPreview event to search-input.vue. Now U…
mariorey Aug 10, 2023
bc1d3a1
bugfix: Remove unnecessary checks
mariorey Aug 14, 2023
773db9b
bugfix: Add selected Query Preview to search box to correctly perform…
mariorey Aug 15, 2023
f54611e
bugfix: Queries Preview works with UserAcceptedAQuery now
mariorey Aug 16, 2023
07ddc70
bugfix: Delete selectedQueryPreview state from search module
mariorey Aug 16, 2023
2b2a614
bugfix: Remove unnecessary events
mariorey Aug 16, 2023
cea3da7
feat: set debounceInMs in the module config
annacv Aug 17, 2023
57374af
feat: rm debounce
annacv Aug 17, 2023
3a087e0
chore: rm comment
annacv Aug 17, 2023
d12fe0d
chore: rm unused
annacv Aug 17, 2023
dfc7677
feat: rollback keep debounce to ensure search is not being refined
annacv Aug 21, 2023
8afac86
feat: set selected query preview inside modules, rm userAcceptedAQuer…
annacv Aug 21, 2023
0c89eaf
feat: use emitter to reset initial params, set params in search module
annacv Aug 21, 2023
c099e1d
chore: pass queryInfo rellevant info directly to commit
annacv Aug 22, 2023
13c2bd3
feat: change emitter name & update as a queryPreview event instead of…
annacv Aug 22, 2023
a900051
feat: test committing with payload working fine
annacv Aug 22, 2023
ba6f6ed
feat: emitter is needed to setParams in modules as it comes from a ge…
annacv Aug 22, 2023
87a0f24
feat: use selected query preview getter to feed the emiter, test in u…
annacv Aug 22, 2023
593dfc8
feat: use SelectedQueryPreviewChanged emitter in modules
annacv Aug 22, 2023
2572bf7
doc: fix doc to pass build
annacv Aug 22, 2023
b19770a
fix: (feat) Add type to avoid undefined error when no items w/extraPa…
annacv Aug 23, 2023
c4eaa5d
feat: add SelectedQueryPreviewChanged in HistoryQ wiring
annacv Aug 23, 2023
f6752b9
feat: add SelectedQueryPreviewChanged in recommendations wiring
annacv Aug 23, 2023
6d10177
chore: add missed doc
annacv Aug 23, 2023
88cbab6
feat: tests, ok. Use UserAcceptedAQueryPreview & use emitter to updat…
annacv Aug 23, 2023
2e0768b
wip
CachedaCodes Aug 28, 2023
0b203a5
feat: query preview components allow adding extra params to the request
CachedaCodes Aug 29, 2023
9826536
chore: update wirings and tests
CachedaCodes Sep 4, 2023
aaa420b
chore: fix wiring exports
CachedaCodes Sep 4, 2023
2c33b9b
chore: add query preview button and components tests
CachedaCodes Sep 6, 2023
602846b
chore: remove extra params from cortina query preview
CachedaCodes Sep 6, 2023
c116447
chore: unify wiring namings
CachedaCodes Sep 6, 2023
7a97094
chore: use query preview button in home
CachedaCodes Sep 6, 2023
8bb4a94
chore: fix docs warnings
CachedaCodes Sep 7, 2023
fa9bf2c
chore: remove unused getters
CachedaCodes Sep 7, 2023
e49dd4b
chore: fix query preview list test
CachedaCodes Sep 7, 2023
cd8bb29
chore: fix e2e tests
CachedaCodes Sep 7, 2023
092e933
chore: fix PR comments. Fix docs, better object compare and leftover …
CachedaCodes Sep 12, 2023
4051a3d
chore: fix import
CachedaCodes Sep 12, 2023
fdb4966
Merge remote-tracking branch 'origin/main' into feature/EMP-1554-Quer…
CachedaCodes Sep 12, 2023
bf9d6cc
chore: fix merge error
CachedaCodes Sep 12, 2023
7277501
chore: fix of the fixes
CachedaCodes Sep 14, 2023
a96e323
chore: remove sort
CachedaCodes Sep 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: test committing with payload working fine
annacv committed Aug 22, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a900051f9bdf8d5adea73a624e01d35ad22abf93
5 changes: 4 additions & 1 deletion packages/x-components/src/x-modules/search-box/wiring.ts
Original file line number Diff line number Diff line change
@@ -41,7 +41,10 @@ const setSearchBoxQuery = wireCommit('setQuery');
*
* @public
*/
const setSearchBoxSelectedQueryPreview = wireCommit('setSelectedQueryPreview');
const setSearchBoxSelectedQueryPreview = wireCommit(
'setQuery',
({ eventPayload: { query } }) => query
);

/**
* Clears the query of the search-box module.
12 changes: 9 additions & 3 deletions packages/x-components/src/x-modules/search/wiring.ts
Original file line number Diff line number Diff line change
@@ -187,14 +187,20 @@ export const resetStateIfNoRequestWire = filterTruthyPayload<InternalSearchReque
*
* @public
*/
export const SetSelectedQueryPreviewWire = wireCommit('setSelectedQueryPreview');
export const SetSelectedQueryPreviewWire = wireCommit(
'setQuery',
({ eventPayload: { query } }) => query
);

/**
* Sets the search state `params` with the selected query preview extraParams.
*
* @public
*/
export const setSelectedQueryPreviewParamsWire = wireCommit('setSelectedQueryPreviewParams');
export const setSelectedQueryPreviewParamsWire = wireCommit(
'setParams',
({ eventPayload: { extraParams } }) => extraParams
);

/**
* Search wiring.
@@ -256,7 +262,7 @@ export const searchWiring = createWiring({
UserClickedOutOfMainModal: {
clearSearchQuery
},
SetQueryPreviewParams: {
SelectedQueryPreviewParamsChanged: {
setSearchExtraParams
},
UserAcceptedAQueryPreview: {