Skip to content

Commit

Permalink
Merge pull request #3822 from alphagov/remove_ab_test
Browse files Browse the repository at this point in the history
Remove browse popular tasks AB test
  • Loading branch information
beccapearce authored Nov 15, 2024
2 parents cc5f5b5 + e82a137 commit 79fa6f2
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 454 deletions.
2 changes: 0 additions & 2 deletions app/controllers/browse_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class BrowseController < ApplicationController
include PopularTasksAbTestable

slimmer_template "gem_layout_full_width"

def index
Expand Down
43 changes: 0 additions & 43 deletions app/controllers/concerns/popular_tasks_ab_testable.rb

This file was deleted.

20 changes: 2 additions & 18 deletions app/helpers/browse_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,9 @@ def display_popular_links_for_slug?(slug)
popular_links_data(slug).present?
end

def control_key_is_present?(slug)
I18n.exists?("#{slug}.control", scope: "browse.popular_links")
end

def control_data(slug)
if control_key_is_present?(slug)
I18n.t("browse.popular_links.#{slug}.control")
else
[]
end
end

def popular_links_data(slug)
if popular_tasks_variant_a_page?
I18n.t("browse.popular_links.#{slug}.variant_a")
elsif popular_tasks_variant_b_page?
I18n.t("browse.popular_links.#{slug}.variant_b")
else
control_data(slug)
if I18n.exists?("browse.popular_links.#{slug}", :en)
I18n.t("browse.popular_links.#{slug}")
end
end

Expand Down
1 change: 0 additions & 1 deletion app/views/browse/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
section: page.title.downcase,
}
} %>
<%= popular_tasks_variant.analytics_meta_tag.html_safe if popular_tasks_page_under_test? %>
<% end %>

<% content_for :breadcrumbs do %>
Expand Down
Loading

0 comments on commit 79fa6f2

Please sign in to comment.