mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Remove support for legacy navigation menu (#23752)
Why this change? Back in May 17 2023 along with the release of Discourse 3.1, we announced on meta that the legacy hamburger dropdown navigation menu is deprecated and will be dropped in Discourse 3.2. This is the link to the announcement on meta: https://meta.discourse.org/t/removing-the-legacy-hamburger-navigation-menu-option/265274 ## What does this change do? This change removes the `legacy` option from the `navigation_menu` site setting and migrates existing sites on the `legacy` option to the `header dropdown` option. All references to the `legacy` option in code and tests have been removed as well.
This commit is contained in:
committed by
GitHub
parent
2c346a1ba6
commit
832b3b9e60
@@ -9,29 +9,6 @@ describe "Viewing sidebar as logged in user", type: :system do
|
||||
|
||||
before { sign_in(user) }
|
||||
|
||||
describe "when using the legacy navigation menu" do
|
||||
before { SiteSetting.navigation_menu = "legacy" }
|
||||
|
||||
it "should display the sidebar when `navigation_menu` query param is 'sidebar'" do
|
||||
visit("/latest?navigation_menu=sidebar")
|
||||
|
||||
expect(sidebar).to be_visible
|
||||
expect(sidebar).to have_category_section_link(category_sidebar_section_link.linkable)
|
||||
expect(page).not_to have_css(".hamburger-dropdown")
|
||||
end
|
||||
|
||||
it "should display the sidebar dropdown menu when `navigation_menu` query param is 'header_dropdown'" do
|
||||
visit("/latest?navigation_menu=header_dropdown")
|
||||
|
||||
expect(sidebar).to be_not_visible
|
||||
|
||||
header_dropdown = PageObjects::Components::SidebarHeaderDropdown.new
|
||||
header_dropdown.click
|
||||
|
||||
expect(header_dropdown).to be_visible
|
||||
end
|
||||
end
|
||||
|
||||
describe "when using the header dropdown navigation menu" do
|
||||
before { SiteSetting.navigation_menu = "header dropdown" }
|
||||
|
||||
@@ -41,33 +18,11 @@ describe "Viewing sidebar as logged in user", type: :system do
|
||||
expect(sidebar).to be_visible
|
||||
expect(page).not_to have_css(".hamburger-dropdown")
|
||||
end
|
||||
|
||||
it "should display the legacy dropdown menu when `navigation_menu` query param is 'legacy'" do
|
||||
visit("/latest?navigation_menu=legacy")
|
||||
|
||||
expect(sidebar).to be_not_visible
|
||||
|
||||
legacy_header_dropdown = PageObjects::Components::LegacyHeaderDropdown.new
|
||||
legacy_header_dropdown.click
|
||||
|
||||
expect(legacy_header_dropdown).to be_visible
|
||||
end
|
||||
end
|
||||
|
||||
describe "when using the sidebar navigation menu" do
|
||||
before { SiteSetting.navigation_menu = "sidebar" }
|
||||
|
||||
it "should display the legacy dropdown menu when `navigation_menu` query param is 'legacy'" do
|
||||
visit("/latest?navigation_menu=legacy")
|
||||
|
||||
expect(sidebar).to be_not_visible
|
||||
|
||||
legacy_header_dropdown = PageObjects::Components::LegacyHeaderDropdown.new
|
||||
legacy_header_dropdown.click
|
||||
|
||||
expect(legacy_header_dropdown).to be_visible
|
||||
end
|
||||
|
||||
it "should display the sidebar dropdown menu when `navigation_menu` query param is 'header_dropdown'" do
|
||||
visit("/latest?navigation_menu=header_dropdown")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user