Skip to content

Commit

Permalink
Mark Flash as deprecated (#2640)
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 authored Feb 26, 2024
1 parent 5619810 commit 56b2413
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-poems-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": minor
---

Mark `Flash` as deprecated
4 changes: 3 additions & 1 deletion app/components/primer/beta/flash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

module Primer
module Beta
# This component has been deprecated. Use [Banner](<%= link_to_component(Primer::Alpha::Banner) %>) instead.
#
# Use `Flash` to inform users of successful or pending actions.
class Flash < Primer::Component
status :beta
status :deprecated

# Optional action content showed on the right side of the component.
#
Expand Down
5 changes: 5 additions & 0 deletions lib/primer/deprecations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ deprecations:
autocorrect: true
replacement: "Primer::Beta::AutoComplete::Item"

- component: "Primer::Beta::Flash"
autocorrect: false
replacement: "Primer::Alpha::Banner"
guide: "https://primer.style/components/banner/rails/alpha"

- component: "Primer::BlankslateComponent"
autocorrect: true
replacement: "Primer::Beta::Blankslate"
Expand Down
2 changes: 1 addition & 1 deletion test/components/beta/flash_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ def test_bottom_margin_can_be_overridden
end

def test_status
assert_component_state(Primer::Beta::Flash, :beta)
assert_component_state(Primer::Beta::Flash, :deprecated)
end
end

0 comments on commit 56b2413

Please sign in to comment.