Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primer::ButtonComponent to Primer::Beta::Button Migration Guide #1663

Merged
merged 17 commits into from
Dec 5, 2022

Conversation

mxriverlynn
Copy link
Contributor

@mxriverlynn mxriverlynn commented Dec 2, 2022

Description

this PR updates the migrations page on the primer.style site, to include migration guides that show a developer how to move away from a deprecated component. The first guide is moving from Primer::ButtonComponent to Primer::Beta::Button. the deprecation configuration for Primer::ButtonComponent is also updated to include the new guide url, and mark the component as not being auto-correctable

There was also a duplicate of the Deprecated Components linter, between rubocop and erblint. this PR corrects that by disabling this linter within erblint. see the section on "Updating default erblint", below

Screenshots

New Migrations page:
image

ButtonComponent to Beta::Button migration page:
image

Updating Default ERBLint

The default ERBLint configuration runs the Deprecated Components linter twice: once as rubocop and once as erblint. this PR also updates the erblint config to not duplicate that linter.

Duplicated linter message:
image

Corrected linter message:
image

Code annotation w/ deprecation messages:
image

Integration

Does this change require any updates to code in production?

no

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews

@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2022

🦋 Changeset detected

Latest commit: e4acc06

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

@github-actions github-actions bot added the ruby Pull requests that update Ruby code label Dec 2, 2022
@mxriverlynn mxriverlynn temporarily deployed to review-pr-1663 December 2, 2022 17:53 Inactive
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 2, 2022 17:57 Inactive
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great! There's a few things we might want to add:

  • scheme :outline was removed, and we recommend using :invisible
  • I think maybe the trailing_visual returned a counter component, but now you can pass in an icon or a counter. Do we need to document how to use the new slots, or maybe just link to Lookbook?
  • For the dropdown param, we would recommend people use this markup/slot https://primer.style/view-components/lookbook/inspect/primer/beta/button/trailing_action so maybe again, we can just link to Lookbook examples 🤔

@github-actions github-actions bot removed the ruby Pull requests that update Ruby code label Dec 2, 2022
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 2, 2022 19:33 Inactive
@mxriverlynn mxriverlynn force-pushed the mxriverlynn/button-migration-guide branch from 4a41ed3 to e340809 Compare December 2, 2022 19:37
@mxriverlynn mxriverlynn temporarily deployed to review-pr-1663 December 2, 2022 19:37 Inactive
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 2, 2022 19:41 Inactive
Copy link
Contributor

@camertron camertron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you 🎉

docs/content/guides/primer_button_component.md Outdated Show resolved Hide resolved
@github-actions github-actions bot added the ruby Pull requests that update Ruby code label Dec 2, 2022
@mxriverlynn mxriverlynn temporarily deployed to review-pr-1663 December 2, 2022 21:13 Inactive
@primer primer deleted a comment from github-actions bot Dec 2, 2022
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 2, 2022 21:18 Inactive
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

@@ -39,6 +39,6 @@ linters:
AllCops:
DisabledByDefault: true
Primer/DeprecatedComponents:
Enabled: true
Enabled: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious about this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already run in rubocop, so it's just duplicated here and didn't seem necessary. the PR description shows the duplicate output when this was running vs non-duplicate output after i disabled it

@mxriverlynn mxriverlynn merged commit 1539214 into main Dec 5, 2022
@mxriverlynn mxriverlynn deleted the mxriverlynn/button-migration-guide branch December 5, 2022 15:25
@primer-css primer-css mentioned this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants