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

feat(Button): add spacing props and remove sibling margin #202

Merged
merged 2 commits into from
Apr 15, 2020

Conversation

brandonlilly
Copy link
Contributor

Before submitting a pull request, please make sure the following is done:

I have done all of the following:

  • Added a top level class to all my components '.anchor-[COMPONENT NAME]'.
  • Used conventional commits for all work.
  • Tested my solution on Mobile & Tablet.
  • Wrote unit tests for states and all behavior (npm test) and passed coverage thresholds.
  • Updated snapshots for all permutations (npm test -- -u).
  • Accounted for hover, focus, blur, visited, & error states because they are not edge cases.
  • Created TODOs for known edge cases.
  • Documented all of my changes (inline & doc site).
  • Made sure that all accessibility errors are resolved.
  • Added stories with knobs for all possible configurations.
  • De-linted and ran prettier (npm run pretty) on my code.
  • Added name to OWNERS file for all new components
  • If adding a new component, add its export to the rollup config
  • package.json version is bumped (if necessary)

Outline your feature or bug-fix below

Adds spacing props to buttons and removes automatic sibling margins

${({ block, margin }: StyledButtonProps) =>
!margin &&
css`
& + .anchor-button {
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 was designed to automatically space buttons that are side by side. In practice I think it caused more surprise/frustration than it solved, and with space props added we can handle these cases easily/explicitly.

@@ -1,6 +1,6 @@
{
"name": "@retailmenot/anchor",
"version": "1.5.8",
"version": "1.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Checking NPM, we actually only have released 1.5.7 so I think leaving it at 1.5.8 is probably fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I bumped up to 1.6.0 because I consider it a "breaking" change. (i.e. Your buttons won't space properly if you were relying on that style)

Copy link
Contributor

@zero0Halo zero0Halo left a comment

Choose a reason for hiding this comment

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

GTG

@brandonlilly brandonlilly merged commit e648b9b into master Apr 15, 2020
@brandonlilly brandonlilly deleted the feat/button-spacing branch April 15, 2020 20:28
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.

None yet

2 participants