-
Notifications
You must be signed in to change notification settings - Fork 21
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) Implement config utils in the modules with config #1321
Conversation
/** | ||
* Sets the {@link EmpathizeState.config } config. | ||
* | ||
* @param config - The new config. | ||
*/ | ||
setConfig(config: EmpathizeConfig): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type already exists in the config-store.utils.ts
. You have to import the mutations type and make the mutations extend that type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, regarding this, if we extend the mutations we shouldn't need to declare them here, so we could remove setConfig
& mergeConfig
types from here. If this is okay, why are we keeping setQuery
mutation types in modules if we are extending QueryMutations
??
@@ -14,7 +15,8 @@ export const empathizeXStoreModule: EmpathizeXStoreModule = { | |||
mutations: { | |||
setIsOpen(state, isOpen) { | |||
state.isOpen = isOpen; | |||
} | |||
}, | |||
setConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing the mergeConfig
mutation.
BREAKING CHANGE: setTaggingConfig mutation has been renamed/replaced by setConfig EMP-2328
BREAKING CHANGE: setFacetsConfig mutation has been renamed/replaced by setConfig EMP-2328
BREAKING CHANGE: setPageSize mutation has been renamed/replaced by setConfig EMP-2328
…hese mutations outside the modules EMP-2328
0df2737
to
9a39dc5
Compare
BREAKING CHANGE: setPageSize mutation and setTaggingConfig mutation have been replaced with setConfig and mergeConfig mutations EMP-2328
…)" This reverts commit 393d758.
EMP-2328
BREAKING CHANGES:
setTaggingConfig
mutation has been renamed/replaced bysetConfig
setFacetsConfig
mutation has been renamed/replaced bysetConfig
setPageSize
mutation has been renamed/replaced bysetConfig
Pull request template
A new store util has been created. This PR uses this config store util in the modules that have a config, no matter if they are actually doing it.
Motivation and context
The aim of this task is to enable modifying the module's config from outside them (e.g., via the experience controls module).
Type of change
What is the destination branch of this PR?
Main
How has this been tested?