Skip to content

Commit

Permalink
The link won out in the A/B test
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Sep 13, 2024
1 parent 020214f commit 7b795f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
1 change: 0 additions & 1 deletion app/controllers/applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def show
def external
application = Application.find(T.cast(params[:id], String))
@application = T.let(application, T.nilable(Application))
ab_finished("view_source")
end

private
Expand Down
21 changes: 4 additions & 17 deletions app/views/applications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@
<dt class="mt-8 font-bold md:mt-0 font-display">Planning Authority</dt>
<dd>
<%= @application.authority.full_name %>
<% if ab_test("view_source", "button", "link") == "link" %>
<div class="inline-block ml-2 size-4 text-fuchsia">
<%= render IconComponent.new(name: :external) %>
</div>
<%= pa_link_to "View source", external_application_path(@application), extra_classes: "ml-1" %>
<% end %>
<div class="inline-block ml-2 size-4 text-fuchsia">
<%= render IconComponent.new(name: :external) %>
</div>
<%= pa_link_to "View source", external_application_path(@application), extra_classes: "ml-1" %>
</dd>
<dt class="mt-8 font-bold font-display md:mt-0">Reference number</dt>
<dd>
Expand Down Expand Up @@ -98,17 +96,6 @@
<% end %>
</div>

<% if ab_test("view_source", "button", "link") == "button" %>
<div class="mt-2">
<%= render ButtonWithSideTextComponent.new(tag: :a, size: "xl", type: :primary, href: external_application_path(@application), icon: :external) do |c| %>
View source
<% c.with_side_text do %>
on the <%= @application.authority.full_name %> website
<% end %>
<% end %>
</div>
<% end %>

<div class="mt-6 md:mt-2">
<%= render ShareButtonComponent.new(url: application_url(@application), title: page_title(@application), color: :green) do %>
Share this application
Expand Down

0 comments on commit 7b795f9

Please sign in to comment.