diff options
Diffstat (limited to 'app/helpers/nav')
-rw-r--r-- | app/helpers/nav/new_dropdown_helper.rb | 15 | ||||
-rw-r--r-- | app/helpers/nav/top_nav_helper.rb | 4 |
2 files changed, 6 insertions, 13 deletions
diff --git a/app/helpers/nav/new_dropdown_helper.rb b/app/helpers/nav/new_dropdown_helper.rb index b952aeacb13..ff8839d68fd 100644 --- a/app/helpers/nav/new_dropdown_helper.rb +++ b/app/helpers/nav/new_dropdown_helper.rb @@ -21,13 +21,6 @@ module Nav } end - def new_repo_experiment_text - experiment(:new_repo, user: current_user) do |e| - e.use { _('New project') } - e.try { _('New project/repository') } - end.run - end - private def group_menu_section(group) @@ -37,9 +30,9 @@ module Nav menu_items.push( ::Gitlab::Nav::TopNavMenuItem.build( id: 'new_project', - title: new_repo_experiment_text, + title: _('New project/repository'), href: new_project_path(namespace_id: group.id), - data: { track_experiment: 'new_repo', track_event: 'click_link_new_project_group', track_label: 'plus_menu_dropdown' } + data: { track_event: 'click_link_new_project_group', track_label: 'plus_menu_dropdown' } ) ) end @@ -129,9 +122,9 @@ module Nav menu_items.push( ::Gitlab::Nav::TopNavMenuItem.build( id: 'general_new_project', - title: new_repo_experiment_text, + title: _('New project/repository'), href: new_project_path, - data: { track_experiment: 'new_repo', track_event: 'click_link_new_project', track_label: 'plus_menu_dropdown', qa_selector: 'global_new_project_link' } + data: { track_event: 'click_link_new_project', track_label: 'plus_menu_dropdown', qa_selector: 'global_new_project_link' } ) ) end diff --git a/app/helpers/nav/top_nav_helper.rb b/app/helpers/nav/top_nav_helper.rb index b8ddb932b73..052b8339ebd 100644 --- a/app/helpers/nav/top_nav_helper.rb +++ b/app/helpers/nav/top_nav_helper.rb @@ -22,7 +22,7 @@ module Nav new_view_model = new_dropdown_view_model(project: project, group: group) - if new_view_model + if new_view_model && new_view_model.fetch(:menu_sections)&.any? builder.add_view(NEW_VIEW, new_view_model) end @@ -98,7 +98,7 @@ module Nav builder.add_primary_menu_item_with_shortcut( active: nav == 'project' || active_nav_link?(path: %w[root#index projects#trending projects#starred dashboard/projects#index]), css_class: 'qa-projects-dropdown', - data: { track_label: "projects_dropdown", track_event: "click_dropdown", track_experiment: "new_repo" }, + data: { track_label: "projects_dropdown", track_event: "click_dropdown" }, view: PROJECTS_VIEW, shortcut_href: dashboard_projects_path, **projects_menu_item_attrs |