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(modal): rename reactRoot to srHide and add to ts file #1098

Merged
merged 3 commits into from
Dec 19, 2018

Conversation

jschuler
Copy link
Collaborator

No description provided.

dlabaj
dlabaj previously approved these changes Dec 19, 2018
Copy link
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.

Will About Modal have the same issues?

dgutride
dgutride previously approved these changes Dec 19, 2018
/** React application root element */
reactRoot: PropTypes.instanceOf(safeHTMLElement).isRequired
/** The parent element container to hide from screen-reader applications when the modal is open */
srHide: PropTypes.instanceOf(safeHTMLElement).isRequired
Copy link
Member

Choose a reason for hiding this comment

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

Can we please remove the isRequired?

@@ -14,7 +14,7 @@ class SimpleModal extends React.Component {

render() {
const { isModalOpen } = this.state;
const reactRoot = typeof document !== 'undefined' ? document.querySelector('#___gatsby') : '';
const srHide = typeof document !== 'undefined' ? document.querySelector('#___gatsby') : '';
Copy link
Member

Choose a reason for hiding this comment

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

As an app developer, it's not clear what I should use in place of the '#___gatsby' selector. It would be helpful to add a comment in this example describing what I should use instead.

@@ -9,6 +9,7 @@ export interface ModalProps extends HTMLProps<HTMLDivElement> {
isOpen?: boolean;
onClose?: Function;
title: string;
srHide: Element;
Copy link
Member

@dlabrecq dlabrecq Dec 19, 2018

Choose a reason for hiding this comment

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

Can we please make srHide optional?

Not sure why this worked during my test if it's not optional? That is, I didn't provide an srHide property.

@patternfly-build
Copy link
Contributor

PatternFly-React preview: https://1098-pr-patternfly-react-patternfly.surge.sh

@coveralls
Copy link

coveralls commented Dec 19, 2018

Pull Request Test Coverage Report for Build 3679

  • 1 of 7 (14.29%) changed or added relevant lines in 1 file are covered.
  • 35 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.8%) to 81.391%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/patternfly-4/react-core/src/components/Modal/Modal.js 1 7 14.29%
Files with Coverage Reduction New Missed Lines %
packages/patternfly-4/react-core/src/components/Popover/PopoverBody.js 1 66.67%
packages/patternfly-4/react-core/src/components/Popover/PopoverContent.js 1 75.0%
packages/patternfly-4/react-core/src/components/Popover/PopoverHeader.js 1 66.67%
packages/patternfly-4/react-core/src/components/Popover/PopoverCloseButton.js 1 66.67%
packages/patternfly-4/react-core/src/components/Popover/Popover.js 31 27.91%
Totals Coverage Status
Change from base Build 3673: -0.8%
Covered Lines: 4319
Relevant Lines: 5007

💛 - Coveralls

@jschuler
Copy link
Collaborator Author

@tlabaj from what i can see About Modal does not apply aria-hidden (yet)

tlabaj
tlabaj previously approved these changes Dec 19, 2018
@tlabaj tlabaj added the PF4 label Dec 19, 2018
@jschuler jschuler dismissed stale reviews from tlabaj, dgutride, and dlabaj via de8593a December 19, 2018 16:44
@tlabaj tlabaj merged commit 1d0a941 into patternfly:master Dec 19, 2018
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.

7 participants