Skip to content

Commit

Permalink
Removing the deprecated Primer::LocalTime component (#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan committed Jan 31, 2023
1 parent a1a709d commit b68cf7f
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 277 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-wombats-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Removing the deprecated Primer::LocalTime component
63 changes: 0 additions & 63 deletions app/components/primer/local_time.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/components/primer/local_time.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/components/primer/primer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import './alpha/tool_tip'
import './alpha/x_banner'
import './beta/auto_complete/auto_complete'
import './beta/clipboard_copy'
import './local_time'
import './alpha/tab_container'
import './time_ago_component'
import '../../../lib/primer/forms/primer_multi_input'
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 @@ -125,8 +125,6 @@
url: "/components/button"
- title: IconButton
url: "/components/iconbutton"
- title: LocalTime
url: "/components/localtime"
- title: TimeAgo
url: "/components/timeago"
- title: Tooltip
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::LocalTime"
autocorrect: false
replacement: "Primer::Beta::RelativeTime"
guide: "https://primer.style/view-components/guides/primer_local_time"

- component: "Primer::TimeAgoComponent"
autocorrect: false
replacement: "Primer::Beta::RelativeTime"
Expand Down
1 change: 0 additions & 1 deletion lib/primer/yard/component_manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class ComponentManifest
Primer::Alpha::Layout => {},
Primer::Alpha::HellipButton => {},
Primer::Alpha::Image => {},
Primer::LocalTime => { js: true },
Primer::Alpha::OcticonSymbols => {},
Primer::Alpha::ImageCrop => { js: true },
Primer::IconButton => { js: true },
Expand Down
57 changes: 0 additions & 57 deletions previews/primer/local_time_component_preview.rb

This file was deleted.

74 changes: 0 additions & 74 deletions static/arguments.json
Original file line number Diff line number Diff line change
Expand Up @@ -2325,80 +2325,6 @@
}
]
},
{
"component": "LocalTime",
"status": "deprecated",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/local_time.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/local_time/default/",
"parameters": [
{
"name": "datetime",
"type": "DateTime",
"default": "N/A",
"description": "The date to parse"
},
{
"name": "initial_text",
"type": "String",
"default": "`nil`",
"description": "Text to render before component is initialized"
},
{
"name": "weekday",
"type": "Symbol",
"default": "`:short`",
"description": "One of `:long` or `:short`."
},
{
"name": "year",
"type": "Symbol",
"default": "`:numeric`",
"description": "One of `:2-digit` or `:numeric`."
},
{
"name": "month",
"type": "Symbol",
"default": "`:short`",
"description": "One of `:long` or `:short`."
},
{
"name": "day",
"type": "Symbol",
"default": "`:numeric`",
"description": "One of `:2-digit` or `:numeric`."
},
{
"name": "hour",
"type": "Symbol",
"default": "`:numeric`",
"description": "One of `:2-digit` or `:numeric`."
},
{
"name": "minute",
"type": "Symbol",
"default": "`:numeric`",
"description": "One of `:2-digit` or `:numeric`."
},
{
"name": "second",
"type": "Symbol",
"default": "`:numeric`",
"description": "One of `:2-digit` or `:numeric`."
},
{
"name": "time_zone_name",
"type": "Symbol",
"default": "`:short`",
"description": "One of `:long` or `:short`."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "Navigation::Tab",
"status": "alpha",
Expand Down
1 change: 0 additions & 1 deletion static/audited_at.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"Primer::Content": "",
"Primer::IconButton": "",
"Primer::LayoutComponent": "",
"Primer::LocalTime": "",
"Primer::Navigation::TabComponent": "",
"Primer::TimeAgoComponent": "",
"Primer::Tooltip": "",
Expand Down
12 changes: 0 additions & 12 deletions static/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -1066,18 +1066,6 @@
"DEFAULT_SIDEBAR_COL": 3,
"MAX_COL": 12
},
"Primer::LocalTime": {
"DEFAULT_DIGIT_TYPE": "numeric",
"DEFAULT_TEXT_TYPE": "short",
"DIGIT_TYPE_OPTIONS": [
"numeric",
"2-digit"
],
"TEXT_TYPE_OPTIONS": [
"short",
"long"
]
},
"Primer::Navigation::TabComponent": {
"ARIA_CURRENT_OPTIONS_FOR_ANCHOR": [
true,
Expand Down
1 change: 0 additions & 1 deletion static/statuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"Primer::Content": "stable",
"Primer::IconButton": "deprecated",
"Primer::LayoutComponent": "alpha",
"Primer::LocalTime": "deprecated",
"Primer::Navigation::TabComponent": "alpha",
"Primer::TimeAgoComponent": "deprecated",
"Primer::Tooltip": "deprecated",
Expand Down
1 change: 0 additions & 1 deletion test/components/component_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class PrimerComponentTest < Minitest::Test
[Primer::Alpha::TabNav, { label: "label" }],
[Primer::Alpha::UnderlinePanels, { label: "Panel label" }],
[Primer::Alpha::Image, { src: "https://github.com/github.png", alt: "alt" }],
[Primer::LocalTime, { datetime: DateTime.parse("2014-06-01T13:05:07Z") }],
[Primer::Alpha::ImageCrop, { src: "Foo" }],
[Primer::IconButton, { icon: :star, "aria-label": "Label" }],
[Primer::Alpha::ActionList, { aria: { label: "Action List" } }, lambda do |component|
Expand Down
35 changes: 0 additions & 35 deletions test/components/local_time_test.rb

This file was deleted.

23 changes: 0 additions & 23 deletions test/system/local_time_component_test.rb

This file was deleted.

0 comments on commit b68cf7f

Please sign in to comment.