Commit 624dd35b authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'msj-service-desk-empty' into 'master'

Improve Service Desk empty states

See merge request gitlab-org/gitlab!54006
parents 31770d19 4e231556
import { __ } from '~/locale'; import { s__ } from '~/locale';
/** /**
* Generates empty state messages for Service Desk issues list. * Generates empty state messages for Service Desk issues list.
...@@ -15,23 +15,23 @@ export function generateMessages(emptyStateMeta) { ...@@ -15,23 +15,23 @@ export function generateMessages(emptyStateMeta) {
incomingEmailHelpPage, incomingEmailHelpPage,
} = emptyStateMeta; } = emptyStateMeta;
const serviceDeskSupportedTitle = __( const serviceDeskSupportedTitle = s__(
'Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab', 'ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab',
); );
const serviceDeskSupportedMessage = __( const serviceDeskSupportedMessage = s__(
'Those emails automatically become issues (with the comments becoming the email conversation) listed here.', 'ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation.',
); );
const commonDescription = ` const commonDescription = `
<span>${serviceDeskSupportedMessage}</span> <span>${serviceDeskSupportedMessage}</span>
<a href="${serviceDeskHelpPage}">${__('Read more')}</a>`; <a href="${serviceDeskHelpPage}">${s__('Learn more.')}</a>`;
return { return {
serviceDeskEnabledAndCanEditProjectSettings: { serviceDeskEnabledAndCanEditProjectSettings: {
title: serviceDeskSupportedTitle, title: serviceDeskSupportedTitle,
svgPath, svgPath,
description: `<p>${__('Have your users email')} description: `<p>${s__('ServiceDesk|Your users can send emails to this address:')}
<code>${serviceDeskAddress}</code> <code>${serviceDeskAddress}</code>
</p> </p>
${commonDescription}`, ${commonDescription}`,
...@@ -46,7 +46,7 @@ export function generateMessages(emptyStateMeta) { ...@@ -46,7 +46,7 @@ export function generateMessages(emptyStateMeta) {
svgPath, svgPath,
description: commonDescription, description: commonDescription,
primaryLink: editProjectPage, primaryLink: editProjectPage,
primaryText: __('Turn on Service Desk'), primaryText: s__('ServiceDesk|Enable Service Desk'),
}, },
serviceDeskDisabledAndCannotEditProjectSettings: { serviceDeskDisabledAndCannotEditProjectSettings: {
title: serviceDeskSupportedTitle, title: serviceDeskSupportedTitle,
...@@ -54,19 +54,19 @@ export function generateMessages(emptyStateMeta) { ...@@ -54,19 +54,19 @@ export function generateMessages(emptyStateMeta) {
description: commonDescription, description: commonDescription,
}, },
serviceDeskIsNotSupported: { serviceDeskIsNotSupported: {
title: __('Service Desk is not supported'), title: s__('ServiceDesk|Service Desk is not supported'),
svgPath, svgPath,
description: __( description: s__(
'In order to enable Service Desk for your instance, you must first set up incoming email.', 'ServiceDesk|To enable Service Desk on this instance, an instance administrator must first set up incoming email.',
), ),
primaryLink: incomingEmailHelpPage, primaryLink: incomingEmailHelpPage,
primaryText: __('More information'), primaryText: s__('Learn more.'),
}, },
serviceDeskIsNotEnabled: { serviceDeskIsNotEnabled: {
title: __('Service Desk is not enabled'), title: s__('ServiceDesk|Service Desk is not enabled'),
svgPath, svgPath,
description: __( description: s__(
'For help setting up the Service Desk for your instance, please contact an administrator.', 'ServiceDesk|For help setting up the Service Desk for your instance, please contact an administrator.',
), ),
}, },
}; };
......
- service_desk_enabled = @project.service_desk_enabled? - service_desk_enabled = @project.service_desk_enabled?
- can_edit_project_settings = can?(current_user, :admin_project, @project) - can_edit_project_settings = can?(current_user, :admin_project, @project)
- title_text = _("Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab") - title_text = s_("ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab")
- if Gitlab::ServiceDesk.supported? - if Gitlab::ServiceDesk.supported?
.empty-state .empty-state
...@@ -13,21 +13,21 @@ ...@@ -13,21 +13,21 @@
- if can_edit_project_settings && service_desk_enabled - if can_edit_project_settings && service_desk_enabled
%p %p
= _("Have your users email") = s_("ServiceDesk|Your users can send emails to this address:")
%code= @project.service_desk_address %code= @project.service_desk_address
%span= _("Those emails automatically become issues (with the comments becoming the email conversation) listed here.") %span= s_("ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation.")
= link_to _('Read more'), help_page_path('user/project/service_desk') = link_to _('Learn more.'), help_page_path('user/project/service_desk')
- if can_edit_project_settings && !service_desk_enabled - if can_edit_project_settings && !service_desk_enabled
.text-center .text-center
= link_to _("Turn on Service Desk"), edit_project_path(@project), class: 'gl-button btn btn-success' = link_to s_("ServiceDesk|Enable Service Desk"), edit_project_path(@project), class: 'gl-button btn btn-success'
- else - else
.empty-state .empty-state
.svg-content .svg-content
= render 'shared/empty_states/icons/service_desk_setup.svg' = render 'shared/empty_states/icons/service_desk_setup.svg'
.text-content .text-content
%h4= _('Service Desk is enabled but not yet active') %h4= s_('ServiceDesk|Service Desk is enabled but not yet active')
%p %p
= _("You must set up incoming email before it becomes active.") = s_("ServiceDesk|To activate Service Desk on this instance, an instance administrator must first set up incoming email.")
= link_to _('More information'), help_page_path('administration/incoming_email', anchor: 'set-it-up') = link_to _('Learn more.'), help_page_path('administration/incoming_email', anchor: 'set-it-up')
- service_desk_enabled = @project.service_desk_enabled? - service_desk_enabled = @project.service_desk_enabled?
- can_edit_project_settings = can?(current_user, :admin_project, @project) - can_edit_project_settings = can?(current_user, :admin_project, @project)
- title_text = _("Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab") - title_text = s_("ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab")
.non-empty-state.media .non-empty-state.media
.svg-content .svg-content
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
- if can_edit_project_settings && service_desk_enabled - if can_edit_project_settings && service_desk_enabled
%p %p
= _("Have your users email") = s_("ServiceDesk|Your users can send emails to this address:")
%code= @project.service_desk_address %code= @project.service_desk_address
%span= _("Those emails automatically become issues (with the comments becoming the email conversation) listed here.") %span= s_("ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation.")
= link_to _('Read more'), help_page_path('user/project/service_desk') = link_to _('Learn more.'), help_page_path('user/project/service_desk')
- if can_edit_project_settings && !service_desk_enabled - if can_edit_project_settings && !service_desk_enabled
.gl-mt-3 .gl-mt-3
= link_to _("Turn on Service Desk"), edit_project_path(@project), class: 'gl-button btn btn-success' = link_to s_("ServiceDesk|Enable Service Desk"), edit_project_path(@project), class: 'gl-button btn btn-success'
---
title: Improve Service Desk empty states
merge_request: 54006
author:
type: other
...@@ -13404,9 +13404,6 @@ msgstr "" ...@@ -13404,9 +13404,6 @@ msgstr ""
msgid "For each job, re-use the project workspace. If the workspace doesn't exist, use %{code_open}git clone%{code_close}." msgid "For each job, re-use the project workspace. If the workspace doesn't exist, use %{code_open}git clone%{code_close}."
msgstr "" msgstr ""
msgid "For help setting up the Service Desk for your instance, please contact an administrator."
msgstr ""
msgid "For individual use, create a separate account under your personal email address, not tied to the Enterprise email domain or group." msgid "For individual use, create a separate account under your personal email address, not tied to the Enterprise email domain or group."
msgstr "" msgstr ""
...@@ -15156,9 +15153,6 @@ msgstr "" ...@@ -15156,9 +15153,6 @@ msgstr ""
msgid "Hashed storage can't be disabled anymore for new projects" msgid "Hashed storage can't be disabled anymore for new projects"
msgstr "" msgstr ""
msgid "Have your users email"
msgstr ""
msgid "Header logo was successfully removed." msgid "Header logo was successfully removed."
msgstr "" msgstr ""
...@@ -15727,9 +15721,6 @@ msgstr "" ...@@ -15727,9 +15721,6 @@ msgstr ""
msgid "In case of pull mirroring, your user will be the author of all events in the activity feed that are the result of an update, like new branches being created or new commits being pushed to existing branches." msgid "In case of pull mirroring, your user will be the author of all events in the activity feed that are the result of an update, like new branches being created or new commits being pushed to existing branches."
msgstr "" msgstr ""
msgid "In order to enable Service Desk for your instance, you must first set up incoming email."
msgstr ""
msgid "In progress" msgid "In progress"
msgstr "" msgstr ""
...@@ -27460,19 +27451,43 @@ msgstr "" ...@@ -27460,19 +27451,43 @@ msgstr ""
msgid "Service Desk allows people to create issues in your GitLab instance without their own user account. It provides a unique email address for end users to create issues in a project. Replies can be sent either through the GitLab interface or by email. End users only see threads through email." msgid "Service Desk allows people to create issues in your GitLab instance without their own user account. It provides a unique email address for end users to create issues in a project. Replies can be sent either through the GitLab interface or by email. End users only see threads through email."
msgstr "" msgstr ""
msgid "Service Desk is enabled but not yet active" msgid "Service Templates"
msgstr "" msgstr ""
msgid "Service Desk is not enabled" msgid "Service URL"
msgstr "" msgstr ""
msgid "Service Desk is not supported" msgid "ServiceDesk|Enable Service Desk"
msgstr "" msgstr ""
msgid "Service Templates" msgid "ServiceDesk|For help setting up the Service Desk for your instance, please contact an administrator."
msgstr "" msgstr ""
msgid "Service URL" msgid "ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation."
msgstr ""
msgid "ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation."
msgstr ""
msgid "ServiceDesk|Service Desk is enabled but not yet active"
msgstr ""
msgid "ServiceDesk|Service Desk is not enabled"
msgstr ""
msgid "ServiceDesk|Service Desk is not supported"
msgstr ""
msgid "ServiceDesk|To activate Service Desk on this instance, an instance administrator must first set up incoming email."
msgstr ""
msgid "ServiceDesk|To enable Service Desk on this instance, an instance administrator must first set up incoming email."
msgstr ""
msgid "ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab"
msgstr ""
msgid "ServiceDesk|Your users can send emails to this address:"
msgstr "" msgstr ""
msgid "Session ID" msgid "Session ID"
...@@ -31083,9 +31098,6 @@ msgstr "" ...@@ -31083,9 +31098,6 @@ msgstr ""
msgid "This will remove the fork relationship between this project and other projects in the fork network." msgid "This will remove the fork relationship between this project and other projects in the fork network."
msgstr "" msgstr ""
msgid "Those emails automatically become issues (with the comments becoming the email conversation) listed here."
msgstr ""
msgid "Thread to reply to cannot be found" msgid "Thread to reply to cannot be found"
msgstr "" msgstr ""
...@@ -31992,9 +32004,6 @@ msgstr "" ...@@ -31992,9 +32004,6 @@ msgstr ""
msgid "Turn on %{strongStart}usage ping%{strongEnd} to activate analysis of user activity, known as %{docLinkStart}Cohorts%{docLinkEnd}." msgid "Turn on %{strongStart}usage ping%{strongEnd} to activate analysis of user activity, known as %{docLinkStart}Cohorts%{docLinkEnd}."
msgstr "" msgstr ""
msgid "Turn on Service Desk"
msgstr ""
msgid "Turn on usage ping" msgid "Turn on usage ping"
msgstr "" msgstr ""
...@@ -32757,9 +32766,6 @@ msgstr "" ...@@ -32757,9 +32766,6 @@ msgstr ""
msgid "Use .gitlab-ci.yml" msgid "Use .gitlab-ci.yml"
msgstr "" msgstr ""
msgid "Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab"
msgstr ""
msgid "Use a one-time password authenticator on your mobile device or computer to enable two-factor authentication (2FA)." msgid "Use a one-time password authenticator on your mobile device or computer to enable two-factor authentication (2FA)."
msgstr "" msgstr ""
...@@ -34692,9 +34698,6 @@ msgstr "" ...@@ -34692,9 +34698,6 @@ msgstr ""
msgid "You must select a stack for configuring your cloud provider. Learn more about" msgid "You must select a stack for configuring your cloud provider. Learn more about"
msgstr "" msgstr ""
msgid "You must set up incoming email before it becomes active."
msgstr ""
msgid "You must solve the CAPTCHA in order to submit" msgid "You must solve the CAPTCHA in order to submit"
msgstr "" msgstr ""
......
...@@ -49,8 +49,8 @@ RSpec.describe 'Service Desk Issue Tracker', :js do ...@@ -49,8 +49,8 @@ RSpec.describe 'Service Desk Issue Tracker', :js do
aggregate_failures do aggregate_failures do
expect(page).to have_css('.empty-state') expect(page).to have_css('.empty-state')
expect(page).to have_text('Use Service Desk to connect with your users') expect(page).to have_text('Use Service Desk to connect with your users')
expect(page).to have_link('Read more', href: help_page_path('user/project/service_desk')) expect(page).to have_link('Learn more.', href: help_page_path('user/project/service_desk'))
expect(page).not_to have_link('Turn on Service Desk') expect(page).not_to have_link('Enable Service Desk')
expect(page).to have_content(project.service_desk_address) expect(page).to have_content(project.service_desk_address)
end end
end end
...@@ -68,8 +68,8 @@ RSpec.describe 'Service Desk Issue Tracker', :js do ...@@ -68,8 +68,8 @@ RSpec.describe 'Service Desk Issue Tracker', :js do
aggregate_failures do aggregate_failures do
expect(page).to have_css('.empty-state') expect(page).to have_css('.empty-state')
expect(page).to have_text('Use Service Desk to connect with your users') expect(page).to have_text('Use Service Desk to connect with your users')
expect(page).to have_link('Read more', href: help_page_path('user/project/service_desk')) expect(page).to have_link('Learn more.', href: help_page_path('user/project/service_desk'))
expect(page).not_to have_link('Turn on Service Desk') expect(page).not_to have_link('Enable Service Desk')
expect(page).not_to have_content(project.service_desk_address) expect(page).not_to have_content(project.service_desk_address)
end end
end end
...@@ -91,8 +91,8 @@ RSpec.describe 'Service Desk Issue Tracker', :js do ...@@ -91,8 +91,8 @@ RSpec.describe 'Service Desk Issue Tracker', :js do
it 'displays the small info box, documentation, a button to configure service desk, and the address' do it 'displays the small info box, documentation, a button to configure service desk, and the address' do
aggregate_failures do aggregate_failures do
expect(page).to have_css('.non-empty-state') expect(page).to have_css('.non-empty-state')
expect(page).to have_link('Read more', href: help_page_path('user/project/service_desk')) expect(page).to have_link('Learn more.', href: help_page_path('user/project/service_desk'))
expect(page).not_to have_link('Turn on Service Desk') expect(page).not_to have_link('Enable Service Desk')
expect(page).to have_content(project.service_desk_address) expect(page).to have_content(project.service_desk_address)
end end
end end
...@@ -156,8 +156,8 @@ RSpec.describe 'Service Desk Issue Tracker', :js do ...@@ -156,8 +156,8 @@ RSpec.describe 'Service Desk Issue Tracker', :js do
aggregate_failures do aggregate_failures do
expect(page).to have_css('.empty-state') expect(page).to have_css('.empty-state')
expect(page).to have_text('Service Desk is not supported') expect(page).to have_text('Service Desk is not supported')
expect(page).to have_text('In order to enable Service Desk for your instance, you must first set up incoming email.') expect(page).to have_text('To enable Service Desk on this instance, an instance administrator must first set up incoming email.')
expect(page).to have_link('More information', href: help_page_path('administration/incoming_email', anchor: 'set-it-up')) expect(page).to have_link('Learn more.', href: help_page_path('administration/incoming_email', anchor: 'set-it-up'))
end end
end end
end end
......
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