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

Update Button docs #382

Merged
merged 12 commits into from
Nov 8, 2017
Merged

Conversation

JasonEtco
Copy link
Contributor

This is a followup PR from #381 where we discussed adjusting the btn-link class for use with .btn, since that'd be a common use case (even if it isn't how btn-link is intended to be used, to keep it consistent with other button styles it should be supported).

This PR adds the relevant reset styles to btn-link and adds a story for Storybook 🎉

One concern though: to keep the story consistent with the other buttons', I'd have to replicate the same reset styles on all the different pseudo-classes and .STATE (ex: .hover) classes as well. I have no problem doing that, but wanted to see what y'all thought, since this would mean adding a few more nested styles to the btn-link class. If we could put a note somewhere that says "Don't use this with .btn!" that could work too.

Thanks 💖

/cc @primer/ds-core

Closes #381

@broccolini
Copy link
Member

One concern though: to keep the story consistent with the other buttons', I'd have to replicate the same reset styles on all the different pseudo-classes and .STATE (ex: .hover) classes as well. I have no problem doing that, but wanted to see what y'all thought, since this would mean adding a few more nested styles to the btn-link class. If we could put a note somewhere that says "Don't use this with .btn!" that could work too.

Good point. I'm inclined to leave the style changes and just clarify .btn-link is used on it's own for now. For this pr though let's just stick with adding btn-link to the stories and to the documentation. If you have time to add this to the readme that would be rad. I think putting it after btn-block makes most sense.

Some additional updates to the readme that would be good, if you have time, are:

  • Add {:toc} after the first paragraph which automatically adds a table of contents in our style guide
  • Remove the example at the top that lists all the buttons together, we did that when testing color updates, and now that we have Storybook to let us see them all together we don't need that.
  • Improve the heading text to be a bit more inline with our other docs, so Primer button, Outline button, Buttons with counts.
  • Change all the headings in the docs section to ## for h2, they should not be h4

We're hoping to wrap up and merge this changes in for Monday, when we'll be reviewing and testing all the v10 changes. If you don't have time to work on this no worries at all, I'll add the example to the readme docs.

@broccolini broccolini self-requested a review November 3, 2017 17:42
@JasonEtco
Copy link
Contributor Author

For this pr though let's just stick with adding btn-link to the stories and to the documentation

Sounds good 👍

Some additional updates to the readme

Happy to make those changes! Incoming soon 💪

@JasonEtco
Copy link
Contributor Author

@broccolini this should be good to re-review/merge! I'm back in Slack (multi-channel, can't join design-systems) so feel free to ping me there too if you need anything on this.

Copy link
Member

@broccolini broccolini left a comment

Choose a reason for hiding this comment

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

Just one change and then this will be good to go :) Doc changes look great, and thanks for adding the storybook story!

@@ -42,41 +42,9 @@ status: Stable

Buttons are used for **actions**, like in forms, while textual hyperlinks are used for **destinations**, or moving from one page to another.

#### Buttons
{:toc}
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@@ -59,3 +59,8 @@ storiesOf('Button', module)
<button className='btn btn-purple disabled'>disabled</button>
</div>
))
.add('btn-link', () => (
Copy link
Member

Choose a reason for hiding this comment

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

😎

@@ -181,12 +181,14 @@
display: inline-block;
padding: 0;
font-size: inherit;
font-weight: $font-weight-normal;
Copy link
Member

Choose a reason for hiding this comment

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

We should take these two style changes out since for now we're leaving btn-link to work as it is, at least for the time being 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought you might say that! I'll revert that commit then 🙌

@JasonEtco JasonEtco changed the title Reset btn styles for btn-link (#381) Update Button docs Nov 8, 2017
@broccolini broccolini changed the base branch from dev to release-10.0.0 November 8, 2017 16:36
Copy link
Member

@broccolini broccolini left a comment

Choose a reason for hiding this comment

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

Thank you @JasonEtco 💖 - going to merge this into v10 so we can wrap up the rest of the fixes :)

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.

5 participants