diff --git a/app/views/search/results/_error.html.haml b/app/views/search/results/_error.html.haml index 33e74b08dde5521927847a64f43438524fa7586e..17a92f88a591d01fe290173131d5880c2fda7fdf 100644 --- a/app/views/search/results/_error.html.haml +++ b/app/views/search/results/_error.html.haml @@ -1,7 +1,5 @@ -.gl-display-flex.gl-flex-direction-column.gl-align-items-center - %div - .svg-content.svg-150 - = image_tag 'illustrations/empty-state/empty-search-md.svg' - %div - %h4.gl-text-center.gl-font-weight-bold= s_('SearchError|A search query problem has occurred') - %p.gl-text-center= s_('SearchError|To resolve the problem, check the query syntax and try again.') += render Pajamas::EmptyStateComponent.new(svg_path: 'illustrations/empty-state/empty-search-md.svg', + title: s_('SearchError|A problem has occurred')) do |c| + + - c.with_description do + = s_('SearchError|To resolve the problem, check the query syntax and try again.') diff --git a/app/views/search/results/_timeout.html.haml b/app/views/search/results/_timeout.html.haml index 530096ead43d782aa8faf5aaf3209951eebb5df6..f9a057f5859e97a323b3ac73bb94365a29b9ee50 100644 --- a/app/views/search/results/_timeout.html.haml +++ b/app/views/search/results/_timeout.html.haml @@ -1,10 +1,5 @@ -.gl-display-flex.gl-flex-direction-column.gl-align-items-center - %div - .svg-content.svg-150 - = image_tag 'illustrations/empty-state/empty-search-md.svg' - %div - %h4.gl-text-center.gl-font-weight-bold= _('Your search timed out') - %p.gl-text-center= _('To resolve this, try to:') - %ul - %li= html_escape(_('Refine your search criteria (select a %{strong_open}group%{strong_close} and %{strong_open}project%{strong_close} when possible)')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } - %li= html_escape(_('Use double quotes for multiple keywords, such as %{code_open}"your search"%{code_close}')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } += render Pajamas::EmptyStateComponent.new(svg_path: 'illustrations/empty-state/empty-search-md.svg', + title: _('Your search has timed out')) do |c| + + - c.with_description do + = html_escape(_('To resolve the problem, refine your search criteria. Select a group or project or use double quotes for multiple keywords (for example, %{code_open}"your search"%{code_close}).')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } diff --git a/ee/app/views/search/results/_error.html.haml b/ee/app/views/search/results/_error.html.haml index 590685f1fd46b97bb0857ab1ed30fe649dab2b47..752a349db5852cb2399f45eea6a11b6871f3d454 100644 --- a/ee/app/views/search/results/_error.html.haml +++ b/ee/app/views/search/results/_error.html.haml @@ -1,12 +1,9 @@ -.gl-display-flex.gl-flex-direction-column.gl-align-items-center - %div - .svg-content.svg-150 - = image_tag 'illustrations/empty-state/empty-search-md.svg' - %div - %h4.gl-text-center.gl-font-weight-bold= s_('SearchError|A search query problem has occurred') - %p.gl-text-center - = s_('SearchError|To resolve the problem, check the query syntax and try again.') - - if search_service.use_zoekt? - - search_syntax_link_url = help_page_path('user/search/exact_code_search', anchor: 'syntax') - - search_syntax_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: search_syntax_link_url } - = html_escape(s_('SearchError|Learn more about %{search_syntax_link_start} Zoekt search syntax%{search_syntax_link_end}.')) % { search_syntax_link_start: search_syntax_link_start, search_syntax_link_end: '</a>'.html_safe } += render Pajamas::EmptyStateComponent.new(svg_path: 'illustrations/empty-state/empty-search-md.svg', + title: s_('SearchError|A problem has occurred')) do |c| + + - c.with_description do + = s_('SearchError|To resolve the problem, check the query syntax and try again.') + - if search_service.use_zoekt? + - search_syntax_link_url = help_page_path('user/search/exact_code_search', anchor: 'syntax') + - search_syntax_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: search_syntax_link_url } + = html_escape(s_('SearchError|%{search_syntax_link_start}What is the supported syntax%{search_syntax_link_end}?')) % { search_syntax_link_start: search_syntax_link_start, search_syntax_link_end: '</a>'.html_safe } diff --git a/ee/app/views/shared/promotions/_promote_advanced_search.html.haml b/ee/app/views/shared/promotions/_promote_advanced_search.html.haml index 7e801de8bc090a1746b9528bf0dd434e2cbbb9d8..ae840bad4db5a96180529caeaa66d7644a1ff958 100644 --- a/ee/app/views/shared/promotions/_promote_advanced_search.html.haml +++ b/ee/app/views/shared/promotions/_promote_advanced_search.html.haml @@ -2,7 +2,7 @@ = render Pajamas::BannerComponent.new(banner_options: {class: 'user-callout', data: {uid: 'promote_advanced_search_dismissed'}, id: 'promote_advanced_search'}, close_options: {'aria-label' => _('Dismiss'), class: 'js-close-callout'}) do |c| - c.with_illustration do - = custom_icon('icon_search_avatar') + = image_tag image_path('illustrations/search-sm.svg') - c.with_title do - if Gitlab::CurrentSettings.should_check_namespace_plan? = s_('Promotions|Upgrade your plan to activate Advanced Search.') diff --git a/ee/spec/features/search/elastic/project_search_spec.rb b/ee/spec/features/search/elastic/project_search_spec.rb index 99d4dc60a305672ee4146a7407eaa82118a3b168..0e3afbc2b526e69a7c3e9cbd22cf69a23d0d8c56 100644 --- a/ee/spec/features/search/elastic/project_search_spec.rb +++ b/ee/spec/features/search/elastic/project_search_spec.rb @@ -172,10 +172,9 @@ end it 'renders error information' do - expect(page).to have_content('A search query problem has occurred') - expect(page).to have_content('Learn more about Zoekt search syntax') + expect(page).to have_content('A problem has occurred') expect(page).to have_link( - 'Zoekt search syntax', + 'What is the supported syntax', href: help_page_path('user/search/exact_code_search', anchor: 'syntax') ) end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 82fcee6119877bea15224cb6152003dabe3edfec..8afaa6f1ba505446a9c8dfd49ac6d2e5c744a445 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -40829,9 +40829,6 @@ msgstr "" msgid "References should be in the form of path/to/project!merge_request_id" msgstr "" -msgid "Refine your search criteria (select a %{strong_open}group%{strong_close} and %{strong_open}project%{strong_close} when possible)" -msgstr "" - msgid "Refresh the page and try again." msgstr "" @@ -44118,10 +44115,10 @@ msgstr "" msgid "SearchCodeResults|of %{link_to_project}" msgstr "" -msgid "SearchError|A search query problem has occurred" +msgid "SearchError|%{search_syntax_link_start}What is the supported syntax%{search_syntax_link_end}?" msgstr "" -msgid "SearchError|Learn more about %{search_syntax_link_start} Zoekt search syntax%{search_syntax_link_end}." +msgid "SearchError|A problem has occurred" msgstr "" msgid "SearchError|To resolve the problem, check the query syntax and try again." @@ -51947,7 +51944,7 @@ msgstr "" msgid "To remove the %{link_start}read-only%{link_end} state and regain write access, you can reduce the number of users in your top-level group to %{free_limit} users or less. You can also upgrade to a paid tier, which do not have user limits. If you need additional time, you can start a free 30-day trial which includes unlimited users." msgstr "" -msgid "To resolve this, try to:" +msgid "To resolve the problem, refine your search criteria. Select a group or project or use double quotes for multiple keywords (for example, %{code_open}\"your search\"%{code_close})." msgstr "" msgid "To run CI/CD pipelines with JetBrains TeamCity, input the GitLab project details in the TeamCity project Version Control Settings." @@ -53901,9 +53898,6 @@ msgstr "" msgid "Use custom color #FF0000" msgstr "" -msgid "Use double quotes for multiple keywords, such as %{code_open}\"your search\"%{code_close}" -msgstr "" - msgid "Use hashed storage" msgstr "" @@ -58092,7 +58086,7 @@ msgstr "" msgid "Your search didn't match any commits. Try a different query." msgstr "" -msgid "Your search timed out" +msgid "Your search has timed out" msgstr "" msgid "Your sign-in page is %{url}." diff --git a/spec/support/shared_examples/features/search/search_timeouts_shared_examples.rb b/spec/support/shared_examples/features/search/search_timeouts_shared_examples.rb index 1e7f75d2ac0dcd73d1249201cc391189871eadd4..fc06c446f396411a7d8aff8013af0d8e7f12c2f7 100644 --- a/spec/support/shared_examples/features/search/search_timeouts_shared_examples.rb +++ b/spec/support/shared_examples/features/search/search_timeouts_shared_examples.rb @@ -13,7 +13,7 @@ end it 'renders timeout information' do - expect(page).to have_content('Your search timed out') + expect(page).to have_content('Your search has timed out') end it 'sets tab count to 0' do