discourse/lib/top_menu.rb
Martin Brennan c85b12934e
FEATURE: Add upcoming change for unified new view (#40631)
Moves the `experimental_new_new_view_groups` setting to an
upcoming change called "Enable unified new" (`enable_unified_new`)

This will aim to introduce the unified new view topic list to
all sites as the permanent default experience.
2026-06-09 11:34:22 +10:00

15 lines
446 B
Ruby
Vendored

# frozen_string_literal: true
module TopMenu
def self.choices
base = %w[latest new unseen top categories read posted bookmarks hot]
begin
base << "unread" unless UpcomingChanges.enabled?(:enable_unified_new)
rescue ArgumentError
# During initial settings load, the enable_unified_new setting may not
# be registered yet. Default to including unread in that case.
base << "unread"
end
base
end
end