view_components
view_components copied to clipboard
move Primer::ButtonComponent to Primer::Beta::Button
split from #676
this PR migrates the Primer::ButtonComponent to Primer::Beta::Button, updates all references, and creates a properly deprecated Primer::ButtonComponent in place of the original
files to note
this PR is huge because most components reference button for examples and sometimes for direct use. there are also several extra test files and a couple of linters for buttons, specifically.
these are the files you should pay most attention to when reviewing
- app/components/primer/beta/button.rb
- app/components/primer/button_component.rb
- lib/primer/view_components/linters/argument_mappers/button.rb
- lib/primer/view_components/linters/button_component_migration_counter.rb
- lib/primer/view_components/linters/helpers/deprecated_components_helpers.rb
- lib/rubocop/cop/primer/component_name_migration.rb
- lib/rubocop/cop/primer/deprecated_button_arguments.rb
- static/statuses.json
- stories/primer/button_component_stories.rb → stories/primer/beta/button_stories.rb
- test/components/button_component_test.rb → test/components/beta/button_test.rb
- test/components/component_test.rb
- test/lib/yard/docs_helper_test.rb
- test/linters/button_component_migration_counter_test.rb
- test/rubocop/deprecated_button_arguments_test.rb
screenshots
storybook:

docs site:

🦋 Changeset detected
Latest commit: 38f8a3c6d4e98d482d8c4753c8e12005ded3cc83
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @primer/view-components | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
I'm going to hold on this one until we can get a single release, with only this change, ButtonComponent is currently our most used with OcticonComponent closely behind. Because of the linter I don't have to change all these instances in a single pr, but I do need to update erblint disable comments in all files using this components.
👋🏻 I'm closing this in favor of https://github.com/primer/view_components/pull/1325
The reason is, we want to use the Beta namespace for the Button update and instead deprecate the old component