Commit 86d63257 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'jswain_whats_new_remove_feature_flag' into 'master'

Remove "whats new" feature flag RUN AS-IF-FOSS

See merge request gitlab-org/gitlab!52020
parents cd802499 73c0bbe6
......@@ -5,7 +5,6 @@ class WhatsNewController < ApplicationController
skip_before_action :authenticate_user!
before_action :check_feature_flag
before_action :check_valid_page_param, :set_pagination_headers, unless: -> { has_version_param? }
feature_category :navigation
......@@ -20,10 +19,6 @@ class WhatsNewController < ApplicationController
private
def check_feature_flag
render_404 unless Feature.enabled?(:whats_new_drawer, current_user)
end
def check_valid_page_param
render_404 if current_page < 1
end
......
......@@ -120,8 +120,7 @@
= sprite_icon('ellipsis_h', size: 12, css_class: 'more-icon js-navbar-toggle-right')
= sprite_icon('close', size: 12, css_class: 'close-icon js-navbar-toggle-left')
- if ::Feature.enabled?(:whats_new_drawer, current_user)
#whats-new-app{ data: { storage_key: whats_new_storage_key, versions: whats_new_versions, gitlab_dot_com: Gitlab.dev_env_org_or_com? } }
#whats-new-app{ data: { storage_key: whats_new_storage_key, versions: whats_new_versions, gitlab_dot_com: Gitlab.dev_env_org_or_com? } }
- if can?(current_user, :update_user_status, current_user)
.js-set-status-modal-wrapper{ data: user_status_data }
%ul
- if current_user_menu?(:help)
= render_if_exists 'layouts/header/whats_new_dropdown_item'
= render 'layouts/header/whats_new_dropdown_item'
%li
= link_to _("Help"), help_path
%li
......
%li
%button.gl-justify-content-space-between.gl-align-items-center.js-whats-new-trigger{ type: 'button', data: { storage_key: whats_new_storage_key }, class: 'gl-display-flex!' }
= _("What's new")
%span.js-whats-new-notification-count.whats-new-notification-count
= whats_new_most_recent_release_items_count
---
title: Add "What's new" item to the help dropdown
merge_request: 52020
author:
type: changed
- if ::Feature.enabled?(:whats_new_dropdown, current_user)
- if ::Feature.enabled?(:whats_new_drawer, current_user)
%li
%button.gl-justify-content-space-between.gl-align-items-center.js-whats-new-trigger{ type: 'button', data: { storage_key: whats_new_storage_key }, class: 'gl-display-flex!' }
= _("What's new")
%span.js-whats-new-notification-count.whats-new-notification-count
= whats_new_most_recent_release_items_count
- else
%li
= link_to _("What's new"), "#{promo_url}/releases/gitlab-com/", target: '_blank', rel: 'noopener noreferrer', data: { track_event: 'click_whats_new', track_property: 'question_menu' }
......@@ -6,8 +6,6 @@ RSpec.describe "renders a `whats new` dropdown item", :js do
let_it_be(:user) { create(:user) }
before do
stub_feature_flags(whats_new_dropdown: true, whats_new_drawer: true)
sign_in(user)
end
......
......@@ -7,11 +7,6 @@ RSpec.describe WhatsNewController do
let(:item) { double(:item) }
let(:highlights) { double(:highlight, items: [item], map: [item].map, next_page: 2) }
context 'with whats_new_drawer feature enabled' do
before do
stub_feature_flags(whats_new_drawer: true)
end
context 'with no page param' do
it 'responds with paginated data and headers' do
allow(ReleaseHighlight).to receive(:paginated).with(page: 1).and_return(highlights)
......@@ -50,17 +45,4 @@ RSpec.describe WhatsNewController do
end
end
end
context 'with whats_new_drawer feature disabled' do
before do
stub_feature_flags(whats_new_drawer: false)
end
it 'returns a 404' do
get whats_new_path, xhr: true
expect(response).to have_gitlab_http_status(:not_found)
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