Skip to content

Commit

Permalink
Removing the deprecated Primer::TimeAgoComponent (#1792)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan authored Feb 2, 2023
1 parent 0282faf commit 730b0a8
Show file tree
Hide file tree
Showing 17 changed files with 6 additions and 202 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-kangaroos-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Removing the deprecated Primer::TimeAgoComponent
File renamed without changes.
2 changes: 1 addition & 1 deletion app/components/primer/primer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import './alpha/tool_tip'
import './alpha/x_banner'
import './beta/auto_complete/auto_complete'
import './beta/clipboard_copy'
import './beta/relative_time'
import './alpha/tab_container'
import './time_ago_component'
import '../../../lib/primer/forms/primer_multi_input'
import '../../../lib/primer/forms/primer_text_field'
import '../../../lib/primer/forms/toggle_switch_input'
51 changes: 0 additions & 51 deletions app/components/primer/time_ago_component.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/lib/primer/view_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class ViewHelperNotFound < StandardError; end
HELPERS = {
octicon: "Primer::Beta::Octicon",
heading: "Primer::Beta::Heading",
time_ago: "Primer::TimeAgoComponent",
image: "Primer::Alpha::Image"
}.freeze

Expand Down
2 changes: 0 additions & 2 deletions docs/src/@primer/gatsby-theme-doctocat/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@
url: "/components/button"
- title: IconButton
url: "/components/iconbutton"
- title: TimeAgo
url: "/components/timeago"
- title: Tooltip
url: "/components/tooltip"
- title: Architecture decisions
Expand Down
5 changes: 0 additions & 5 deletions lib/primer/deprecations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ deprecations:
autocorrect: true
replacement: "Primer::Beta::IconButton"

- component: "Primer::TimeAgoComponent"
autocorrect: false
replacement: "Primer::Beta::RelativeTime"
guide: "https://primer.style/view-components/guides/primer_time_ago"

- component: "Primer::Tooltip"
autocorrect: true
replacement: "Primer::Alpha::Tooltip"
1 change: 0 additions & 1 deletion lib/primer/yard/component_manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class ComponentManifest
Primer::Beta::Subhead => {},
Primer::Alpha::TabContainer => { js: true },
Primer::Beta::Text => {},
Primer::TimeAgoComponent => { js: true },
Primer::Beta::TimelineItem => {},
Primer::Tooltip => {},
Primer::Truncate => {},
Expand Down
27 changes: 0 additions & 27 deletions previews/primer/time_ago_component_preview.rb

This file was deleted.

26 changes: 0 additions & 26 deletions static/arguments.json
Original file line number Diff line number Diff line change
Expand Up @@ -2381,32 +2381,6 @@
}
]
},
{
"component": "TimeAgo",
"status": "deprecated",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/time_ago_component.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/time_ago/default/",
"parameters": [
{
"name": "time",
"type": "Time",
"default": "N/A",
"description": "The time to be formatted"
},
{
"name": "micro",
"type": "Boolean",
"default": "`false`",
"description": "If true then the text will be formatted in \"micro\" mode, using as few characters as possible"
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "Tooltip",
"status": "deprecated",
Expand Down
1 change: 0 additions & 1 deletion static/audited_at.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"Primer::IconButton": "",
"Primer::LayoutComponent": "",
"Primer::Navigation::TabComponent": "",
"Primer::TimeAgoComponent": "",
"Primer::Tooltip": "",
"Primer::Truncate": ""
}
2 changes: 0 additions & 2 deletions static/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,6 @@
],
"DEFAULT_ARIA_CURRENT_FOR_ANCHOR": "page"
},
"Primer::TimeAgoComponent": {
},
"Primer::Tooltip": {
"ALIGN_DEFAULT": "default",
"ALIGN_MAPPING": {
Expand Down
1 change: 0 additions & 1 deletion static/statuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"Primer::IconButton": "deprecated",
"Primer::LayoutComponent": "alpha",
"Primer::Navigation::TabComponent": "alpha",
"Primer::TimeAgoComponent": "deprecated",
"Primer::Tooltip": "deprecated",
"Primer::Truncate": "beta"
}
1 change: 0 additions & 1 deletion test/components/component_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ class PrimerComponentTest < Minitest::Test
[Primer::Beta::Text, {}],
[Primer::Truncate, {}],
[Primer::Beta::Truncate, {}, proc { |component| component.with_item { "Foo" } }],
[Primer::TimeAgoComponent, { time: Time.zone.now }],
[Primer::Beta::TimelineItem, {}, proc { |component| component.with_body { "Foo" } }],
[Primer::Tooltip, { label: "More" }],
[Primer::Alpha::UnderlineNav, { label: "aria label" }, proc { |component| component.with_tab(selected: true) { "Foo" } }],
Expand Down
60 changes: 0 additions & 60 deletions test/components/time_ago_component_test.rb

This file was deleted.

6 changes: 0 additions & 6 deletions test/lib/primer/view_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ def test_renders_heading_using_shorthand
assert_selector("h2", text: "My Heading")
end

def test_renders_time_ago_using_shorthand
primer_time_ago(time: Time.at(1_615_490_863).utc)

assert_selector("relative-time", text: "Mar 11, 2021")
end

def test_renders_octicon_using_shorthand
primer_octicon icon: :star

Expand Down
17 changes: 0 additions & 17 deletions test/system/time_ago_component_test.rb

This file was deleted.

0 comments on commit 730b0a8

Please sign in to comment.