Skip to content

Conversation

@fhlavac
Copy link
Contributor

@fhlavac fhlavac commented Jan 31, 2024

  • fixed NotAuthorized default primary actions variant to primary
  • cleaned the CloseButton props
  • Updated docs to contain reference to the parent components props

Copy link
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.

couple questions about the style overrides in the CloseButton. They could be turned into follow up issues if need be.

import { createUseStyles } from 'react-jss';
import clsx from 'clsx';

const useStyles = createUseStyles({
Copy link
Contributor

Choose a reason for hiding this comment

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

@jessiehuff does removing the padding on this component keep the click area large enough to meet a11y standards?

And I think that in general, to keep these components compatible with right-to-left languages, we might want to avoid using float:right. I think there is a float:end or something like that we should be using. I'm also curious though if there's a PF modifier we could use rather than this custom styling. @mcoker WDYT?

Copy link

Choose a reason for hiding this comment

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

@nicolethoen good call on the RTL support. There are logical values for float - "inline-end" (used instead of "right" - what you'd use here) and "inline-start" (used instead of "left").

I'm also curious though if there's a PF modifier we could use rather than this custom styling

We don't have a global modifier for this. We do have float utility classes though, and that utility stylesheet is lightweight (https://unpkg.com/browse/@patternfly/patternfly@latest/utilities/Float/float.css) if that's an option, though it's worth noting that our utility classes are not using logical values when they probably should. I opened an issue for that here patternfly/patternfly#6273.

Copy link
Contributor

@jessiehuff jessiehuff Feb 2, 2024

Choose a reason for hiding this comment

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

Based on WCAG guidelines, the clickable area should be 44 x 44 pixels. It looks like removing the padding makes it 48 x 36 so we should probably at least increase the height to 44 pixels.

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 we are going to need a designer to step in at some point to commit a review once or twice a months of new components. with the changes in v6 I can see this giving us headaches. Fortunately we are small enough right now w can fix stuff.

@edonehoo
Copy link
Collaborator

edonehoo commented Jan 31, 2024

A couple of additional phrasing changes (I've already made the changes in the text below):

in errorstate.md

Custom footer

To override the default action button, specify your own using customFooter.

in warningmodal.md (I can't preview the interactive example, so I may be wrong about the functionality - lmk if so or if I could better expand)

Warning modal with a danger button

You can apply danger styling to a warning modal's confirmation button, so that a user is aware that an action is risky.

Warning modal with a checkbox

To confirm that a user wishes to initiate a selected action, you can add a checkbox to a warning modal.

fhlavac and others added 5 commits February 1, 2024 16:09
@fhlavac
Copy link
Contributor Author

fhlavac commented Feb 1, 2024

@nicolethoen @edonehoo thank you, the comments should be addressed. I've also changed type of the confirmButtonVariant property for the CloseButton to accept ButtonVariant instead of boolean - I've somehow missed that when reviewing that component before

@fhlavac
Copy link
Contributor Author

fhlavac commented Feb 1, 2024

@edonehoo updated, thank you 🙂

@fhlavac fhlavac requested a review from edonehoo February 1, 2024 21:25
@jessiehuff jessiehuff merged commit 914ff68 into patternfly:main Feb 5, 2024
@github-actions
Copy link

github-actions bot commented Feb 5, 2024

🎉 This PR is included in version 5.1.0-prerelease.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

6 participants