Skip to content

Use Pajamas button component for Mattermost slash commands

What does this MR do and why?

Use Pajamas button component for Mattermost slash commands. Also remove columns layout as we no longer use it.

Changelog: changed

Screenshots or screen recordings

Before After
Mattermost_slash_commands_before Mattermost_slash_commands_after

How to set up and validate locally

  1. Apply this diff to force render the view:
diff --git a/app/views/shared/integrations/mattermost_slash_commands/_help.html.haml b/app/views/shared/integrations/mattermost_slash_commands/_help.html.haml
index 6ce1c65a8dc0..2202c90102ba 100644
--- a/app/views/shared/integrations/mattermost_slash_commands/_help.html.haml
+++ b/app/views/shared/integrations/mattermost_slash_commands/_help.html.haml
@@ -1,4 +1,4 @@
-- enabled = Gitlab.config.mattermost.enabled
+- enabled = true
 
 .info-well
   .well-segment
diff --git a/app/views/shared/integrations/mattermost_slash_commands/_installation_info.html.haml b/app/views/shared/integrations/mattermost_slash_commands/_installation_info.html.haml
index ac14e1a6cd70..4db37e5622a4 100644
--- a/app/views/shared/integrations/mattermost_slash_commands/_installation_info.html.haml
+++ b/app/views/shared/integrations/mattermost_slash_commands/_installation_info.html.haml
@@ -1,5 +1,5 @@
 .services-installation-info
-  - unless integration.activated?
+  - unless false
     = render Pajamas::ButtonComponent.new(href: new_project_mattermost_path(@project), button_text_classes: 'gl-display-flex gl-gap-2') do
       = custom_icon('mattermost_logo')
       = s_("MattermostService|Add to Mattermost")
  1. Go to Project > Settings > Integrations > Mattermost slash commands. For example, http://127.0.0.1:3000/gitlab-org/gitlab-shell/-/settings/integrations/mattermost_slash_commands/edit.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #416040 (closed)

Merge request reports

Loading