users: remove option to disable search navbar.

Remove the enable_sequential_post_navigation option. This option was
used to disable the next/previous post navbar below posts.

This option was originally added in issue #674 because of people
complaining about the navbar when it was originally added. Also there
were complaints about URLs being uglier because of search params in the
URL (e.g. /posts/1234?q=touhou). There were also various minor bugs with
it at the time, such as keyboard shortcuts not working correctly, or the
page not remembering your search after a tag edit.

These complaints are irrelevant nowadays because a) people are used to
the navbar by now (and more often complain about it *not* being there
for order:score searches), b) post URLs always contain the search now,
this option hasn't disabled that for years, and c) the initial bugs with
it were fixed years ago.

Only ~1000 users disabled this option and only ~600 were seen in the last year.

Users still wishing to hide the search navbar can use custom CSS instead.
This commit is contained in:
evazion
2021-01-14 15:00:43 -06:00
parent c48ee9d390
commit b6fef7f3f3
5 changed files with 8 additions and 9 deletions

View File

@@ -6,6 +6,8 @@
the navbar beneath posts that lets you move to the next or previous post in a the navbar beneath posts that lets you move to the next or previous post in a
tag search. Previously this was only available to logged-in users. tag search. Previously this was only available to logged-in users.
* Removed the option to disable the next/previous post navbar.
## 2021-01-12 ## 2021-01-12
### Changes ### Changes

View File

@@ -671,7 +671,6 @@ class User < ApplicationRecord
def initialize_attributes def initialize_attributes
self.enable_post_navigation = true self.enable_post_navigation = true
self.new_post_navigation_layout = true self.new_post_navigation_layout = true
self.enable_sequential_post_navigation = true
self.enable_auto_complete = true self.enable_auto_complete = true
self.always_resize_images = true self.always_resize_images = true
end end

View File

@@ -45,12 +45,11 @@ class UserPolicy < ApplicationPolicy
:blacklisted_tags, :time_zone, :per_page, :custom_style, :theme, :blacklisted_tags, :time_zone, :per_page, :custom_style, :theme,
:receive_email_notifications, :always_resize_images, :receive_email_notifications, :always_resize_images,
:enable_post_navigation, :new_post_navigation_layout, :enable_post_navigation, :new_post_navigation_layout,
:enable_private_favorites, :enable_sequential_post_navigation, :enable_private_favorites, :hide_deleted_posts, :style_usernames,
:hide_deleted_posts, :style_usernames, :enable_auto_complete, :enable_auto_complete, :show_deleted_children,
:show_deleted_children, :disable_categorized_saved_searches, :disable_categorized_saved_searches, :disable_tagged_filenames,
:disable_tagged_filenames, :disable_cropped_thumbnails, :disable_cropped_thumbnails, :disable_mobile_gestures, :enable_safe_mode,
:disable_mobile_gestures, :enable_safe_mode, :enable_desktop_mode, :enable_desktop_mode, :disable_post_tooltips,
:disable_post_tooltips,
].compact ].compact
end end

View File

@@ -25,6 +25,6 @@ class PostPresenter
def has_sequential_navigation?(params) def has_sequential_navigation?(params)
return false if PostQueryBuilder.new(params[:q]).has_metatag?(:order, :ordfav, :ordpool) return false if PostQueryBuilder.new(params[:q]).has_metatag?(:order, :ordfav, :ordpool)
return false if params[:pool_id].present? || params[:favgroup_id].present? return false if params[:pool_id].present? || params[:favgroup_id].present?
return CurrentUser.user.enable_sequential_post_navigation true
end end
end end

View File

@@ -60,7 +60,6 @@
<%= f.input :style_usernames, :as => :select, :label => "Colored usernames", :hint => "Color users according to their user level", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %> <%= f.input :style_usernames, :as => :select, :label => "Colored usernames", :hint => "Color users according to their user level", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
<%= f.input :enable_post_navigation, :as => :select, :include_blank => false, :label => "Enable keyboard shortcuts", :hint => "Enable keyboard shortcuts", :collection => [["Yes", "true"], ["No", "false"]] %> <%= f.input :enable_post_navigation, :as => :select, :include_blank => false, :label => "Enable keyboard shortcuts", :hint => "Enable keyboard shortcuts", :collection => [["Yes", "true"], ["No", "false"]] %>
<%= f.input :enable_sequential_post_navigation, :as => :select, :label => "Enable post navigation", :hint => "Show prev/next links when viewing a post", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
<%= f.input :new_post_navigation_layout, :as => :select, :label => "Navigation bar position", :include_blank => false, :collection => [["Below", "true"], ["Above", "false"]], :hint => "When browsing pools or posts, place navigation links above or below the image" %> <%= f.input :new_post_navigation_layout, :as => :select, :label => "Navigation bar position", :include_blank => false, :collection => [["Below", "true"], ["Above", "false"]], :hint => "When browsing pools or posts, place navigation links above or below the image" %>
<%= f.input :hide_deleted_posts, :as => :select, :label => "Deleted post filter", :hint => "Remove deleted posts from search results", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %> <%= f.input :hide_deleted_posts, :as => :select, :label => "Deleted post filter", :hint => "Remove deleted posts from search results", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
<%= f.input :show_deleted_children, :as => :select, :label => "Show deleted children", :hint => "Show thumbnail borders on parent posts even if the children are deleted", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %> <%= f.input :show_deleted_children, :as => :select, :label => "Show deleted children", :hint => "Show thumbnail borders on parent posts even if the children are deleted", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>