diff --git a/.changeset/large-pandas-divide.md b/.changeset/large-pandas-divide.md
new file mode 100644
index 0000000000..adbf16c901
--- /dev/null
+++ b/.changeset/large-pandas-divide.md
@@ -0,0 +1,5 @@
+---
+"@primer/view-components": patch
+---
+
+Remove the deprecated `Primer::DropdownMenuComponent`.
diff --git a/Gemfile b/Gemfile
index 19c492882c..adad0e0937 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,6 +5,9 @@ source "https://rubygems.org"
gemspec
rails_version = (ENV["RAILS_VERSION"] || "7.0.3").to_s
+# remove when https://github.com/rails/rails/pull/47142 is merged
+gem "rack", "~> 2.0"
+
gem "rack-cors"
gem "rake", "~> 13.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index f74724b630..6d0588ed5b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -262,6 +262,7 @@ DEPENDENCIES
primer_view_components!
pry
puma (~> 5.6.4)
+ rack (~> 2.0)
rack-cors
railties (= 7.0.3)
rake (~> 13.0)
diff --git a/app/components/primer/dropdown_menu_component.html.erb b/app/components/primer/dropdown_menu_component.html.erb
deleted file mode 100644
index db703ff8b9..0000000000
--- a/app/components/primer/dropdown_menu_component.html.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= render Primer::BaseComponent.new(**@system_arguments) do %>
- <% if @header.present? %>
-
- <% end %>
- <%= content %>
-<% end %>
diff --git a/app/components/primer/dropdown_menu_component.rb b/app/components/primer/dropdown_menu_component.rb
deleted file mode 100644
index 0f17e80ebf..0000000000
--- a/app/components/primer/dropdown_menu_component.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: true
-
-module Primer
- # DropdownMenus are lightweight context menus for housing navigation and actions.
- # They're great for instances where you don't need the full power (and code)
- # of the select menu.
- class DropdownMenuComponent < Primer::Component
- status :deprecated
-
- SCHEME_DEFAULT = :default
- SCHEME_MAPPINGS = {
- SCHEME_DEFAULT => "",
- :dark => "dropdown-menu-dark"
- }.freeze
-
- DIRECTION_DEFAULT = :se
- DIRECTION_OPTIONS = [DIRECTION_DEFAULT, :sw, :w, :e, :ne, :s].freeze
-
- # @example With a header
- #
- # <%= render(Primer::Beta::Details.new(overlay: :default, reset: true, position: :relative)) do |component| %>
- # <% component.with_summary do %>
- # Dropdown
- # <% end %>
- #
- # <% component.with_body do %>
- # <%= render(Primer::DropdownMenuComponent.new(header: "Options")) do %>
- #
- # <% end %>
- # <% end %>
- # <% end %>
- #
- #
- # @param direction [Symbol] <%= one_of(Primer::DropdownMenuComponent::DIRECTION_OPTIONS) %>
- # @param scheme [Symbol] Pass `:dark` for dark mode theming
- # @param header [String] Optional string to display as the header
- # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
- def initialize(direction: DIRECTION_DEFAULT, scheme: SCHEME_DEFAULT, header: nil, **system_arguments)
- @header = header
- @direction = direction
- @system_arguments = deny_tag_argument(**system_arguments)
-
- @system_arguments[:tag] = "details-menu"
- @system_arguments[:role] = "menu"
-
- @system_arguments[:classes] = class_names(
- @system_arguments[:classes],
- "dropdown-menu",
- "dropdown-menu-#{fetch_or_fallback(DIRECTION_OPTIONS, direction, DIRECTION_DEFAULT)}",
- SCHEME_MAPPINGS[fetch_or_fallback(SCHEME_MAPPINGS.keys, scheme, SCHEME_DEFAULT)]
- )
- end
- end
-end
diff --git a/docs/content/guides/primer_dropdown_menu_component.md b/docs/content/guides/primer_dropdown_menu_component.md
deleted file mode 100644
index 1f3d92a41d..0000000000
--- a/docs/content/guides/primer_dropdown_menu_component.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-title: Moving Away From `Primer::DropdownMenuComponent`
----
-
-This guide will show you how to upgrade from the now deprecated
-[`Primer::DropdownMenuComponent`](https://primer.style/view-components/components/dropdownmenu)
-to the latest [`Primer::Alpha::Dropdown`](https://primer.style/view-components/components/alpha/dropdown)
-component.
-
-## Arguments
-
-The following arguments for the component initializer have changed between the deprecated and newer versions
-of the Primer Dropdown.
-
-| From `Primer::DropdownMenuComponent` | To `Primer::Alpha::Dropdown` | Notes |
-|--------------------------------------|------------------------------|-------|
-| `direction` | n/a | Moved to `menu` slot, below |
-| `scheme` | n/a | Moved to `menu` slot, below |
-| `header` | n/a | Moved to `menu` slot, below |
-| n/a | `overlay` | Color of the menu overlay: `:default`, `:dark`, or `:none` |
-| n/a | `with_caret` | Whether or not a caret should be displayed on the button |
-
-The remaining arguments have stayed the same.
-
-Please see the following documentation for complete descriptions and examples.
-
-* [Deprecated `Primer::DropdownMenuComponent`](https://primer.style/view-components/components/dropdownmenu)
-* [Updated `Primer::Alpha::Dropdown` component](https://primer.style/view-components/components/alpha/dropdown)
-* [`Primer::Alpha::Dropdown` Lookbook examples](https://primer.style/view-components/lookbook/inspect/primer/alpha/dropdown/default)
-
-## Slot Names
-
-The following slots have changed with the newer Primer Dropdown.
-
-| From `Primer::DropdownMenuComponent` | To `Primer::Alpha::Dropdown` | Notes |
-|--------------------------------------|------------------------------|-------|
-| n/a | `menu` | Required context menu for the dropdown. See the "Arguments for `menu` slot" section, below |
-| n/a | `button` | The [`Primer::Beta::Button`](https://primer.style/view-components/components/beta/button) to display for the dropdown action |
-
-The remaining slot names have stayed the same.
-
-### Arguments for `menu` slot
-
-The following arguments are available with the `menu` named slot in Primer Dropdown.
-
-| Argument | Description |
-|-------------|-------------|
-| `as` | when `as` is `:list`, wraps the menu in a `` with a `- ` for each item |
-| `direction` | relative position to show dropdown, when button is clicked |
-| `header` | optional string to display as the header |
-| `scheme` | pass `:dark` for dark mode theming |
-| `system_arguments` | [System arguments](https://primer.style/view-components/system-arguments) |
-
-[← Back to migration guides](https://primer.style/view-components/migration)
diff --git a/docs/content/migration.md b/docs/content/migration.md
index 9c12afc64f..c7befcea95 100644
--- a/docs/content/migration.md
+++ b/docs/content/migration.md
@@ -28,6 +28,5 @@ components.
| Deprecated Component | Replacement Component | Guide |
|----------------------|-----------------------|-------|
| [`Primer::ButtonComponent`](https://primer.style/view-components/components/button) | [`Primer::Beta::Button`](https://primer.style/view-components/components/beta/button) | [Upgrade to Primer::Beta::Button](https://primer.style/view-components/guides/primer_button_component) |
-| [`Primer::DropdownMenuComponent`](https://primer.style/view-components/components/dropdownmenu) | [`Primer::Alpha::Dropdown`](https://primer.style/view-components/components/alpha/dropdown) | [Upgrade to Primer::Alpha::Dropdown](https://primer.style/view-components/guides/primer_dropdown_menu_component) |
| [`Primer::LocalTime`](https://primer.style/view-components/components/localtime) | [`Primer::Beta::RelativeTime`](https://primer.style/view-components/components/beta/relativetime) | [Upgrade to Primer::Beta::RelativeTime](https://primer.style/view-components/guides/primer_local_time) |
| [`Primer::TimeAgoComponent`](https://primer.style/view-components/components/timeago) | [`Primer::Beta::RelativeTime`](https://primer.style/view-components/components/beta/relativetime) | [Upgrade to Primer::Beta::RelativeTime](https://primer.style/view-components/guides/primer_time_ago) |
diff --git a/docs/contributors/deprecations.md b/docs/contributors/deprecations.md
index 10f6f0d94a..05192a733e 100644
--- a/docs/contributors/deprecations.md
+++ b/docs/contributors/deprecations.md
@@ -31,8 +31,8 @@ options.
```yml
- component: [string]
- autocorrect: [boolean]
- replacement: [string]
+ autocorrect: [boolean]
+ replacement: [string]
guide: [string]
```
@@ -97,7 +97,7 @@ configurations for more information.
4. A non-autocorrectable deprecation, without a replacement component, and with a guide to alternatives
```yml
- - component: "Primer::DropdownMenuComponent"
+ - component: "Primer::DeprecatedComponent"
autocorrect: false
guide: "https://example.com/dropdown_menu_alternatives"
```
diff --git a/docs/src/@primer/gatsby-theme-doctocat/nav.yml b/docs/src/@primer/gatsby-theme-doctocat/nav.yml
index 531dee4d60..71600d896e 100644
--- a/docs/src/@primer/gatsby-theme-doctocat/nav.yml
+++ b/docs/src/@primer/gatsby-theme-doctocat/nav.yml
@@ -123,8 +123,6 @@
url: "/components/box"
- title: ButtonComponent
url: "/components/button"
- - title: DropdownMenuComponent
- url: "/components/dropdownmenu"
- title: IconButton
url: "/components/iconbutton"
- title: LocalTime
diff --git a/lib/primer/deprecations.yml b/lib/primer/deprecations.yml
index 52260b0879..27618287cd 100644
--- a/lib/primer/deprecations.yml
+++ b/lib/primer/deprecations.yml
@@ -22,11 +22,6 @@ deprecations:
replacement: "Primer::Beta::Button"
guide: "https://primer.style/view-components/guides/primer_button_component"
- - component: "Primer::DropdownMenuComponent"
- autocorrect: false
- replacement: "Primer::Beta::Dropdown"
- guide: "https://primer.style/view-components/guides/primer_dropdown_menu_component"
-
- component: "Primer::Dropdown"
autocorrect: true
replacement: "Primer::Alpha::Dropdown"
diff --git a/lib/tasks/docs.rake b/lib/tasks/docs.rake
index cc08f56a82..7cc305b872 100644
--- a/lib/tasks/docs.rake
+++ b/lib/tasks/docs.rake
@@ -60,7 +60,6 @@ namespace :docs do
Primer::Beta::Details,
Primer::Alpha::Dialog,
Primer::Alpha::Dropdown,
- Primer::DropdownMenuComponent,
Primer::Beta::Flash,
Primer::Beta::Heading,
Primer::Alpha::HiddenTextExpander,
diff --git a/static/audited_at.json b/static/audited_at.json
index 1ecb92b654..1724482e0b 100644
--- a/static/audited_at.json
+++ b/static/audited_at.json
@@ -79,7 +79,6 @@
"Primer::Dropdown": "",
"Primer::Dropdown::Menu": "",
"Primer::Dropdown::Menu::Item": "",
- "Primer::DropdownMenuComponent": "",
"Primer::HellipButton": "",
"Primer::IconButton": "",
"Primer::LabelComponent": "",
diff --git a/static/constants.json b/static/constants.json
index 06880edc79..260524d9e4 100644
--- a/static/constants.json
+++ b/static/constants.json
@@ -1041,22 +1041,6 @@
},
"Primer::Dropdown::Menu::Item": {
},
- "Primer::DropdownMenuComponent": {
- "DIRECTION_DEFAULT": "se",
- "DIRECTION_OPTIONS": [
- "se",
- "sw",
- "w",
- "e",
- "ne",
- "s"
- ],
- "SCHEME_DEFAULT": "default",
- "SCHEME_MAPPINGS": {
- "default": "",
- "dark": "dropdown-menu-dark"
- }
- },
"Primer::HellipButton": {
},
"Primer::IconButton": {
diff --git a/static/statuses.json b/static/statuses.json
index 594e41d10f..34898e208a 100644
--- a/static/statuses.json
+++ b/static/statuses.json
@@ -79,7 +79,6 @@
"Primer::Dropdown": "deprecated",
"Primer::Dropdown::Menu": "deprecated",
"Primer::Dropdown::Menu::Item": "deprecated",
- "Primer::DropdownMenuComponent": "deprecated",
"Primer::HellipButton": "deprecated",
"Primer::IconButton": "deprecated",
"Primer::LabelComponent": "deprecated",
diff --git a/test/components/component_test.rb b/test/components/component_test.rb
index 6503660b9f..22b7129d8f 100644
--- a/test/components/component_test.rb
+++ b/test/components/component_test.rb
@@ -77,7 +77,6 @@ class PrimerComponentTest < Minitest::Test
end
end],
[Primer::Alpha::Dropdown::Menu, {}],
- [Primer::DropdownMenuComponent, {}],
[Primer::Beta::Flash, {}],
[Primer::Beta::Heading, { tag: :h1 }],
[Primer::Alpha::HiddenTextExpander, { "aria-label": "No action" }],
diff --git a/test/components/dropdown_menu_component_test.rb b/test/components/dropdown_menu_component_test.rb
deleted file mode 100644
index 78828bd441..0000000000
--- a/test/components/dropdown_menu_component_test.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-require "components/test_helper"
-
-class PrimerDropdownMenuComponentTest < Minitest::Test
- include Primer::ComponentTestHelpers
-
- def test_dropdown_component_renders_dark_scheme
- render_inline(Primer::DropdownMenuComponent.new(scheme: :dark)) { "Body" }
-
- assert_selector("details-menu.dropdown-menu.dropdown-menu-dark")
- end
-
- def test_dropdown_direction_renders
- render_inline(Primer::DropdownMenuComponent.new(direction: :w)) { "Body" }
-
- assert_selector("details-menu.dropdown-menu.dropdown-menu-w")
- end
-
- def test_falls_back_to_defaults_when_invalid_options_are_passed
- without_fetch_or_fallback_raises do
- render_inline(Primer::DropdownMenuComponent.new(direction: :circle, scheme: :orange)) { "Body" }
- end
-
- assert_selector("details-menu.dropdown-menu")
- end
-
- def test_dropdown_header_renders
- render_inline(Primer::DropdownMenuComponent.new(header: "Header")) { "Body" }
-
- assert_selector(".dropdown-header")
- end
-
- def test_status
- assert_component_state(Primer::DropdownMenuComponent, :deprecated)
- end
-end