From 1441532675e3198d10cba80f541d457a4700528d Mon Sep 17 00:00:00 2001 From: Peter Leitzen Date: Thu, 1 Dec 2022 12:20:03 +0100 Subject: [PATCH 1/2] Fix offenses for Layout/SpaceInsideParens in HAML files --- .../application_settings/_ci_cd.html.haml | 2 +- .../_default_branch.html.haml | 2 +- .../service_usage_data.html.haml | 4 +-- .../admin/broadcast_messages/_form.html.haml | 4 +-- .../admin/identities/_identity.html.haml | 4 +-- app/views/admin/projects/_projects.html.haml | 2 +- .../registry/repositories/index.html.haml | 2 +- app/views/groups/runners/index.html.haml | 2 +- .../layouts/nav/sidebar/_admin.html.haml | 24 ++++++++--------- .../layouts/nav/sidebar/_profile.html.haml | 26 +++++++++---------- .../autodevops_disabled_email.html.haml | 2 +- app/views/notify/issue_moved_email.html.haml | 2 +- app/views/profiles/preferences/show.html.haml | 2 +- .../blob/_template_selectors.html.haml | 10 +++---- app/views/projects/diffs/_diffs.html.haml | 2 +- app/views/projects/network/show.html.haml | 2 +- app/views/projects/pages/_list.html.haml | 2 +- .../_pipeline_schedule.html.haml | 2 +- .../registry/repositories/index.html.haml | 2 +- app/views/projects/tags/new.html.haml | 2 +- app/views/shared/_label.html.haml | 12 ++++----- app/views/shared/_milestones_filter.html.haml | 2 +- app/views/shared/builds/_tabs.html.haml | 2 +- .../prometheus/_metrics.html.haml | 4 +-- app/views/shared/issuable/_sidebar.html.haml | 2 +- .../shared/issuable/form/_title.html.haml | 4 +-- .../shared/nav/_sidebar_submenu.html.haml | 2 +- .../_update_protected_branch.html.haml | 4 +-- .../sessions/_new_smartcard_ldap.html.haml | 2 +- .../nav/ee/admin/_geo_sidebar.html.haml | 2 +- .../nav/sidebar/_credentials_link.html.haml | 2 +- .../nav/sidebar/_licenses_link.html.haml | 2 +- .../sidebar/_profile_billing_link.html.haml | 2 +- .../_profile_usage_quotas_link.html.haml | 2 +- .../nav/sidebar/_push_rules_link.html.haml | 2 +- .../layouts/nav/sidebar/_security.html.haml | 6 ++--- .../_new_ci_cd_only_project_pane.html.haml | 4 +-- .../projects/settings/_restore.html.haml | 4 +-- .../registrations/welcome/_button.html.haml | 2 +- .../shared/milestones/_burndown.html.haml | 2 +- 40 files changed, 82 insertions(+), 82 deletions(-) diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index f6635ad17ef912..9cfc3100078e4f 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -1,6 +1,6 @@ .settings-content = gitlab_ui_form_for @application_setting, url: ci_cd_admin_application_settings_path(anchor: 'js-ci-cd-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting ) + = form_errors(@application_setting) %fieldset .form-group diff --git a/app/views/admin/application_settings/_default_branch.html.haml b/app/views/admin/application_settings/_default_branch.html.haml index 7be4bac02fd429..67de5ffb2b921e 100644 --- a/app/views/admin/application_settings/_default_branch.html.haml +++ b/app/views/admin/application_settings/_default_branch.html.haml @@ -8,7 +8,7 @@ = f.label :default_branch_name, _('Initial default branch name'), class: 'label-light' = f.text_field :default_branch_name, placeholder: Gitlab::DefaultBranch.value, class: 'form-control gl-form-input' %span.form-text.text-muted - = (s_("AdminSettings|If not specified at the group or instance level, the default is %{default_initial_branch_name}. Does not affect existing repositories.") % { default_initial_branch_name: fallback_branch_name } ).html_safe + = (s_("AdminSettings|If not specified at the group or instance level, the default is %{default_initial_branch_name}. Does not affect existing repositories.") % { default_initial_branch_name: fallback_branch_name }).html_safe = render 'shared/default_branch_protection', f: f diff --git a/app/views/admin/application_settings/service_usage_data.html.haml b/app/views/admin/application_settings/service_usage_data.html.haml index 3e7803f59e5542..d6860cc08ace7d 100644 --- a/app/views/admin/application_settings/service_usage_data.html.haml +++ b/app/views/admin/application_settings/service_usage_data.html.haml @@ -10,10 +10,10 @@ %h3= name - if @service_ping_data_present - = render Pajamas::ButtonComponent.new(button_options: { class: 'js-payload-preview-trigger gl-mr-2', data: { payload_selector: ".#{payload_class}" } } ) do + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-payload-preview-trigger gl-mr-2', data: { payload_selector: ".#{payload_class}" } }) do = gl_loading_icon(css_class: 'js-spinner gl-display-none', inline: true) %span.js-text.gl-display-inline= _('Preview payload') - = render Pajamas::ButtonComponent.new(button_options: { class: 'js-payload-download-trigger gl-mr-2', data: { endpoint: usage_data_admin_application_settings_path(format: :json) } } ) do + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-payload-download-trigger gl-mr-2', data: { endpoint: usage_data_admin_application_settings_path(format: :json) } }) do = gl_loading_icon(css_class: 'js-spinner gl-display-none', inline: true) %span.js-text.gl-display-inline= _('Download payload') %pre.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml index dfd3b87c674716..7699445740aa30 100644 --- a/app/views/admin/broadcast_messages/_form.html.haml +++ b/app/views/admin/broadcast_messages/_form.html.haml @@ -17,14 +17,14 @@ = f.label :broadcast_type, _('Type') .col-sm-10 = f.select :broadcast_type, broadcast_type_options, {}, class: 'form-control js-broadcast-message-type' - .form-group.row.js-broadcast-message-background-color-form-group{ class: ('hidden' unless @broadcast_message.banner? ) } + .form-group.row.js-broadcast-message-background-color-form-group{ class: ('hidden' unless @broadcast_message.banner?) } .col-sm-2.col-form-label = f.label :theme, _("Theme") .col-sm-10 .input-group = f.select :theme, broadcast_theme_options, {}, class: 'form-control js-broadcast-message-theme' - .form-group.row.js-broadcast-message-dismissable-form-group{ class: ('hidden' unless @broadcast_message.banner? ) } + .form-group.row.js-broadcast-message-dismissable-form-group{ class: ('hidden' unless @broadcast_message.banner?) } .col-sm-2.col-form-label.pt-0 = f.label :starts_at, _("Dismissable") .col-sm-10 diff --git a/app/views/admin/identities/_identity.html.haml b/app/views/admin/identities/_identity.html.haml index 3121cd2ae59fec..a24cd0004645cb 100644 --- a/app/views/admin/identities/_identity.html.haml +++ b/app/views/admin/identities/_identity.html.haml @@ -14,11 +14,11 @@ icon: 'pencil', button_options: { title: _('Edit'), 'aria-label' => _('Edit'), - class: button_classes } ) + class: button_classes }) = render Pajamas::ButtonComponent.new(category: :tertiary, href: url_for([:admin, @user, identity]), icon: 'remove', button_options: { title: _('Delete'), 'aria-label' => _('Delete identity'), class: button_classes, - data: { method: :delete, confirm: _("Are you sure you want to remove this identity?") } } ) + data: { method: :delete, confirm: _("Are you sure you want to remove this identity?") } }) diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index c7c30673d74207..b6a97887b5cc5a 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -26,7 +26,7 @@ .controls.gl-flex-shrink-0.gl-ml-5 = render Pajamas::ButtonComponent.new(href: edit_project_path(project), button_options: { id: dom_id(project, :edit) }) do = s_('Edit') - = render Pajamas::ButtonComponent.new(variant: :danger, button_options: { class: 'delete-project-button', data: { delete_project_url: admin_project_path(project), project_name: project.name } } ) do + = render Pajamas::ButtonComponent.new(variant: :danger, button_options: { class: 'delete-project-button', data: { delete_project_url: admin_project_path(project), project_name: project.name } }) do = s_('AdminProjects|Delete') = paginate @projects, theme: 'gitlab' diff --git a/app/views/groups/registry/repositories/index.html.haml b/app/views/groups/registry/repositories/index.html.haml index f6d05959d2e6be..efd2e53e100950 100644 --- a/app/views/groups/registry/repositories/index.html.haml +++ b/app/views/groups/registry/repositories/index.html.haml @@ -1,6 +1,6 @@ - page_title _("Container Registry") - @content_class = "limit-container-width" unless fluid_layout -- add_page_startup_graphql_call('container_registry/get_container_repositories', { fullPath: @group.full_path, first: 10, name: nil, isGroupPage: true, sort: nil} ) +- add_page_startup_graphql_call('container_registry/get_container_repositories', { fullPath: @group.full_path, first: 10, name: nil, isGroupPage: true, sort: nil}) %section #js-container-registry{ data: { endpoint: group_container_registries_path(@group), diff --git a/app/views/groups/runners/index.html.haml b/app/views/groups/runners/index.html.haml index 1146063969bf74..9ea83397348576 100644 --- a/app/views/groups/runners/index.html.haml +++ b/app/views/groups/runners/index.html.haml @@ -1,3 +1,3 @@ - page_title s_('Runners|Runners') -#js-group-runners{ data: group_runners_data_attributes(@group).merge( { group_runners_limited_count: @group_runners_limited_count, registration_token: @group_runner_registration_token } ) } +#js-group-runners{ data: group_runners_data_attributes(@group).merge({ group_runners_limited_count: @group_runners_limited_count, registration_token: @group_runner_registration_token }) } diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index 8815dec5a6b348..717175e8eb34a1 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -14,7 +14,7 @@ %span.nav-item-name = _('Overview') %ul.sidebar-sub-level-items - = nav_link(controller: %w[dashboard admin admin/projects users groups jobs runners gitaly_servers cohorts], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: %w[dashboard admin admin/projects users groups jobs runners gitaly_servers cohorts], html_options: { class: "fly-out-top-item" }) do = link_to admin_root_path do %strong.fly-out-top-item-name = _('Overview') @@ -82,7 +82,7 @@ = _('Monitoring') %ul.sidebar-sub-level-items{ data: { qa_selector: 'admin_monitoring_submenu_content' } } - = nav_link(controller: admin_monitoring_nav_links, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: admin_monitoring_nav_links, html_options: { class: "fly-out-top-item" }) do = link_to admin_system_info_path do %strong.fly-out-top-item-name = _('Monitoring') @@ -117,7 +117,7 @@ %span.nav-item-name = _('Messages') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :broadcast_messages, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :broadcast_messages, html_options: { class: "fly-out-top-item" }) do = link_to admin_broadcast_messages_path do %strong.fly-out-top-item-name = _('Messages') @@ -129,7 +129,7 @@ %span.nav-item-name = _('System Hooks') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: [:hooks, :hook_logs], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: [:hooks, :hook_logs], html_options: { class: "fly-out-top-item" }) do = link_to admin_hooks_path do %strong.fly-out-top-item-name = _('System Hooks') @@ -141,7 +141,7 @@ %span.nav-item-name = _('Applications') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :applications, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :applications, html_options: { class: "fly-out-top-item" }) do = link_to admin_applications_path do %strong.fly-out-top-item-name = _('Applications') @@ -154,7 +154,7 @@ = _('Abuse Reports') = gl_badge_tag number_with_delimiter(AbuseReport.count(:all)), variant: :info, size: :sm %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :abuse_reports, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :abuse_reports, html_options: { class: "fly-out-top-item" }) do = link_to admin_abuse_reports_path do %strong.fly-out-top-item-name = _('Abuse Reports') @@ -170,7 +170,7 @@ %span.nav-item-name = _('Kubernetes') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :clusters, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :clusters, html_options: { class: "fly-out-top-item" }) do = link_to admin_clusters_path do %strong.fly-out-top-item-name = _('Kubernetes') @@ -183,7 +183,7 @@ %span.nav-item-name = _('Spam Logs') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :spam_logs, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :spam_logs, html_options: { class: "fly-out-top-item" }) do = link_to admin_spam_logs_path do %strong.fly-out-top-item-name = _('Spam Logs') @@ -199,7 +199,7 @@ %span.nav-item-name = _('Deploy Keys') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :deploy_keys, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :deploy_keys, html_options: { class: "fly-out-top-item" }) do = link_to admin_deploy_keys_path do %strong.fly-out-top-item-name = _('Deploy Keys') @@ -213,7 +213,7 @@ %span.nav-item-name = _('Labels') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :labels, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :labels, html_options: { class: "fly-out-top-item" }) do = link_to admin_labels_path do %strong.fly-out-top-item-name = _('Labels') @@ -227,7 +227,7 @@ %ul.sidebar-sub-level-items{ data: { qa_selector: 'admin_settings_submenu_content' } } -# This active_nav_link check is also used in `app/views/layouts/admin.html.haml` - = nav_link(controller: [:application_settings, :integrations, :appearances], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: [:application_settings, :integrations, :appearances], html_options: { class: "fly-out-top-item" }) do = link_to general_admin_application_settings_path do %strong.fly-out-top-item-name = _('Settings') @@ -273,7 +273,7 @@ = link_to network_admin_application_settings_path, title: _('Network'), data: { qa_selector: 'admin_settings_network_link' } do %span = _('Network') - = nav_link(controller: :appearances ) do + = nav_link(controller: :appearances) do = link_to admin_application_settings_appearances_path do %span = _('Appearance') diff --git a/app/views/layouts/nav/sidebar/_profile.html.haml b/app/views/layouts/nav/sidebar/_profile.html.haml index 0e3327935ca305..e1978009114244 100644 --- a/app/views/layouts/nav/sidebar/_profile.html.haml +++ b/app/views/layouts/nav/sidebar/_profile.html.haml @@ -12,7 +12,7 @@ %span.nav-item-name = _('Profile') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(path: 'profiles#show', html_options: { class: "fly-out-top-item" } ) do + = nav_link(path: 'profiles#show', html_options: { class: "fly-out-top-item" }) do = link_to profile_path do %strong.fly-out-top-item-name = _('Profile') @@ -23,7 +23,7 @@ %span.nav-item-name = _('Account') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: [:accounts, :two_factor_auths], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: [:accounts, :two_factor_auths], html_options: { class: "fly-out-top-item" }) do = link_to profile_account_path do %strong.fly-out-top-item-name = _('Account') @@ -36,7 +36,7 @@ %span.nav-item-name = _('Applications') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: 'oauth/applications', html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: 'oauth/applications', html_options: { class: "fly-out-top-item" }) do = link_to applications_profile_path do %strong.fly-out-top-item-name = _('Applications') @@ -47,7 +47,7 @@ %span.nav-item-name = _('Chat') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :chat_names, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :chat_names, html_options: { class: "fly-out-top-item" }) do = link_to profile_chat_names_path do %strong.fly-out-top-item-name = _('Chat') @@ -59,7 +59,7 @@ %span.nav-item-name = _('Access Tokens') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :personal_access_tokens, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :personal_access_tokens, html_options: { class: "fly-out-top-item" }) do = link_to profile_personal_access_tokens_path do %strong.fly-out-top-item-name = _('Access Tokens') @@ -70,7 +70,7 @@ %span.nav-item-name = _('Emails') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :emails, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :emails, html_options: { class: "fly-out-top-item" }) do = link_to profile_emails_path do %strong.fly-out-top-item-name = _('Emails') @@ -82,7 +82,7 @@ %span.nav-item-name = _('Password') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :passwords, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :passwords, html_options: { class: "fly-out-top-item" }) do = link_to edit_profile_password_path do %strong.fly-out-top-item-name = _('Password') @@ -93,7 +93,7 @@ %span.nav-item-name = _('Notifications') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :notifications, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :notifications, html_options: { class: "fly-out-top-item" }) do = link_to profile_notifications_path do %strong.fly-out-top-item-name = _('Notifications') @@ -104,7 +104,7 @@ %span.nav-item-name = _('SSH Keys') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :keys, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :keys, html_options: { class: "fly-out-top-item" }) do = link_to profile_keys_path do %strong.fly-out-top-item-name = _('SSH Keys') @@ -115,7 +115,7 @@ %span.nav-item-name = _('GPG Keys') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :gpg_keys, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :gpg_keys, html_options: { class: "fly-out-top-item" }) do = link_to profile_gpg_keys_path do %strong.fly-out-top-item-name = _('GPG Keys') @@ -126,7 +126,7 @@ %span.nav-item-name = _('Preferences') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :preferences, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :preferences, html_options: { class: "fly-out-top-item" }) do = link_to profile_preferences_path do %strong.fly-out-top-item-name = _('Preferences') @@ -137,7 +137,7 @@ %span.nav-item-name = _('Active Sessions') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :active_sessions, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :active_sessions, html_options: { class: "fly-out-top-item" }) do = link_to profile_active_sessions_path do %strong.fly-out-top-item-name = _('Active Sessions') @@ -148,7 +148,7 @@ %span.nav-item-name = _('Authentication log') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(path: 'profiles#audit_log', html_options: { class: "fly-out-top-item" } ) do + = nav_link(path: 'profiles#audit_log', html_options: { class: "fly-out-top-item" }) do = link_to audit_log_profile_path do %strong.fly-out-top-item-name = _('Authentication Log') diff --git a/app/views/notify/autodevops_disabled_email.html.haml b/app/views/notify/autodevops_disabled_email.html.haml index bdf2a1136d3d24..d68128219664bd 100644 --- a/app/views/notify/autodevops_disabled_email.html.haml +++ b/app/views/notify/autodevops_disabled_email.html.haml @@ -11,7 +11,7 @@ - link_style = "color: #1b69b6; text-decoration:none;" - pipeline_link = link_to("\##{@pipeline.iid}", pipeline_url(@pipeline), style: link_style).html_safe - project_link = link_to(@project.name, project_url(@project), style: link_style).html_safe - - supported_langs_link = link_to(s_('Notify|currently supported languages'), 'https://docs.gitlab.com/ee/topics/autodevops/#currently-supported-languages', style: link_style ).html_safe + - supported_langs_link = link_to(s_('Notify|currently supported languages'), 'https://docs.gitlab.com/ee/topics/autodevops/#currently-supported-languages', style: link_style).html_safe - settings_link = link_to(s_('Notify|CI/CD project settings'), project_settings_ci_cd_url(@project), style: link_style).html_safe = s_('Notify|The Auto DevOps pipeline failed for pipeline %{pipeline_link} and has been disabled for %{project_link}. In order to use the Auto DevOps pipeline with your project, please review the %{supported_langs_link}, adjust your project accordingly, and turn on the Auto DevOps pipeline within your %{settings_link}.').html_safe % { pipeline_link: pipeline_link, project_link: project_link, supported_langs_link: supported_langs_link, settings_link: settings_link } diff --git a/app/views/notify/issue_moved_email.html.haml b/app/views/notify/issue_moved_email.html.haml index c77a863d1a49d5..666aa45540eac3 100644 --- a/app/views/notify/issue_moved_email.html.haml +++ b/app/views/notify/issue_moved_email.html.haml @@ -2,6 +2,6 @@ = s_('Notify|Issue was moved to another project.') - if @can_access_project %p - = sprintf(s_('Notify|New issue: %{project_issue_url}'), { project_issue_url: link_to(@new_issue.title, project_issue_url(@new_project, @new_issue)) } ).html_safe + = sprintf(s_('Notify|New issue: %{project_issue_url}'), { project_issue_url: link_to(@new_issue.title, project_issue_url(@new_project, @new_issue)) }).html_safe - else = s_("Notify|You don't have access to the project.") diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index be9140b23ff53a..8ef2819fb9b2ac 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -103,7 +103,7 @@ - supported_characters = %w(" ' ` ( [ { < * _).map { |char| "#{char}" }.join(', ') = f.gitlab_ui_checkbox_component :markdown_surround_selection, s_('Preferences|Surround text selection when typing quotes or brackets'), - help_text: sprintf(s_( "Preferences|When you type in a description or comment box, selected text is surrounded by the corresponding character after typing one of the following characters: %{supported_characters}."), { supported_characters: supported_characters }).html_safe + help_text: sprintf(s_("Preferences|When you type in a description or comment box, selected text is surrounded by the corresponding character after typing one of the following characters: %{supported_characters}."), { supported_characters: supported_characters }).html_safe .form-group = f.gitlab_ui_checkbox_component :markdown_automatic_lists, s_('Preferences|Automatically add new list items'), diff --git a/app/views/projects/blob/_template_selectors.html.haml b/app/views/projects/blob/_template_selectors.html.haml index 249c474587ca49..4fe68c1ce1a200 100644 --- a/app/views/projects/blob/_template_selectors.html.haml +++ b/app/views/projects/blob/_template_selectors.html.haml @@ -4,12 +4,12 @@ - toggle_text = should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : 'Select a template type' = dropdown_tag(_(toggle_text), options: { toggle_class: 'js-template-type-selector', dropdown_class: 'dropdown-menu-selectable', data: { qa_selector: 'template_type_dropdown' } }) .license-selector.js-license-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-license-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: licenses_for_select(@project), project: @project.name, fullname: @project.namespace.human_name, qa_selector: 'license_dropdown' } } ) + = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-license-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: licenses_for_select(@project), project: @project.name, fullname: @project.namespace.human_name, qa_selector: 'license_dropdown' } }) .gitignore-selector.js-gitignore-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitignore-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitignore_names(@project), qa_selector: 'gitignore_dropdown' } } ) + = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitignore-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitignore_names(@project), qa_selector: 'gitignore_dropdown' } }) .metrics-dashboard-selector.js-metrics-dashboard-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-metrics-dashboard-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: metrics_dashboard_ymls(@project), qa_selector: 'metrics_dashboard_dropdown' } } ) + = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-metrics-dashboard-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: metrics_dashboard_ymls(@project), qa_selector: 'metrics_dashboard_dropdown' } }) #gitlab-ci-yml-selector.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitlab-ci-yml-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls(@project), selected: params[:template], qa_selector: 'gitlab_ci_yml_dropdown' } } ) + = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitlab-ci-yml-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls(@project), selected: params[:template], qa_selector: 'gitlab_ci_yml_dropdown' } }) .dockerfile-selector.js-dockerfile-selector-wrap.js-template-selector-wrap.hidden - = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-dockerfile-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: dockerfile_names(@project), qa_selector: 'dockerfile_dropdown' } } ) + = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-dockerfile-selector', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: dockerfile_names(@project), qa_selector: 'dockerfile_dropdown' } }) diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 11984a9d6f6d6a..8ff6d348d9561b 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -34,7 +34,7 @@ - if load_diff_files_async - url = url_for(safe_params.merge(action: 'diff_files')) .js-diffs-batch{ data: { diff_files_path: url } } - = gl_loading_icon( size: "md", css_class: "gl-mt-4" ) + = gl_loading_icon(size: "md", css_class: "gl-mt-4") - else = render partial: 'projects/diffs/file', collection: diff_files, as: :diff_file, locals: { project: diffs.project, environment: environment, diff_page_context: diff_page_context } diff --git a/app/views/projects/network/show.html.haml b/app/views/projects/network/show.html.haml index 06123aea960714..70bb97b76258d0 100644 --- a/app/views/projects/network/show.html.haml +++ b/app/views/projects/network/show.html.haml @@ -1,6 +1,6 @@ - breadcrumb_title _("Graph") - page_title _("Graph"), @ref -- network_path = Feature.enabled?(:use_ref_type_parameter) ? project_network_path(@project, @id, ref_type: @ref_type ) : project_network_path(@project, @id) +- network_path = Feature.enabled?(:use_ref_type_parameter) ? project_network_path(@project, @id, ref_type: @ref_type) : project_network_path(@project, @id) = render "head" .gl-mt-5 .project-network.gl-border-1.gl-border-solid.gl-border-gray-300 diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index 16312da1353fde..32e67fdadb8c03 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -12,7 +12,7 @@ - if verification_enabled - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] .domain-status.ci-status-icon.has-tooltip{ class: "gl-mr-5 ci-status-icon-#{status}", title: tooltip } - = sprite_icon("status_#{status}" ) + = sprite_icon("status_#{status}") .domain-name = external_link(domain.url, domain.url) - if domain.certificate diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index 9dc12a2ca41914..0de31f59033a9b 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -6,7 +6,7 @@ %td.branch-name-cell.gl-text-truncate{ role: 'cell', data: { label: s_("PipelineSchedules|Target") } } %div - if pipeline_schedule.for_tag? - = sprite_icon('tag', size: 12, css_class: 'gl-vertical-align-middle!' ) + = sprite_icon('tag', size: 12, css_class: 'gl-vertical-align-middle!') - else = sprite_icon('fork', size: 12, css_class: 'gl-vertical-align-middle!') - if pipeline_schedule.ref.present? diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index 59b7b6ca33494d..910aab6da72023 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -1,6 +1,6 @@ - page_title _("Container Registry") - @content_class = "limit-container-width" unless fluid_layout -- add_page_startup_graphql_call('container_registry/get_container_repositories', { fullPath: @project.full_path, first: 10, name: nil, isGroupPage: false, sort: nil} ) +- add_page_startup_graphql_call('container_registry/get_container_repositories', { fullPath: @project.full_path, first: 10, name: nil, isGroupPage: false, sort: nil}) %section #js-container-registry{ data: { endpoint: project_container_registry_index_path(@project), diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index ed06c90efa84e9..f48404c740775a 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -2,7 +2,7 @@ - default_ref = params[:ref] || @project.default_branch - if @error - = render Pajamas::AlertComponent.new(variant: :danger, dismissible: true ) do |c| + = render Pajamas::AlertComponent.new(variant: :danger, dismissible: true) do |c| = c.body do = @error diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index 1645c2695b501d..8a626f1620b1f8 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -32,17 +32,17 @@ - if label.project_label? && label.project.group && can?(current_user, :admin_label, label.project.group) %li = render Pajamas::ButtonComponent.new(category: :tertiary, - button_options: { class: 'js-promote-project-label-button', data: { url: promote_project_label_path(label.project, label), label_title: label.title, label_color: label.color, label_text_color: label.text_color, group_name: label.project.group.name } } ) do + button_options: { class: 'js-promote-project-label-button', data: { url: promote_project_label_path(label.project, label), label_title: label.title, label_color: label.color, label_text_color: label.text_color, group_name: label.project.group.name } }) do = _('Promote to group label') %li %span = render Pajamas::ButtonComponent.new(category: :tertiary, - button_options: { class: 'text-danger js-delete-label-modal-button', data: { label_name: label.name, subject_name: label.subject_name, destroy_path: label.destroy_path } } ) do + button_options: { class: 'text-danger js-delete-label-modal-button', data: { label_name: label.name, subject_name: label.subject_name, destroy_path: label.destroy_path } }) do = _('Delete') - if current_user %li.gl-display-inline-block.label-subscription.js-label-subscription.gl-ml-3 - if label.can_subscribe_to_label_in_different_levels? - = render Pajamas::ButtonComponent.new(button_options: { class: "js-unsubscribe-button #{'hidden' if status.unsubscribed?}", data: { url: toggle_subscription_path, toggle: 'tooltip', container: 'body' }, title: tooltip_title } ) do + = render Pajamas::ButtonComponent.new(button_options: { class: "js-unsubscribe-button #{'hidden' if status.unsubscribed?}", data: { url: toggle_subscription_path, toggle: 'tooltip', container: 'body' }, title: tooltip_title }) do = _('Unsubscribe') .dropdown.dropdown-group-label{ class: ('hidden' unless status.unsubscribed?) } = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-w-full', data: { toggle: 'dropdown' } }) do @@ -51,11 +51,11 @@ .dropdown-menu.dropdown-open-left %ul %li - = render Pajamas::ButtonComponent.new(category: :tertiary, button_options: { class: "js-subscribe-button #{'hidden' unless status.unsubscribed?}", data: { status: status, url: toggle_subscription_project_label_path(@project, label) } } ) do + = render Pajamas::ButtonComponent.new(category: :tertiary, button_options: { class: "js-subscribe-button #{'hidden' unless status.unsubscribed?}", data: { status: status, url: toggle_subscription_project_label_path(@project, label) } }) do = _('Subscribe at project level') %li - = render Pajamas::ButtonComponent.new(category: :tertiary, button_options: { class: "js-subscribe-button js-group-level #{'hidden' unless status.unsubscribed?}", data: { status: status, url: toggle_subscription_group_label_path(label.group, label) } } ) do + = render Pajamas::ButtonComponent.new(category: :tertiary, button_options: { class: "js-subscribe-button js-group-level #{'hidden' unless status.unsubscribed?}", data: { status: status, url: toggle_subscription_group_label_path(label.group, label) } }) do = _('Subscribe at group level') - else - = render Pajamas::ButtonComponent.new(button_options: { class: 'js-subscribe-button gl-w-full', data: { status: status, url: toggle_subscription_path, toggle: 'tooltip', container: 'body' }, title: tooltip_title } ) do + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-subscribe-button gl-w-full', data: { status: status, url: toggle_subscription_path, toggle: 'tooltip', container: 'body' }, title: tooltip_title }) do = label_subscription_toggle_button_text(label, @project) diff --git a/app/views/shared/_milestones_filter.html.haml b/app/views/shared/_milestones_filter.html.haml index ef41dc9bb79e59..0053f2fe444238 100644 --- a/app/views/shared/_milestones_filter.html.haml +++ b/app/views/shared/_milestones_filter.html.haml @@ -1,6 +1,6 @@ - count_badge_classes = 'gl-display-none gl-sm-display-inline-flex' -= gl_tabs_nav( {class: 'gl-border-b-0 gl-flex-grow-1', data: { testid: 'milestones-filter' } } ) do += gl_tabs_nav({class: 'gl-border-b-0 gl-flex-grow-1', data: { testid: 'milestones-filter' } }) do = gl_tab_link_to milestones_filter_path(state: 'opened'), { item_active: params[:state].blank? || params[:state] == 'opened' } do = _('Open') = gl_tab_counter_badge counts[:opened], { class: count_badge_classes } diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml index 8e4b8d6d428888..8f2b9fc06e3dc5 100644 --- a/app/views/shared/builds/_tabs.html.haml +++ b/app/views/shared/builds/_tabs.html.haml @@ -1,6 +1,6 @@ - count_badge_classes = 'gl-display-none gl-sm-display-inline-flex' -= gl_tabs_nav( {class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full nav gl-border-b-0', data: { testid: 'jobs-tabs' } } ) do += gl_tabs_nav({class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full nav gl-border-b-0', data: { testid: 'jobs-tabs' } }) do = gl_tab_link_to build_path_proc.call(nil), { item_active: scope.nil? } do = _('All') = gl_tab_counter_badge(limited_counter_with_delimiter(all_builds), { class: count_badge_classes }) diff --git a/app/views/shared/integrations/prometheus/_metrics.html.haml b/app/views/shared/integrations/prometheus/_metrics.html.haml index 8ee0ddfa1b1d29..c74dbfd8b15b26 100644 --- a/app/views/shared/integrations/prometheus/_metrics.html.haml +++ b/app/views/shared/integrations/prometheus/_metrics.html.haml @@ -25,8 +25,8 @@ .card.hidden.js-panel-missing-env-vars .card-header - = sprite_icon('chevron-lg-right', css_class: 'panel-toggle js-panel-toggle-right' ) - = sprite_icon('chevron-lg-down', css_class: 'panel-toggle js-panel-toggle-down hidden' ) + = sprite_icon('chevron-lg-right', css_class: 'panel-toggle js-panel-toggle-right') + = sprite_icon('chevron-lg-down', css_class: 'panel-toggle js-panel-toggle-down hidden') = s_('PrometheusService|Missing environment variable') = gl_badge_tag 0, nil, class: 'js-env-var-count' .card-body.hidden diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 327461b25fdd59..39a123f4775f67 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -101,7 +101,7 @@ .sidebar-collapsed-icon{ data: { toggle: 'tooltip', placement: 'left', container: 'body', boundary: 'viewport' }, title: _('Move issue') } = sprite_icon('long-arrow') .dropdown.sidebar-move-issue-dropdown.hide-collapsed - = render Pajamas::ButtonComponent.new(block: true, button_options: { class: 'js-sidebar-dropdown-toggle js-move-issue', data: { toggle: 'dropdown', display: 'static', track_label: "right_sidebar", track_property: "move_issue", track_action: "click_button", track_value: "" } } ) do + = render Pajamas::ButtonComponent.new(block: true, button_options: { class: 'js-sidebar-dropdown-toggle js-move-issue', data: { toggle: 'dropdown', display: 'static', track_label: "right_sidebar", track_property: "move_issue", track_action: "click_button", track_value: "" } }) do = _('Move issue') .dropdown-menu.dropdown-menu-selectable.dropdown-extended-height = dropdown_title(_('Move issue')) diff --git a/app/views/shared/issuable/form/_title.html.haml b/app/views/shared/issuable/form/_title.html.haml index 51f49c7ca8e230..0f6ef33d5324ee 100644 --- a/app/views/shared/issuable/form/_title.html.haml +++ b/app/views/shared/issuable/form/_title.html.haml @@ -4,8 +4,8 @@ - no_issuable_templates = issuable_templates(ref_project, issuable.to_ability_name).empty? - toggle_wip_link_start = '' - toggle_wip_link_end = '' -- add_wip_text = (_('%{link_start}Start the title with %{draft_snippet}%{link_end} to prevent a merge request draft from merging before it\'s ready.') % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_snippet: 'Draft:'.html_safe } ).html_safe -- remove_wip_text = (_('%{link_start}Remove the %{draft_snippet} prefix%{link_end} from the title to allow this merge request to be merged when it\'s ready.' ) % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_snippet: 'Draft'.html_safe } ).html_safe +- add_wip_text = (_('%{link_start}Start the title with %{draft_snippet}%{link_end} to prevent a merge request draft from merging before it\'s ready.') % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_snippet: 'Draft:'.html_safe }).html_safe +- remove_wip_text = (_('%{link_start}Remove the %{draft_snippet} prefix%{link_end} from the title to allow this merge request to be merged when it\'s ready.') % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_snippet: 'Draft'.html_safe }).html_safe %div{ data: { testid: 'issue-title-input-field' } } = form.text_field :title, required: true, aria: { required: true }, maxlength: 255, autofocus: true, diff --git a/app/views/shared/nav/_sidebar_submenu.html.haml b/app/views/shared/nav/_sidebar_submenu.html.haml index 344dafe7c0f8ce..33b48470020653 100644 --- a/app/views/shared/nav/_sidebar_submenu.html.haml +++ b/app/views/shared/nav/_sidebar_submenu.html.haml @@ -1,5 +1,5 @@ %ul.sidebar-sub-level-items{ class: ('is-fly-out-only' unless sidebar_menu.has_renderable_items?) } - = nav_link(**sidebar_menu.all_active_routes, html_options: { class: 'fly-out-top-item' } ) do + = nav_link(**sidebar_menu.all_active_routes, html_options: { class: 'fly-out-top-item' }) do %span.fly-out-top-item-container %strong.fly-out-top-item-name = sidebar_menu.title diff --git a/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml b/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml index d10196a83cc830..0244f9e21584e4 100644 --- a/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml +++ b/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml @@ -9,7 +9,7 @@ %td.merge_access_levels-container = hidden_field_tag "allowed_to_merge_#{protected_branch.id}", merge_access_levels.first&.access_level - = dropdown_tag( (merge_access_levels.first&.humanize || 'Select') , + = dropdown_tag((merge_access_levels.first&.humanize || 'Select') , options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header', data: { field_name: "allowed_to_merge_#{protected_branch.id}", preselected_items: access_levels_data(merge_access_levels) }}) - if user_merge_access_levels.any? @@ -22,7 +22,7 @@ %td.push_access_levels-container = hidden_field_tag "allowed_to_push_#{protected_branch.id}", push_access_levels.first&.access_level - = dropdown_tag( (push_access_levels.first&.humanize || 'Select') , + = dropdown_tag((push_access_levels.first&.humanize || 'Select') , options: { toggle_class: "js-allowed-to-push js-multiselect", dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container capitalize-header', data: { field_name: "allowed_to_push_#{protected_branch.id}", preselected_items: access_levels_data(push_access_levels) }}) - if user_push_access_levels.any? diff --git a/ee/app/views/devise/sessions/_new_smartcard_ldap.html.haml b/ee/app/views/devise/sessions/_new_smartcard_ldap.html.haml index 97b26bea54c9af..ee6da152624f79 100644 --- a/ee/app/views/devise/sessions/_new_smartcard_ldap.html.haml +++ b/ee/app/views/devise/sessions/_new_smartcard_ldap.html.haml @@ -2,7 +2,7 @@ %div{ id: "#{server['provider_name']}_smartcard" } %span %strong - = sprite_icon('smart-card', css_class: 'vertical-align-middle' ) + = sprite_icon('smart-card', css_class: 'vertical-align-middle') %span.vertical-align-middle = _('Sign in using smart card') %p diff --git a/ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml b/ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml index 3aa1eab2ef7a67..6fc25858488315 100644 --- a/ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml +++ b/ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml @@ -5,7 +5,7 @@ %span.nav-item-name #{ _('Geo') } %ul.sidebar-sub-level-items - = nav_link(controller: '%w(admin/geo/nodes)', html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: '%w(admin/geo/nodes)', html_options: { class: "fly-out-top-item" }) do = link_to admin_geo_nodes_path do %strong.fly-out-top-item-name #{ _('Geo') } diff --git a/ee/app/views/layouts/nav/sidebar/_credentials_link.html.haml b/ee/app/views/layouts/nav/sidebar/_credentials_link.html.haml index 25acdc66299d15..af631fa1ad5314 100644 --- a/ee/app/views/layouts/nav/sidebar/_credentials_link.html.haml +++ b/ee/app/views/layouts/nav/sidebar/_credentials_link.html.haml @@ -6,7 +6,7 @@ %span.nav-item-name = _('Credentials') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :credentials, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :credentials, html_options: { class: "fly-out-top-item" }) do = link_to admin_credentials_path do %strong.fly-out-top-item-name = _('Credentials') diff --git a/ee/app/views/layouts/nav/sidebar/_licenses_link.html.haml b/ee/app/views/layouts/nav/sidebar/_licenses_link.html.haml index cfb433189aa735..b3f0ce930e7357 100644 --- a/ee/app/views/layouts/nav/sidebar/_licenses_link.html.haml +++ b/ee/app/views/layouts/nav/sidebar/_licenses_link.html.haml @@ -5,7 +5,7 @@ %span.nav-item-name = _('Subscription') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: ['admin/subscriptions', 'admin/licenses'], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: ['admin/subscriptions', 'admin/licenses'], html_options: { class: "fly-out-top-item" }) do = link_to admin_subscription_path do %strong.fly-out-top-item-name = _('Subscription') diff --git a/ee/app/views/layouts/nav/sidebar/_profile_billing_link.html.haml b/ee/app/views/layouts/nav/sidebar/_profile_billing_link.html.haml index c2136f29ccd4d1..b65cc4492eea9e 100644 --- a/ee/app/views/layouts/nav/sidebar/_profile_billing_link.html.haml +++ b/ee/app/views/layouts/nav/sidebar/_profile_billing_link.html.haml @@ -6,7 +6,7 @@ %span.nav-item-name = _("Billing") %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :billings, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :billings, html_options: { class: "fly-out-top-item" }) do = link_to profile_billings_path do %strong.fly-out-top-item-name #{ _('Billing') } diff --git a/ee/app/views/layouts/nav/sidebar/_profile_usage_quotas_link.html.haml b/ee/app/views/layouts/nav/sidebar/_profile_usage_quotas_link.html.haml index 88525465ecf5c9..b861e864fda2e8 100644 --- a/ee/app/views/layouts/nav/sidebar/_profile_usage_quotas_link.html.haml +++ b/ee/app/views/layouts/nav/sidebar/_profile_usage_quotas_link.html.haml @@ -5,7 +5,7 @@ %span.nav-item-name = s_('UsageQuota|Usage Quotas') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :usage_quotas, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :usage_quotas, html_options: { class: "fly-out-top-item" }) do = link_to profile_usage_quotas_path do %strong.fly-out-top-item-name = s_('UsageQuota|Usage Quotas') diff --git a/ee/app/views/layouts/nav/sidebar/_push_rules_link.html.haml b/ee/app/views/layouts/nav/sidebar/_push_rules_link.html.haml index 0bbe031e805649..5b2588cf0ba09c 100644 --- a/ee/app/views/layouts/nav/sidebar/_push_rules_link.html.haml +++ b/ee/app/views/layouts/nav/sidebar/_push_rules_link.html.haml @@ -6,7 +6,7 @@ %span.nav-item-name = _('Push Rules') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: :push_rules, html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :push_rules, html_options: { class: "fly-out-top-item" }) do = link_to admin_push_rule_path do %strong.fly-out-top-item-name = _('Push Rules') diff --git a/ee/app/views/layouts/nav/sidebar/_security.html.haml b/ee/app/views/layouts/nav/sidebar/_security.html.haml index e078fea54a0bbe..3e939b3e6074be 100644 --- a/ee/app/views/layouts/nav/sidebar/_security.html.haml +++ b/ee/app/views/layouts/nav/sidebar/_security.html.haml @@ -14,7 +14,7 @@ %span.nav-item-name = _('Security Dashboard') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(path: %w[dashboard#show], html_options: { class: "fly-out-top-item" } ) do + = nav_link(path: %w[dashboard#show], html_options: { class: "fly-out-top-item" }) do %span.fly-out-top-item-container %strong.fly-out-top-item-name = _('Security Dashboard') @@ -26,7 +26,7 @@ %span.nav-item-name = _('Vulnerability Report') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(path: %w[vulnerabilities#index], html_options: { class: "fly-out-top-item" } ) do + = nav_link(path: %w[vulnerabilities#index], html_options: { class: "fly-out-top-item" }) do %span.fly-out-top-item-container %strong.fly-out-top-item-name = _('Vulnerability Report') @@ -38,7 +38,7 @@ %span.nav-item-name = _('Settings') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(path: %w[dashboard#settings], html_options: { class: "fly-out-top-item" } ) do + = nav_link(path: %w[dashboard#settings], html_options: { class: "fly-out-top-item" }) do %span.fly-out-top-item-container %strong.fly-out-top-item-name = _('Settings') diff --git a/ee/app/views/projects/_new_ci_cd_only_project_pane.html.haml b/ee/app/views/projects/_new_ci_cd_only_project_pane.html.haml index dec3eedcbec830..5ab4a151fe742f 100644 --- a/ee/app/views/projects/_new_ci_cd_only_project_pane.html.haml +++ b/ee/app/views/projects/_new_ci_cd_only_project_pane.html.haml @@ -19,11 +19,11 @@ .import-buttons %div - if github_import_enabled? - = render Pajamas::ButtonComponent.new( href: new_import_github_path(ci_cd_only: true), icon: 'github', button_options: { class: 'js-import-github', data: { track_label: "#{track_label}", track_property: 'github', track_action: "click_button", track_value: "" } }) do + = render Pajamas::ButtonComponent.new(href: new_import_github_path(ci_cd_only: true), icon: 'github', button_options: { class: 'js-import-github', data: { track_label: "#{track_label}", track_property: 'github', track_action: "click_button", track_value: "" } }) do = GitHub %div - if git_import_enabled? - = render Pajamas::ButtonComponent.new( icon: 'link', button_options: { class: 'js-toggle-button js-import-git-toggle-button', data: { toggle_open_class: 'active', track_label: "#{track_label}", track_property: 'repo_url', track_action: "click_button", track_value: "" } } ) do + = render Pajamas::ButtonComponent.new(icon: 'link', button_options: { class: 'js-toggle-button js-import-git-toggle-button', data: { toggle_open_class: 'active', track_label: "#{track_label}", track_property: 'repo_url', track_action: "click_button", track_value: "" } }) do = _('Repository by URL') .col-lg-12 .js-toggle-content.toggle-import-form diff --git a/ee/app/views/projects/settings/_restore.html.haml b/ee/app/views/projects/settings/_restore.html.haml index 1bd4e3beedb869..dda2587fd35044 100644 --- a/ee/app/views/projects/settings/_restore.html.haml +++ b/ee/app/views/projects/settings/_restore.html.haml @@ -4,9 +4,9 @@ - date = permanent_deletion_date(project.marked_for_deletion_at) - title = _('This project will be deleted on %{date}') %{ date: date } -= render Pajamas::AlertComponent.new( variant: :warning, += render Pajamas::AlertComponent.new(variant: :warning, title: title, - alert_options: { class: "gl-mb-7"} ) do |c| + alert_options: { class: "gl-mb-7"}) do |c| = c.body do = _("Restoring the project will prevent the project from being removed on this date and restore people's ability to make changes to it.") = _("The repository can be committed to, and issues, comments and other entities can be created.") diff --git a/ee/app/views/registrations/welcome/_button.html.haml b/ee/app/views/registrations/welcome/_button.html.haml index 507295565e989d..6471647370833b 100644 --- a/ee/app/views/registrations/welcome/_button.html.haml +++ b/ee/app/views/registrations/welcome/_button.html.haml @@ -1,2 +1,2 @@ -= render Pajamas::ButtonComponent.new(variant: :confirm, block: true, button_options: { type: 'submit', data: { qa_selector: 'get_started_button' }, class: 'js-trial-welcome-btn' } ) do += render Pajamas::ButtonComponent.new(variant: :confirm, block: true, button_options: { type: 'submit', data: { qa_selector: 'get_started_button' }, class: 'js-trial-welcome-btn' }) do = welcome_submit_button_text diff --git a/ee/app/views/shared/milestones/_burndown.html.haml b/ee/app/views/shared/milestones/_burndown.html.haml index 6a54d6bcb1a843..e8d6e00f919749 100644 --- a/ee/app/views/shared/milestones/_burndown.html.haml +++ b/ee/app/views/shared/milestones/_burndown.html.haml @@ -2,7 +2,7 @@ - burndown_endpoint = milestone.group_milestone? ? api_v4_groups_milestones_burndown_events_path(id: milestone.group.id, milestone_id: milestone.id) : api_v4_projects_milestones_burndown_events_path(id: milestone.project.id, milestone_id: milestone.timebox_id) - if can_generate_chart?(milestone) - - add_page_startup_graphql_call('burndown_chart/burnup', { id: milestone.to_global_id.to_s, isIteration: false, weight: false } ) + - add_page_startup_graphql_call('burndown_chart/burnup', { id: milestone.to_global_id.to_s, isIteration: false, weight: false }) .burndown-chart.mb-2{ data: { start_date: milestone.start_date.strftime("%Y-%m-%d"), due_date: milestone.due_date.strftime("%Y-%m-%d"), milestone_id: milestone.to_global_id, -- GitLab From e714d62e203f2540f6305302afc64056c2e7f8a7 Mon Sep 17 00:00:00 2001 From: Peter Leitzen Date: Thu, 1 Dec 2022 12:09:22 +0100 Subject: [PATCH 2/2] Enable previously disabled cop Layout/SpaceInsideParens in grace period --- .rubocop_todo/layout/space_inside_parens.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.rubocop_todo/layout/space_inside_parens.yml b/.rubocop_todo/layout/space_inside_parens.yml index 3e443d9d5d176f..0a081f39e1664d 100644 --- a/.rubocop_todo/layout/space_inside_parens.yml +++ b/.rubocop_todo/layout/space_inside_parens.yml @@ -1,9 +1,7 @@ --- # Cop supports --autocorrect. Layout/SpaceInsideParens: - # Offense count: 422 - # Temporarily disabled due to too many offenses - Enabled: false + Details: grace period Exclude: - 'db/post_migrate/20210722042939_update_issuable_slas_where_issue_closed.rb' - 'ee/app/models/ee/dependency_proxy/blob.rb' @@ -11,6 +9,7 @@ Layout/SpaceInsideParens: - 'ee/lib/ee/gitlab/auth/ldap/access.rb' - 'ee/lib/gitlab/auth/smartcard/session.rb' - 'ee/lib/system_check/geo/current_node_check.rb' + - 'ee/spec/controllers/projects/mirrors_controller_spec.rb' - 'ee/spec/finders/ee/alert_management/http_integrations_finder_spec.rb' - 'ee/spec/finders/epics_finder_spec.rb' - 'ee/spec/finders/security/findings_finder_spec.rb' @@ -31,6 +30,7 @@ Layout/SpaceInsideParens: - 'ee/spec/models/ee/iteration_spec.rb' - 'ee/spec/models/ee/iterations/cadence_spec.rb' - 'ee/spec/models/ee/key_spec.rb' + - 'ee/spec/models/ee/project_setting_spec.rb' - 'ee/spec/models/ee/system_note_metadata_spec.rb' - 'ee/spec/models/geo/every_geo_event_spec.rb' - 'ee/spec/models/incident_management/escalation_rule_spec.rb' @@ -205,6 +205,8 @@ Layout/SpaceInsideParens: - 'spec/mailers/emails/profile_spec.rb' - 'spec/migrations/20211130165043_backfill_sequence_column_for_sprints_table_spec.rb' - 'spec/migrations/backfill_issues_upvotes_count_spec.rb' + - 'spec/models/ci/pending_build_spec.rb' + - 'spec/models/ci/running_build_spec.rb' - 'spec/models/ml/candidate_metric_spec.rb' - 'spec/models/ml/candidate_spec.rb' - 'spec/policies/clusters/agent_policy_spec.rb' -- GitLab