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',
|
ces_location: 'inside',
|
||||||
...trackProps,
|
...trackProps,
|
||||||
} );
|
} );
|
||||||
};
|
if ( ! cesShownForActions || ! cesShownForActions.includes( action ) ) {
|
||||||
|
updateOptions( {
|
||||||
const addActionToShownOption = () => {
|
[ SHOWN_FOR_ACTIONS_OPTION_NAME ]: [
|
||||||
updateOptions( {
|
action,
|
||||||
[ SHOWN_FOR_ACTIONS_OPTION_NAME ]: [
|
...( cesShownForActions || [] ),
|
||||||
action,
|
],
|
||||||
...( cesShownForActions || [] ),
|
} );
|
||||||
],
|
}
|
||||||
} );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onNoticeDismissed = () => {
|
const onNoticeDismissed = () => {
|
||||||
|
@ -109,8 +108,6 @@ function _CustomerEffortScoreTracks( {
|
||||||
ces_location: 'inside',
|
ces_location: 'inside',
|
||||||
...trackProps,
|
...trackProps,
|
||||||
} );
|
} );
|
||||||
|
|
||||||
addActionToShownOption();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onModalDismissed = () => {
|
const onModalDismissed = () => {
|
||||||
|
@ -131,8 +128,6 @@ function _CustomerEffortScoreTracks( {
|
||||||
ces_location: 'inside',
|
ces_location: 'inside',
|
||||||
...trackProps,
|
...trackProps,
|
||||||
} );
|
} );
|
||||||
|
|
||||||
addActionToShownOption();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const recordScore = ( score, secondScore, comments ) => {
|
const recordScore = ( score, secondScore, comments ) => {
|
||||||
|
|
Loading…
Reference in New Issue