Skip to content

Adds content to button react examples#7607

Merged
tlabaj merged 10 commits intopatternfly:mainfrom
edonehoo:docs-iss2990
Aug 22, 2022
Merged

Adds content to button react examples#7607
tlabaj merged 10 commits intopatternfly:mainfrom
edonehoo:docs-iss2990

Conversation

@edonehoo
Copy link
Copy Markdown
Contributor

@edonehoo edonehoo commented Jun 23, 2022

Makes progress on patternfly/patternfly-org#2990

Additional issues:

@patternfly-build
Copy link
Copy Markdown
Collaborator

patternfly-build commented Jun 23, 2022

@edonehoo
Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Member

@mcarrano mcarrano left a comment

Choose a reason for hiding this comment

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

@edonehoo in general I think this looks great and is consistent with what I was expecting. I just made a few suggestions for rewording a few of the example descriptions.

@mmenestr it would also be good for you to review this. It may be that some of the information here becomes redundant with the design guidelines, and it's possible it makes more sense to live inline with the examples. Interested in your thoughts bout that.

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Copy link
Copy Markdown
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Awesome job on this! Really digging the additional info provided for these examples 🔥 Had some comments below, let me know what you think! 🙂

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md
@mcarrano
Copy link
Copy Markdown
Member

To go off of this comment, Matt, do you think it'd be worth including how the buttons can be disabled, e.g. "Disabled styling can be applied to any button variant with the isDisabled prop"? This would also apply to other button examples i.e. "aria disabled", "call to action" etc.

Yes, I think this sort of thing can be very helpful and was kind of what I hoped this documentation would be. It may be hard for @edonehoo to come up with all that nuance, but it would be helpful for you or another developer to point out the things that a developer should know as they look at these examples.

Again this would be a follow up issue, but @mcarrano has there been any discussion regarding examples showcasing functionality not relevant to the actual example name/description? This one for example is about "links as buttons", but includes a button that has isDisabled which may or may not be relevant. We have several components with examples that do this, so was curious if it was something we'd want to avoid doing/make a separate example for or if it isn't really a huge deal.

I also see this process as one of making out examples more relevant and meaningful as between the live examples and the documentation, it should tell a story of what this component is and how to use it

@edonehoo
Copy link
Copy Markdown
Contributor Author

To go off of this comment, Matt, do you think it'd be worth including how the buttons can be disabled, e.g. "Disabled styling can be applied to any button variant with the isDisabled prop"? This would also apply to other button examples i.e. "aria disabled", "call to action" etc.

Yes, I think this sort of thing can be very helpful and was kind of what I hoped this documentation would be. It may be hard for @edonehoo to come up with all that nuance, but it would be helpful for you or another developer to point out the things that a developer should know as they look at these examples.

Appreciate all the feedback so far. A lot of everyone's insight related directly to the questions I was planning to bring up in Thursday's check-in, so this has been helpful! Working on integrating all of this into an update.

@mcarrano I agree that many of @thatblindgeye technical add-ons make a lot of sense to include. It does lead me to wonder about the most efficient way that I can draft these edits without making it too tedious for engineers to have to come in and add nuance or functionality that I'm not aware of. For example, I tried to understand the aria stuff on my own and ended up being a little off. & then when it comes to the control variant (which oops I didn't notice on PF), tooltip support, etc. -- there are things I struggle to find context on entirely. I definitely don't mind taking a swing and missing, but I'm trying to be cognizant of assuming too much. Ultimately I'm just hoping it's not too troublesome to review!

@mmenestr
Copy link
Copy Markdown
Collaborator

@edonehoo this looks great so far, thanks for tackling this ! I don't think you need to be an expert with the technical stuff, just having someone sit down and take the time to add this text is really helpful and gets the ball rolling, so don't worry about the review work too much - the devs are here to suggest technical feedback haha!

@mcarrano I honestly wouldn't worry too much about repetition with the design guidelines, especially because I think a lot of people might only look at one or the other (?) I don't think this is worth re-doing the whole structure of our design guidelines over, personally!

@thatblindgeye
Copy link
Copy Markdown
Contributor

Yes, I think this sort of thing can be very helpful and was kind of what I hoped this documentation would be. It may be hard for @edonehoo to come up with all that nuance, but it would be helpful for you or another developer to point out the things that a developer should know as they look at these examples.

Perfect, sounds good! Wanted to be sure whether that sort of info would be worth including the description first, but will definitely keep that in mind when reviewing future example work as well.

It does lead me to wonder about the most efficient way that I can draft these edits without making it too tedious for engineers to have to come in and add nuance or functionality that I'm not aware of. For example, I tried to understand the aria stuff on my own and ended up being a little off. & then when it comes to the control variant (which oops I didn't notice on PF), tooltip support, etc. -- there are things I struggle to find context on entirely. I definitely don't mind taking a swing and missing, but I'm trying to be cognizant of assuming too much. Ultimately I'm just hoping it's not too troublesome to review!

@edonehoo totally agree with Margot, the work you've done already has been great to get things rolling! I also agree in not worrying too much about the technical stuff, but it's also awesome you've tried looking into some of the more technical stuff on your own. If there's ever anything in particular you aren't too sure about you could either mention it in the initial PR comment or you can reach out to Katie or myself (or another dev!), otherwise it's definitely not tedious to review and add comments for that sort of stuff from the dev perspective 🙂

@edonehoo
Copy link
Copy Markdown
Contributor Author

@mcarrano @evwilkin @thatblindgeye @kmcfaul @mmenestr + etc - I incorporated previous feedback in my latest commit and also took some liberties following today's discussion (rearranged things and messed with headings). Happy to roll back those bigger changes if they're an issue or don't work how I intend, but I think they help visualize what I had in mind. Made content changes too so please lmk if there are typos/misinformation/etc!

Copy link
Copy Markdown
Member

@mcarrano mcarrano left a comment

Choose a reason for hiding this comment

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

@edonehoo This is looking great. I really like the way you reorganized this. I just had a couple of minor comments. Also, there seems to be a stray heading labeled "Untitled example" at the head of the file when I preview it. But I can't see where that comes from in the source file.

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Copy link
Copy Markdown
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Looks good with things reordered! Had some comments/suggestions below for a few examples, but awesome job with the latest update!

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
@edonehoo
Copy link
Copy Markdown
Contributor Author

edonehoo commented Jul 6, 2022

RE: "Also, there seems to be a stray heading labeled "Untitled example" at the head of the file when I preview it. But I can't see where that comes from in the source file." -- so I removed the existing Examples header because it seemed redundant, but maybe it's something that is required to be at the top of the file? Does anyone know if that's the case? If so, I can just add it back (I don't see the stray header, but I may be overlooking it)!

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/demos/Button.md Outdated
Copy link
Copy Markdown
Contributor

@kmcfaul kmcfaul left a comment

Choose a reason for hiding this comment

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

Overall looking great so far!

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Accessible Rich Internet Applications (ARIA) is a set of roles and attributes specified by the [World Wide Web Consortium](https://www.w3.org/WAI/standards-guidelines/aria/). ARIA defines ways to make web content and web applications more accessible to people with disabilities.

### Call to action
### Aria disabled buttons
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It feels redundant to have all three examples state Aria disabled button..., but I'm not sure if titling the subsection Aria disabled button would make it clear enough to adjust the repeated example title text. Maybe Using aria disabled for the section title? Anyone have thoughts about these names?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's a fair point I think, and is worth aligning on now since there are other components that have/may have examples laid out like this. I feel like if the section was renamed to "Aria-disabled button", the examples could be renamed to something along the lines of "Basic aria-disabled", "With tooltip", and if we still wanted the example, "Link as button with tooltip". The heading levels plus the way the table of contents is laid out should provide the context that these three examples are for "aria disabled buttons".

The only issue with that might be if there were a "basic with tooltip" and "aria-disabled with tooltip" example on a component since we couldn't have two named "with tooltip", but then I think just naming them both as "[type] with tooltip" would work

@edonehoo edonehoo changed the title Adds content to button react examples. Adds content to button react examples Jul 20, 2022
Copy link
Copy Markdown
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Hmm... this is what I'm seeing. Should there be more content on this page?

Screen Shot 2022-07-26 at 8 03 56 PM

@nicolethoen
Copy link
Copy Markdown
Contributor

@edonehoo
It seems that the website is only configured to handle heading levels up to h3 - so titles with only 3 ### before them.
I think that's why it isn't rendering correctly.

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
@edonehoo edonehoo self-assigned this Jul 27, 2022
Copy link
Copy Markdown
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Overall this content is looking great right now!

It looks like for now we may need to just revert to having each example use a level 3 heading, as the lack of that for each example is what is causing the preview build to not render properly. If there's follow-up to update this behavior so that we can utilize level 4 headings I think updating the headings can be revisited.

An alternative would be (either for now or as new convention) to have the main example sections as level 2 headings, then each example within that section as level 3. I just threw this together locally but essentially something like this:

Button example headings

Copy link
Copy Markdown
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

Looks like all the titles and examples are rendering!!

We can dig deeper into expanding the number of heading levels we allow in examples. But it looks like all the content is on the page at this point.

Copy link
Copy Markdown
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

🎉

Copy link
Copy Markdown
Member

@mcarrano mcarrano left a comment

Choose a reason for hiding this comment

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

This looks great @edonehoo . Thanks for all your work on it.

Copy link
Copy Markdown
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

This is super helpful!!! 🤩

Left a few comments for review, none of which are blocking.

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
[Accessible Rich Internet Applications (ARIA)](https://www.w3.org/WAI/standards-guidelines/aria/) is a set of roles and attributes specified by the [World Wide Web Consortium]. ARIA defines ways to make web content and web applications more accessible to people with disabilities.

### Call to action
Buttons that are aria-disabled are similar to normal disabled buttons, except they can receive focus. Every button variant can be aria disabled using the `isAriaDisabled` property.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm probably wrong but should these have the same hyphenation (either with or without)? Seems like if they "are" or "can be" a thing, it's the same thing, and it's "aria-disabled" everywhere else*.

Suggested change
Buttons that are aria-disabled are similar to normal disabled buttons, except they can receive focus. Every button variant can be aria disabled using the `isAriaDisabled` property.
Buttons that are aria-disabled are similar to normal disabled buttons, except they can receive focus. Every button variant can be aria-disabled using the `isAriaDisabled` property.

* except for the aria-disabled button examples - most say "aria disabled", though some just say "disabled" (even though they're aria-disabled). That may be beyond the scope of this PR tho.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For now, I opted to just match everything as aria-disabled in my latest push (at least within the aria section), but that can be changed if it makes sense to do something different!

Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
Comment thread packages/react-core/src/components/Button/examples/Button.md Outdated
@edonehoo
Copy link
Copy Markdown
Contributor Author

edonehoo commented Aug 2, 2022

@mcoker these were all good catches, thank you!

@mcoker mcoker self-requested a review August 2, 2022 18:48
Copy link
Copy Markdown
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

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

Looks good. Great work! We can take this in if it looks good to @wolfeallison.

@tlabaj tlabaj self-requested a review August 18, 2022 20:43
@mcarrano mcarrano requested a review from wolfeallison August 18, 2022 21:11
Copy link
Copy Markdown
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

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

LGTM. Great work!

@tlabaj tlabaj merged commit a3de841 into patternfly:main Aug 22, 2022
@edonehoo edonehoo deleted the docs-iss2990 branch September 8, 2022 16:09
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.

10 participants