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

chore(buttons): update guidelines content #4484

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

andrew-ronaldson
Copy link
Contributor

Closes #4274

@patternfly-build
Copy link
Contributor

patternfly-build commented Mar 6, 2025

Copy link
Collaborator

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

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

a few things ✍️

Also fwiw, I've been swapping to using svgs instead of pngs, because it allegeldy helps with file size and retains resolution well. Your images look fine here, though, but just wanted to mention!

<img src="./img/link-left.png" alt="Example of link button with icon on the left" width="143"/>

<img src="./img/link-right.png" alt="Example of link button with icon on the right" width="143"/>
<img src="./img/external_links.png" alt="Example of link button with icon on the left and the right" width="218"/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<img src="./img/external_links.png" alt="Example of link button with icon on the left and the right" width="218"/>
<div class="ws-docs-content-img">
<img src="./img/external_links.png" alt="Example of link button with icon on the left and the right" width="218"/>
</div>

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you add this import line at the top of the file:

import '../components.css';

You should be able to use this class for all images, which centers them / controls max width! I would assume that you can keep the width you're manually setting on these individual/smaller images still?

Copy link
Collaborator

@edonehoo edonehoo Mar 7, 2025

Choose a reason for hiding this comment

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

Sorry in advance that this would require a handful of updates (maybe ctrl f is handy) -- I couldn't leave GH suggestions on all of them!

@@ -187,27 +185,19 @@ Exceptions to the standard spacing guidelines are as follows:

#### Wizards ####

In wizards, the **Cancel** button is spaced 48px away from the primary and secondary **Next** and **Back** buttons, and 24px away if stacked.
In wizards, the **Cancel** button is spaced `--pf-t--global--spacer--2xl` (48px) away from the primary and secondary **Next** and **Back** buttons, and `--pf-t--global--spacer--md` (24px) away if stacked.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
In wizards, the **Cancel** button is spaced `--pf-t--global--spacer--2xl` (48px) away from the primary and secondary **Next** and **Back** buttons, and `--pf-t--global--spacer--md` (24px) away if stacked.
In wizards, the **Cancel** button is spaced `--pf-t--global--spacer--2xl` (48px) away from the primary and secondary **Next** and **Back** buttons, and `--pf-t--global--spacer--md` (16px) away if stacked.

unless 24 px is right here, in which case that's the lg spacer I think

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the 2nd "secondary" button label is meant to be tertiary?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we now recommend the danger icon instead of the warning icon for delete modals? Only asking because we detail specific guidance about this in the actions pattern, so I would just open a follow up if we need to update that doc!

Copy link
Collaborator

Choose a reason for hiding this comment

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

could you either add an annotation tag to the tertiary button or change the label from edit to "Tertiary"? Just to help find it quicker

Copy link
Collaborator

@edonehoo edonehoo 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 missed image for the div class, otherwise no complaints 👍


#### Toolbars ####

Button spacing in toolbars depends on the button type. Normal 16px spacing applies between primary and secondary buttons. However, there should only be 8px between icon buttons.
Button spacing in toolbars depends on the button type and how they are grouped. For example, groups of primary and secondary buttons use `--pf-t--global--spacer--sm` (8px) spacing between buttons and `--pf-t--global--spacer--md` (16px) between groups. Icon buttons inside a grouping use `--pf-t--global--spacer--xs` (4px) spacing and `--pf-t--global--spacer--md` (16px) between groups.

_Toolbar spacing_

Copy link
Collaborator

@edonehoo edonehoo Mar 11, 2025

Choose a reason for hiding this comment

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

this image (https://patternfly-org-pr-4484-site.surge.sh/components/button/design-guidelines#toolbars) is missing the div, all the others look great!

Copy link
Collaborator

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

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

👩‍⚖️ approved! ty

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.

Guideline updates: Buttons
3 participants