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

Automattic Components: Add select dropdown to package #79255

Merged
merged 6 commits into from
Aug 21, 2023

Conversation

jeyip
Copy link
Contributor

@jeyip jeyip commented Jul 11, 2023

Proposed Changes

I understand that these seem like a large volume of changes, but we're simply cloning the existing client/components/ select dropdown component into @automattic/components as we did in #79257 and #79256

The entirety of the migration is a 4 step process that creates easily digestible ( and revertible ) PRs to work with. See https://github.com/Automattic/martech/issues/2028. Unfortunately, this process also eliminates the git history from migrated files unless the 4 steps are condensed into a single one. I don't have a great answer to this, but the tradeoff, to me, is worth the added safety of more understandable, compact, iterative pull requests.

GIFs

2023-08-12 20 49 14

Testing Instructions

  • Make sure all tests pass. yarn run test-packages packages/components/src/select-dropdown/test if you'd like to run it locally, but the CI process should catch anything.
  • At the root of the Calypso directory, run yarn storybook:start
  • Ensure that the select-dropdown component renders properly

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

@jeyip jeyip self-assigned this Jul 11, 2023
@github-actions
Copy link

github-actions bot commented Jul 11, 2023

@jeyip jeyip force-pushed the add/select-dropdown-to-automattic-components branch from 9ff9602 to 9d05080 Compare August 13, 2023 03:07
@jeyip jeyip marked this pull request as ready for review August 13, 2023 03:07
@jeyip jeyip requested review from a team and southp August 13, 2023 03:10
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 13, 2023
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@jeyip jeyip force-pushed the add/select-dropdown-to-automattic-components branch 2 times, most recently from 0eafb8f to d0e6432 Compare August 13, 2023 04:03
@jeyip jeyip force-pushed the add/select-dropdown-to-automattic-components branch from 8f99aba to 5ef0c35 Compare August 15, 2023 00:39
Copy link
Contributor

@ddc22 ddc22 left a comment

Choose a reason for hiding this comment

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

Had a minor concern but I don't think there is an easy way to resolve it other than doing everything in one go.

Works well, LGTM 🚢

@@ -0,0 +1,236 @@
# Select Dropdown
Copy link
Contributor

Choose a reason for hiding this comment

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

The only contention I have with this issue is that we loose the blame history of the file once we delete that.

Copy link
Contributor Author

@jeyip jeyip Aug 21, 2023

Choose a reason for hiding this comment

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

Ah this is a super interesting point that I also don't have a great answer to. For me, being able to break down the migration into easily digestible PRs is worth the trade off, especially for such a wide reaching component.

At the very least though, I'll go back and make a note in the pull request descriptions for this PR, #79256, and #79257. That way, if anyone else follows this same process, they'll be aware of the tradeoffs from the get-go. If you think of any other suggestions, feel free to let me know and we can try and implement them 👍

@jeyip jeyip merged commit b923029 into trunk Aug 21, 2023
@jeyip jeyip deleted the add/select-dropdown-to-automattic-components branch August 21, 2023 18:16
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants