Skip to content

Commit

Permalink
Address code review feedback
Browse files Browse the repository at this point in the history
Moved feature flag logic to `ask_gis` partial and reintroduced
original 'Ask Us' link.
  • Loading branch information
jazairi committed Feb 13, 2024
1 parent bf3985e commit f31600f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/record/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
</div>
<% end %>

<%= render 'shared/ask_gis' if Flipflop.enabled?(:gdt) %>
<%= render 'shared/ask_gis' %>
</div>
6 changes: 3 additions & 3 deletions app/views/search/results.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<% end %>
<% end %>
</div>
<%= render partial: 'shared/ask_gis', locals: { display: 'view-lg' } if Flipflop.enabled?(:gdt) %>
<%= render partial: 'shared/ask_gis', locals: { display: 'view-lg' } %>
</aside>
<% end %>

Expand All @@ -77,12 +77,12 @@
</div>
<% end %>
</div>
<%= render partial: 'shared/ask_gis', locals: { display: 'aside' } if Flipflop.enabled?(:gdt) && @results.blank? %>
<%= render partial: 'shared/ask_gis', locals: { display: 'aside' } if @results.blank? %>

<% if @results.present? %>
<div id="pagination">
<%= render partial: "pagination" %>
</div>
<%= render partial: 'shared/ask_gis', locals: { display: 'view-md' } if Flipflop.enabled?(:gdt) %>
<%= render partial: 'shared/ask_gis', locals: { display: 'view-md' } %>
<% end %>
</div>
6 changes: 5 additions & 1 deletion app/views/shared/_ask_gis.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<% end %>
<div class="bit ask-us <%= display %>">
<h3 class="title">Need help?</h3>
<a class="btn button-secondary" href="https://libraries.mit.edu/ask-gis">Ask GIS</a>
<% if Flipflop.enabled?(:gdt) %>
<a class="btn button-secondary" href="https://libraries.mit.edu/ask-gis">Ask GIS</a>
<% else %>
<a class="btn button-secondary" href="https://libraries.mit.edu/ask/">Ask Us</a>
<% end %>
</div>
<% if display == 'view-aside' %>
</div>
Expand Down

0 comments on commit f31600f

Please sign in to comment.