Visitar URL original
Merge primer/rails_forms into primer/view_components by camertron · Pull Request #1238 · primer/view_components · GitHub
Skip to content

Merge primer/rails_forms into primer/view_components - #1238

Merged
camertron merged 23 commits into
mainfrom
merge_prf
Aug 1, 2022
Merged

camertron merged 23 commits into
mainfrom
merge_prf

Conversation

@camertron

@camertron camertron commented Jul 28, 2022 •

Copy link
Copy Markdown
Collaborator

Purpose

Last quarter we made the conscious decision to home all the forms framework stuff in its own repo called https://github.com/primer/rails_forms with the acknowledgement that doing so enabled us to move faster in the short-term but that the code should ultimately live in primer/view_components. We also decided it made sense to rename primer/view_components to primer/rails, since the repo would no longer only contain components, but also forms-related code.

As you know, we decided to halt work on the forms framework this quarter, but would like to make good on our promise to unite the two repositories to enable other use-cases (eg. autocomplete). I've written up an issue delineating what I believe to be the concrete steps we need to take to achieve those goals: https://github.com/github/primer/issues/1143 (staff-only).

This PR is the result of tackling the first and second items on the list. We won't be attempting the other items on the list until later in the quarter.

Changes

In addition to copy/pasting all the files from PRF into PVC, making sure the tests run as expected, and exposing the documentation for TextField, I made several other facilitating changes:

  1. Dropped support for Ruby 2.6 and Rails 5.2. It is fairly common practice in the Ruby world to support the last three minor versions, and the consensus on the team was that these older versions weren't important to keep around. We now support Ruby 2.7, 3.0, and 3.1, and Rails 6.1, 7.0, and main.
  2. Added a number of tests missing from the original primer/rails_forms code (thanks for catching those, Simplecov).
  3. Augmented the Lookbook's bin/dev script to accept a --debug option (ala dotcom) that starts all the non-web processes in the background and then runs the Rails server in the foreground. Doing so means debugging tools like binding.irb and binding.pry work as expected.
  4. Upgraded form inputs to handle CSS classes with Primer::Classify the same way PVC components do. This means arguments like my: 4, etc can be passed to inputs.
  5. Added documentation for the new TextField component, including examples.

@changeset-bot

changeset-bot Bot commented Jul 28, 2022 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bef9721

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

@jonrohan
jonrohan temporarily deployed to github-pages July 28, 2022 23:04 Inactive
@primer-css
primer-css temporarily deployed to github-pages July 28, 2022 23:33 Inactive
@camertron
camertron temporarily deployed to github-pages July 29, 2022 04:26 Inactive
@camertron
camertron temporarily deployed to github-pages July 29, 2022 18:18 Inactive
@primer-css
primer-css temporarily deployed to github-pages July 29, 2022 22:01 Inactive
@camertron
camertron temporarily deployed to github-pages July 29, 2022 22:42 Inactive
@camertron
camertron temporarily deployed to github-pages July 29, 2022 22:54 Inactive
@camertron
camertron temporarily deployed to github-pages July 29, 2022 23:14 Inactive
@camertron
camertron temporarily deployed to github-pages July 29, 2022 23:21 Inactive
@camertron
camertron temporarily deployed to github-pages July 30, 2022 05:07 Inactive
@camertron
camertron temporarily deployed to github-pages July 30, 2022 05:18 Inactive
@camertron
camertron marked this pull request as ready for review July 30, 2022 05:25
@camertron
camertron requested review from a team and hectahertz July 30, 2022 05:25
@camertron
camertron temporarily deployed to github-pages August 1, 2022 21:27 Inactive

@jonrohan jonrohan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks great to me

@primer-css
primer-css temporarily deployed to github-pages August 1, 2022 22:29 Inactive
@camertron
camertron merged commit 204a8e4 into main Aug 1, 2022
@camertron
camertron deleted the merge_prf branch August 1, 2022 22:42
@primer-css primer-css mentioned this pull request Aug 1, 2022

This branch was previously deployed

1 inactive deployment
github-pages — bef97210 Deployed Aug 1, 2022 by primer-css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants