Skip to content

Commit

Permalink
Merge branch 'main' into move-box-component
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan authored Aug 5, 2022
2 parents 70abd20 + 7dfef05 commit 735fccb
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 30 deletions.
5 changes: 0 additions & 5 deletions .changeset/brave-planets-reply.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/four-adults-guess.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nice-ears-give.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rare-coins-move.md

This file was deleted.

14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# CHANGELOG

## 0.0.87

### Patch Changes

- [#1274](https://github.com/primer/view_components/pull/1274) [`c153f734`](https://github.com/primer/view_components/commit/c153f734a891fc3bc7dfc3bed34630ff38ab39d7) Thanks [@jonrohan](https://github.com/jonrohan)! - Fixing whitespace in rendered LinkComponent

* [#1273](https://github.com/primer/view_components/pull/1273) [`f38517ac`](https://github.com/primer/view_components/commit/f38517acf1aed43b27f2c6b94634d70b124883e6) Thanks [@camertron](https://github.com/camertron)! - Revert removal of BlankslateComponent

- [#1270](https://github.com/primer/view_components/pull/1270) [`44919308`](https://github.com/primer/view_components/commit/4491930812d16a9bcb5d8f05b4d94e49e469afa5) Thanks [@camertron](https://github.com/camertron)! - Use a custom form builder; introduce primer_form_for

* [#1269](https://github.com/primer/view_components/pull/1269) [`9ae9615f`](https://github.com/primer/view_components/commit/9ae9615f31acf43875feb89661cac6311527f9fd) Thanks [@mxriverlynn](https://github.com/mxriverlynn)! - updating component migrator script with improvements in component reference updates, deprecations, etc.

- [#1276](https://github.com/primer/view_components/pull/1276) [`759ea56f`](https://github.com/primer/view_components/commit/759ea56f00cbe3e536f4e558a9fb9a3e1b89bf7b) Thanks [@mxriverlynn](https://github.com/mxriverlynn)! - correcting the updates to nav.yml in the component status migrator

## 0.0.86

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
primer_view_components (0.0.86)
primer_view_components (0.0.87)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
octicons (>= 17.0.0)
Expand Down
19 changes: 13 additions & 6 deletions component_status_migrator.thor
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ class ComponentStatusMigrator < Thor::Group
end

def rename_nav_entry
gsub_file("docs/src/@primer/gatsby-theme-doctocat/nav.yml", "class #{name}", name_without_suffix)
nav_file = "docs/src/@primer/gatsby-theme-doctocat/nav.yml"
gsub_file(nav_file, "title: #{name}", "title: #{name_without_suffix}")
gsub_file(nav_file, "url: \"/components/#{name_without_suffix.downcase}\"", "url: \"/components/#{status_url}#{name_without_suffix.downcase}\"")
end

def update_all_references
Expand Down Expand Up @@ -219,14 +221,19 @@ class ComponentStatusMigrator < Thor::Group
@status ||= options[:status].downcase
end

def status_url
@status_url ||= "#{status}/" unless stable?
end

def name_without_suffix
name.gsub("Component", "")
@name_without_suffix ||= name.gsub("Component", "")
end

def short_name
name_with_status = name.gsub(/Primer::|Component/, "")

m = name_with_status.match(/(?<status>Beta|Alpha|Deprecated)?(?<_colons>::)?(?<name>.*)/)
m[:name].gsub("::", "").downcase
@short_name ||= begin
name_with_status = name.gsub(/Primer::|Component/, "")
m = name_with_status.match(/(?<status>Beta|Alpha|Deprecated)?(?<_colons>::)?(?<name>.*)/)
m[:name].gsub("::", "").downcase
end
end
end
2 changes: 1 addition & 1 deletion demo/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GIT
PATH
remote: ..
specs:
primer_view_components (0.0.86)
primer_view_components (0.0.87)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
octicons (>= 17.0.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/primer/view_components/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module ViewComponents
module VERSION
MAJOR = 0
MINOR = 0
PATCH = 86
PATCH = 87

STRING = [MAJOR, MINOR, PATCH].join(".")
end
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@primer/view-components",
"version": "0.0.86",
"version": "0.0.87",
"description": "ViewComponents for the Primer Design System",
"main": "app/assets/javascripts/primer_view_components.js",
"module": "app/components/primer/primer.js",
Expand Down

0 comments on commit 735fccb

Please sign in to comment.