Commit c648829d authored by Jay Swain's avatar Jay Swain

Add "whats new" item to help dropdown

Added a "whats new at GitLab" item to the help dropdown. Also added a
helper to retreive the plan name if a project exits.

part of: https://gitlab.com/gitlab-org/growth/product/-/issues/1487
parent 9ebb85f4
%ul
- if current_user_menu?(:help)
= render_if_exists 'layouts/header/whats_new_dropdown_item'
%li
= link_to _("Help"), help_path
%li
......
......@@ -117,6 +117,10 @@ module EE
allow_access_to_onboarding?
end
def show_whats_new_dropdown_item?
::Gitlab.com? && ::Feature.enabled?(:whats_new_dropdown)
end
private
def appearance
......
- if show_whats_new_dropdown_item?
%li
= link_to _("See what's new at GitLab"), "#{promo_url}/releases/categories/releases/", target: '_blank', rel: 'noopener noreferrer', data: { track_event: 'click_whats_new', track_property: 'question_menu' }
---
title: Add "whats new" item to help dropdown
merge_request: 29183
author:
type: added
......@@ -187,4 +187,26 @@ describe ApplicationHelper do
end
end
end
describe '#show_whats_new_dropdown_item?' do
using RSpec::Parameterized::TableSyntax
subject { helper.show_whats_new_dropdown_item? }
where(:feature_flag, :gitlab_com, :result) do
true | true | true
true | false | false
false | true | false
false | false | false
end
with_them do
before do
stub_feature_flags(whats_new_dropdown: feature_flag)
allow(::Gitlab).to receive(:com?).and_return(gitlab_com)
end
it { is_expected.to be(result) }
end
end
end
......@@ -18168,6 +18168,9 @@ msgstr ""
msgid "See the affected projects in the GitLab admin panel"
msgstr ""
msgid "See what's new at GitLab"
msgstr ""
msgid "Select"
msgstr ""
......
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