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

fix(Collapse): stop collapse icon from wrapping under button text #194

Closed
wants to merge 1 commit into from

Conversation

speed-rmn
Copy link
Contributor

@speed-rmn speed-rmn commented Mar 11, 2020

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

Because the floated button icon came after the button text, if the icon needed to wrap, it would wrap under the text. The solution is either to move the floated icon to be the first child of the button or to go with a flex-based approach. Making the parent button a flexbox allows the icon to come second, which is more intuitive, and the default align-items: stretch rule means that all of the vertical space beneath the icon will be reserved, so button text will never wrap under the icon. Additional tweaks were made to appearance and background-color, because in browsers other than Chrome a default "buttonFace" color (grey) was still showing through on this control.

Some docs were also updated for clarity or formatting purposes.

An issue with isOpen was identified in CollapseGroup with a TODO.

Copy link
Contributor

@brandonlilly brandonlilly left a comment

Choose a reason for hiding this comment

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

Nice 👍

@speed-rmn speed-rmn closed this Mar 11, 2020
@speed-rmn
Copy link
Contributor Author

Can't push new commits or force push squashed commits. Created #195 to fix linting issue.

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