Commit f48e1500 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'djadmin-dast-feedback-alerts' into 'master'

Add feedback alert from user in DAST On-demand Scans

See merge request gitlab-org/gitlab!43374
parents b3c7771f 0887c359
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
}, },
data() { data() {
return { return {
isDismissed: 'false', isDismissed: false,
}; };
}, },
computed: { computed: {
...@@ -30,12 +30,12 @@ export default { ...@@ -30,12 +30,12 @@ export default {
return `${slugifyWithUnderscore(this.featureName)}_feedback_dismissed`; return `${slugifyWithUnderscore(this.featureName)}_feedback_dismissed`;
}, },
showAlert() { showAlert() {
return this.isDismissed === 'false'; return !this.isDismissed;
}, },
}, },
methods: { methods: {
dismissFeedbackAlert() { dismissFeedbackAlert() {
this.isDismissed = 'true'; this.isDismissed = true;
}, },
}, },
}; };
...@@ -43,16 +43,12 @@ export default { ...@@ -43,16 +43,12 @@ export default {
<template> <template>
<div v-show="showAlert"> <div v-show="showAlert">
<local-storage-sync <local-storage-sync v-model="isDismissed" :storage-key="storageKey" as-json />
:value="isDismissed"
:storage-key="storageKey"
@input="dismissFeedbackAlert"
/>
<gl-alert v-if="showAlert" class="gl-mt-5" @dismiss="dismissFeedbackAlert"> <gl-alert v-if="showAlert" class="gl-mt-5" @dismiss="dismissFeedbackAlert">
<gl-sprintf <gl-sprintf
:message=" :message="
__( __(
'We’ve been making changes to %{featureName} and we’d love your feedback %{linkStart}in this issue%{linkEnd} to help us improve the experience.', 'Please share your feedback about %{featureName} %{linkStart}in this issue%{linkEnd} to help us improve the experience.',
) )
" "
> >
......
...@@ -19,6 +19,7 @@ import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; ...@@ -19,6 +19,7 @@ import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { redirectTo } from '~/lib/utils/url_utility'; import { redirectTo } from '~/lib/utils/url_utility';
import dastOnDemandScanCreateMutation from '../graphql/dast_on_demand_scan_create.mutation.graphql'; import dastOnDemandScanCreateMutation from '../graphql/dast_on_demand_scan_create.mutation.graphql';
import DismissibleFeedbackAlert from '~/vue_shared/components/dismissible_feedback_alert.vue';
const ERROR_RUN_SCAN = 'ERROR_RUN_SCAN'; const ERROR_RUN_SCAN = 'ERROR_RUN_SCAN';
const ERROR_FETCH_SCANNER_PROFILES = 'ERROR_FETCH_SCANNER_PROFILES'; const ERROR_FETCH_SCANNER_PROFILES = 'ERROR_FETCH_SCANNER_PROFILES';
...@@ -52,6 +53,7 @@ export default { ...@@ -52,6 +53,7 @@ export default {
GlDropdownItem, GlDropdownItem,
GlSkeletonLoader, GlSkeletonLoader,
GlSprintf, GlSprintf,
DismissibleFeedbackAlert,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -231,6 +233,15 @@ export default { ...@@ -231,6 +233,15 @@ export default {
<template> <template>
<gl-form @submit.prevent="onSubmit"> <gl-form @submit.prevent="onSubmit">
<!--
This is a temporary change to solicit feedback from users
and shall be removed in https://gitlab.com/gitlab-org/gitlab/-/issues/255889
-->
<dismissible-feedback-alert
feature-name="on-demand DAST scans"
feedback-link="https://gitlab.com/gitlab-org/gitlab/-/issues/249684"
/>
<header class="gl-mb-6"> <header class="gl-mb-6">
<h2>{{ s__('OnDemandScans|New on-demand DAST scan') }}</h2> <h2>{{ s__('OnDemandScans|New on-demand DAST scan') }}</h2>
<p> <p>
......
---
title: Add feedback alert in DAST On-demand Scans
merge_request: 43374
author:
type: added
...@@ -19050,6 +19050,9 @@ msgstr "" ...@@ -19050,6 +19050,9 @@ msgstr ""
msgid "Please set a new password before proceeding." msgid "Please set a new password before proceeding."
msgstr "" msgstr ""
msgid "Please share your feedback about %{featureName} %{linkStart}in this issue%{linkEnd} to help us improve the experience."
msgstr ""
msgid "Please solve the reCAPTCHA" msgid "Please solve the reCAPTCHA"
msgstr "" msgstr ""
...@@ -28781,9 +28784,6 @@ msgstr "" ...@@ -28781,9 +28784,6 @@ msgstr ""
msgid "Welcome to your issue board!" msgid "Welcome to your issue board!"
msgstr "" msgstr ""
msgid "We’ve been making changes to %{featureName} and we’d love your feedback %{linkStart}in this issue%{linkEnd} to help us improve the experience."
msgstr ""
msgid "What are you searching for?" msgid "What are you searching for?"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment