Show feedback prompt only once (#43164)
* Show feedback prompt only once * Add changelog * Fix feedback prompt * Move changelog * Fix feedback prompt visibility * Add modalShown logic to ces
This commit is contained in:
parent
d329ced1e8
commit
d929994afb
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
Show feedback prompt only once #43164
|
|
@ -91,15 +91,14 @@ function _CustomerEffortScoreTracks( {
|
|||
ces_location: 'inside',
|
||||
...trackProps,
|
||||
} );
|
||||
};
|
||||
|
||||
const addActionToShownOption = () => {
|
||||
updateOptions( {
|
||||
[ SHOWN_FOR_ACTIONS_OPTION_NAME ]: [
|
||||
action,
|
||||
...( cesShownForActions || [] ),
|
||||
],
|
||||
} );
|
||||
if ( ! cesShownForActions || ! cesShownForActions.includes( action ) ) {
|
||||
updateOptions( {
|
||||
[ SHOWN_FOR_ACTIONS_OPTION_NAME ]: [
|
||||
action,
|
||||
...( cesShownForActions || [] ),
|
||||
],
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
const onNoticeDismissed = () => {
|
||||
|
@ -109,8 +108,6 @@ function _CustomerEffortScoreTracks( {
|
|||
ces_location: 'inside',
|
||||
...trackProps,
|
||||
} );
|
||||
|
||||
addActionToShownOption();
|
||||
};
|
||||
|
||||
const onModalDismissed = () => {
|
||||
|
@ -131,8 +128,6 @@ function _CustomerEffortScoreTracks( {
|
|||
ces_location: 'inside',
|
||||
...trackProps,
|
||||
} );
|
||||
|
||||
addActionToShownOption();
|
||||
};
|
||||
|
||||
const recordScore = ( score, secondScore, comments ) => {
|
||||
|
|
Loading…
Reference in New Issue