Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRCH-5151 Hide old SERP settings in Super Admin and Admin Center #1567

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/controllers/admin/affiliates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ class Admin::AffiliatesController < Admin::AdminController
end

config.update.columns.add_subgroup 'Display Settings' do |name_group|
display_columns = %i[use_redesigned_results_page
show_search_filter_settings
display_columns = %i[show_search_filter_settings
looking_for_government_services
footer_fragment
header_tagline_font_family
Expand Down
4 changes: 0 additions & 4 deletions app/views/sites/shared/_manage_display_sub_nav.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@
%li{ site_nav_css_class_hash('displays') }= link_to 'Display Overview', edit_site_display_path(@site)
%li{ site_nav_css_class_hash('visual_designs') }= link_to t('sites.visual_designs.edit.visual_design',
scope: 'admin_center'), edit_site_visual_design_path(@site)
- unless @site.use_redesigned_results_page
%li{ site_nav_css_class_hash('font_and_colors') }= link_to 'Legacy Font & Colors', edit_site_font_and_colors_path(@site)
%li{ site_nav_css_class_hash('image_assets') }= link_to 'Legacy Image Assets', edit_site_image_assets_path(@site)
%li{ site_nav_css_class_hash('header_and_footers') }= link_to 'Legacy Header & Footer', edit_site_header_and_footer_path(@site)
%li{ site_nav_css_class_hash('no_results_pages') }= link_to 'No Results Page', edit_site_no_results_pages_path(@site)
%li{ site_nav_css_class_hash('alerts') }= link_to 'Search Page Alert', edit_site_alert_path(@site)
3 changes: 0 additions & 3 deletions app/views/sites/visual_designs/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
= render_flash_message
= render_error_messages(@site)

- unless @site.use_redesigned_results_page
%p= t('admin_center.sites.visual_designs.edit.preview_warning', email: mail_to(SUPPORT_EMAIL_ADDRESS)).html_safe

%ul.navigation_tabs
%li
%h3
Expand Down
4 changes: 0 additions & 4 deletions config/locales/admin_center/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ en:
visual_designs:
edit:
preview_button: Preview Redesigned Display
preview_warning: |
These settings are for preview purposes only. If you would like to use the new display layout for your
results, contact %{email} and we will enable it for you. By the end of March 2024, all sites still using
the old layout will be updated to the new layout.
sections:
fonts_and_colors: Fonts & Colors
header_and_footer: Header & Footer
Expand Down
19 changes: 0 additions & 19 deletions features/admin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,6 @@ Feature: Administration
And I press "Update"
Then I should see "New Name"

@javascript
Scenario: Editing an affiliate's Display Settings as an admin
Given the following Affiliates exist:
| display_name | name | contact_email | first_name | last_name | website | use_redesigned_results_page |
| agency site | agency.gov | [email protected] | One | Foo | http://beta.agency.gov | false |
When I go to the admin sites page
When I follow "Edit" within the first scaffold row
Then I should see "Settings (Show)"
And I should see "Enable/disable Settings (Show)"
And I should see "Display Settings (Show)"
And I should see "Analytics-Tracking Code (Show)"
When I follow "Show" within the third subsection row
And I check "Use redesigned results page"
And I press "Update"
Then I should see "agency site"
When I follow "Edit" within the first scaffold row
When I follow "Show" within the third subsection row
And the "Use redesigned results page" checkbox should be checked

Scenario: Visiting the users admin page as an admin
When I go to the admin home page
And I follow "Users" within ".main"
Expand Down
17 changes: 0 additions & 17 deletions features/admin_center_manage_display.feature
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ Feature: Manage Display
And I am logged in with email "[email protected]"
When I go to the agency.gov's Visual Design page
Then I should see "Visual design (new)"
And the page body should not contain "These settings are for preview purposes only."
And I should see "Fonts & Colors" within the navigation tabs
And I should see "Results Format" within the navigation tabs
And I should see "Image Assets" within the navigation tabs
Expand Down Expand Up @@ -641,7 +640,6 @@ Feature: Manage Display
And I am logged in with email "[email protected]"
When I go to the agency.gov's Visual Design page
Then I should see "Visual design (new)"
And the page body should contain "These settings are for preview purposes only."

Scenario: Display sub navigation links when "Use Redesigned Results Page" is true
Given the following Affiliates exist:
Expand All @@ -653,18 +651,3 @@ Feature: Manage Display
And I should not see a link to "Legacy Font & Colors" in the active site sub navigation
And I should not see a link to "Legacy Image Assets" in the active site sub navigation
And I should not see a link to "Legacy Header & Footer" in the active site sub navigation

Scenario: Display sub navigation links when "Use Redesigned Results Page" is false
Given the following Affiliates exist:
| display_name | name | contact_email | first_name | last_name | use_redesigned_results_page |
| agency site | agency.gov | [email protected] | John | Bar | false |
And I am logged in with email "[email protected]"
When I go to the agency.gov's Manage Display page
Then I should see "Visual design (new)"
And the page body should not contain "These settings are for preview purposes only."
And I follow "Legacy Font & Colors"
And I should see a link to "Legacy Font & Colors" in the active site sub navigation
And I follow "Legacy Image Assets"
And I should see a link to "Legacy Image Assets" in the active site sub navigation
And I follow "Legacy Header & Footer"
And I should see a link to "Legacy Header & Footer" in the active site sub navigation
2 changes: 1 addition & 1 deletion spec/controllers/admin/affiliates_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

describe 'Display Settings subgroup' do
let(:display_columns) do
%i[ use_redesigned_results_page footer_fragment header_tagline_font_family
%i[ footer_fragment header_tagline_font_family
header_tagline_font_size header_tagline_font_style no_results_pointer
page_one_more_results_pointer navigation_dropdown_label related_sites_dropdown_label
looking_for_government_services show_search_filter_settings ]
Expand Down