Move alert box that recommendations upgrading GitLab for Slack app to be above Trigger section

About

We display an alert on the GitLab for Slack app form to recommend people upgrade their app to be able to use the new notifications feature:

Alert positioned below the triggers
alert-notification-in-wrong-place

The easiest way to preview this in development is:

  1. At time of writing you will need to enable the feature
    Feature.enable(:integration_slack_app_notifications)
  2. On the rails console:
       project = Project.find_by_full_path(<project-full-path>)
    
       # Create a GitLab Slack Application integration
       integration = project.find_or_initialize_integration('gitlab_slack_application')
       integration.assign_attributes(active: true)
       integration.save!(context: :manual_change)
    
       # Create a mock SlackIntegration record, which normally happens when someone goes through the Slack
       # app installation flow, authorizing with their Slack workspace:
       SlackIntegration.create(integration: integration, team_id: 'foo', team_name: 'foo', alias: 'foo', user_id: 'foo')
  3. Visit /<PROJECT>/-/settings/integrations/gitlab_slack_application/edit.

Problem

The alert is currently positioned just above the "Notify only broken pipelines" section (the "connection" section), which is towards the bottom of the page.

Instead, it should be positioned above the "trigger" section instead, which is the first notifications-related section the user sees when scrolling down.

Solution

Move the alert to be positioned just above the "trigger" section of the GitLab for Slack app integration form.

Edited by Libor Vanc