From f3170e0aec4488d237fc0ff284f5b5aa66d3a42d Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 6 Feb 2024 04:33:39 +0000 Subject: [PATCH] Radically simplify the switching back and forth for the new design. See #1754 --- app/controllers/themes_controller.rb | 7 +----- app/views/_tailwind/profiles/_menu.html.erb | 9 +++----- app/views/_tailwind/profiles/design.html.erb | 11 +++------ app/views/profiles/design.html.haml | 24 ++++---------------- app/views/profiles/show.html.haml | 4 +--- 5 files changed, 12 insertions(+), 43 deletions(-) diff --git a/app/controllers/themes_controller.rb b/app/controllers/themes_controller.rb index 420d19ee0..972480e90 100644 --- a/app/controllers/themes_controller.rb +++ b/app/controllers/themes_controller.rb @@ -9,11 +9,6 @@ def toggle return unless Flipper.enabled?(:switch_themes, current_user) update_tailwind_theme(!show_tailwind_theme?) - notice = if show_tailwind_theme? - "Thank you for being an early tester of the new design. Please remember to report any problems that you encounter." - else - "We're sad to see you go. Please let us know why you switched back" - end - redirect_to root_path, notice: + redirect_to root_path end end diff --git a/app/views/_tailwind/profiles/_menu.html.erb b/app/views/_tailwind/profiles/_menu.html.erb index bb83e2163..dce240d2e 100644 --- a/app/views/_tailwind/profiles/_menu.html.erb +++ b/app/views/_tailwind/profiles/_menu.html.erb @@ -3,16 +3,13 @@
  • <%= pa_link_to_unless_current "Create new alert", new_profile_alert_path %>
  • <%= pa_link_to_unless_current "Your comments", comments_profile_path %>
  • <%= pa_link_to_unless_current "Edit account", edit_user_registration_path %>
  • + <% if Flipper.enabled?(:switch_themes, current_user) %> +
  • <%= pa_link_to_unless_current "Switch design", design_profile_path %>
  • + <% end %> <%# Setting "Sign out" to a block breaks on ios/safari %>
  • <%= button_to "Sign out", destroy_user_session_path, method: :delete, class: "text-fuchsia hover:underline font-bold cursor-pointer" %>
  • -<% if Flipper.enabled?(:switch_themes, current_user) %> - -<% end %> - <% if current_user.admin? %>