Skip to content

Commit

Permalink
Merge pull request #708 from RedHatInsights/master
Browse files Browse the repository at this point in the history
Udpate master-stable to newest master
  • Loading branch information
karelhala authored Mar 25, 2020
2 parents 8979e09 + f5f07cf commit 4595ea3
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 39 deletions.
28 changes: 18 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@
"@patternfly/react-core": "^3.134.2",
"@patternfly/react-icons": "^3.14.19",
"@redhat-cloud-services/entitlements-client": "^1.0.18",
"@redhat-cloud-services/frontend-components": "1.0.5",
"@redhat-cloud-services/frontend-components-inventory": "1.0.4",
"@redhat-cloud-services/frontend-components": "1.0.10",
"@redhat-cloud-services/frontend-components-inventory": "1.0.12",
"@redhat-cloud-services/frontend-components-notifications": "^1.0.2",
"@redhat-cloud-services/frontend-components-remediations": "1.0.0",
"@redhat-cloud-services/frontend-components-utilities": "1.0.0",
"@redhat-cloud-services/keycloak-js": "0.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ exports[`Copyright should render 1`] = `
<p
className="copyright pf-m-spacer-xl-on-lg"
>
Copyright © 2019 Red Hat, Inc.
Copyright © 2020 Red Hat, Inc.
</p>
<nav>
<ul
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

exports[`ToolbarToggle should render correctly 1`] = `
<Dropdown
aria-label="Settings"
dropdownItems={
Array [
<DropdownItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports[`Tools should render correctly 1`] = `
isDisabled={true}
/>
<ToolbarToggle
className="ins-c-toolbar__menu-help"
dropdownItems={
Array [
Object {
Expand All @@ -34,7 +35,9 @@ exports[`Tools should render correctly 1`] = `
]
}
icon={[Function]}
id="HelpMenu"
key="0"
widget-type="HelpMenu"
/>
</ToolbarGroup>
<ToolbarGroup>
Expand Down
75 changes: 57 additions & 18 deletions src/js/App/Header/HeaderTests/__snapshots__/UserToggle.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
position="right"
toggle={
<DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someFirstName someLastName
</DropdownToggle>
Expand Down Expand Up @@ -125,7 +128,10 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
position="right"
toggle={
<DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someFirstName someLastName
</DropdownToggle>
Expand Down Expand Up @@ -177,7 +183,10 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
"isPlain": true,
"position": "right",
"toggle": <DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someFirstName someLastName
</DropdownToggle>,
Expand Down Expand Up @@ -243,7 +252,10 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
position="right"
toggle={
<DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someFirstName someLastName
</DropdownToggle>
Expand All @@ -257,7 +269,8 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
>
<DropdownToggle
ariaHasPopup={true}
id="pf-toggle-id-0"
className="ins-c-toolbar__menu-user"
id="UserMenu"
isOpen={false}
isPlain={true}
key=".0"
Expand All @@ -273,9 +286,10 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
<button
aria-expanded="false"
aria-haspopup="true"
class="pf-c-dropdown__toggle pf-m-plain"
id="pf-toggle-id-0"
class="pf-c-dropdown__toggle pf-m-plain ins-c-toolbar__menu-user"
id="UserMenu"
type="button"
widget-type="UserMenu"
>
<span
class="pf-c-dropdown__toggle-text"
Expand All @@ -301,11 +315,12 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
</div>,
}
}
widget-type="UserMenu"
>
<Toggle
ariaHasPopup={true}
className=""
id="pf-toggle-id-0"
className="ins-c-toolbar__menu-user"
id="UserMenu"
isActive={false}
isDisabled={false}
isFocused={false}
Expand All @@ -326,9 +341,10 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
<button
aria-expanded="false"
aria-haspopup="true"
class="pf-c-dropdown__toggle pf-m-plain"
id="pf-toggle-id-0"
class="pf-c-dropdown__toggle pf-m-plain ins-c-toolbar__menu-user"
id="UserMenu"
type="button"
widget-type="UserMenu"
>
<span
class="pf-c-dropdown__toggle-text"
Expand All @@ -354,16 +370,18 @@ exports[`ConnectedUserToggle -- not org admin should render correctly 1`] = `
</div>,
}
}
widget-type="UserMenu"
>
<button
aria-expanded={false}
aria-haspopup={true}
className="pf-c-dropdown__toggle pf-m-plain"
className="pf-c-dropdown__toggle pf-m-plain ins-c-toolbar__menu-user"
disabled={false}
id="pf-toggle-id-0"
id="UserMenu"
onClick={[Function]}
onKeyDown={[Function]}
type="button"
widget-type="UserMenu"
>
<span
className="pf-c-dropdown__toggle-text"
Expand Down Expand Up @@ -491,7 +509,10 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
position="right"
toggle={
<DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someFirstName someLastName
</DropdownToggle>
Expand Down Expand Up @@ -550,7 +571,10 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
position="right"
toggle={
<DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someFirstName someLastName
</DropdownToggle>
Expand Down Expand Up @@ -609,7 +633,10 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
"isPlain": true,
"position": "right",
"toggle": <DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someFirstName someLastName
</DropdownToggle>,
Expand Down Expand Up @@ -682,7 +709,10 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
position="right"
toggle={
<DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someFirstName someLastName
</DropdownToggle>
Expand All @@ -696,7 +726,8 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
>
<DropdownToggle
ariaHasPopup={true}
id="pf-toggle-id-1"
className="ins-c-toolbar__menu-user"
id="UserMenu"
isOpen={false}
isPlain={true}
key=".0"
Expand All @@ -712,9 +743,10 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
<button
aria-expanded="false"
aria-haspopup="true"
class="pf-c-dropdown__toggle pf-m-plain"
id="pf-toggle-id-1"
class="pf-c-dropdown__toggle pf-m-plain ins-c-toolbar__menu-user"
id="UserMenu"
type="button"
widget-type="UserMenu"
>
<span
class="pf-c-dropdown__toggle-text"
Expand All @@ -740,11 +772,12 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
</div>,
}
}
widget-type="UserMenu"
>
<Toggle
ariaHasPopup={true}
className=""
id="pf-toggle-id-1"
className="ins-c-toolbar__menu-user"
id="UserMenu"
isActive={false}
isDisabled={false}
isFocused={false}
Expand All @@ -765,9 +798,10 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
<button
aria-expanded="false"
aria-haspopup="true"
class="pf-c-dropdown__toggle pf-m-plain"
id="pf-toggle-id-1"
class="pf-c-dropdown__toggle pf-m-plain ins-c-toolbar__menu-user"
id="UserMenu"
type="button"
widget-type="UserMenu"
>
<span
class="pf-c-dropdown__toggle-text"
Expand All @@ -793,16 +827,18 @@ exports[`ConnectedUserToggle -- org admin should render correctly 1`] = `
</div>,
}
}
widget-type="UserMenu"
>
<button
aria-expanded={false}
aria-haspopup={true}
className="pf-c-dropdown__toggle pf-m-plain"
className="pf-c-dropdown__toggle pf-m-plain ins-c-toolbar__menu-user"
disabled={false}
id="pf-toggle-id-1"
id="UserMenu"
onClick={[Function]}
onKeyDown={[Function]}
type="button"
widget-type="UserMenu"
>
<span
className="pf-c-dropdown__toggle-text"
Expand Down Expand Up @@ -895,7 +931,10 @@ exports[`UserToggle should render correctly with isSmall false 1`] = `
position="right"
toggle={
<DropdownToggle
className="ins-c-toolbar__menu-user"
id="UserMenu"
onToggle={[Function]}
widget-type="UserMenu"
>
someName
</DropdownToggle>
Expand Down
5 changes: 3 additions & 2 deletions src/js/App/Header/InsightsAbout.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as Sentry from '@sentry/browser';
export const Copyright = () => (
<div className='ins-c-footer__traditional-nav pf-l-flex pf-m-column
pf-m-row-on-lg pf-m-flex-1-on-lg ins-c-page__about--modal-footer'>
<p className='copyright pf-m-spacer-xl-on-lg'>Copyright © 2019 Red Hat, Inc.</p>
<p className='copyright pf-m-spacer-xl-on-lg'>Copyright © 2020 Red Hat, Inc.</p>
<nav>
<ul className='pf-l-flex pf-m-column pf-m-row-on-md'>
<li>
Expand Down Expand Up @@ -76,7 +76,8 @@ export class InsightsAbout extends Component {
{ name: 'System Comparison', path: 'apps/drift/app.info.json', version: 'N/A' },
{ name: 'Migration Analytics', path: 'apps/migration-analytics/app.info.json', version: 'N/A' },
{ name: 'Automation Hub', path: 'apps/automation-hub/app.info.json', version: 'N/A' },
{ name: 'Automation Analytics', path: 'apps/automation-analytics/app.info.json', version: 'N/A' }
{ name: 'Automation Analytics', path: 'apps/automation-analytics/app.info.json', version: 'N/A' },
{ name: 'Custom Policies', path: 'apps/custom-policies/app.info.json', version: 'N/A' }
] },
showCopyAlert: false,
showCopyAlertError: false,
Expand Down
8 changes: 6 additions & 2 deletions src/js/App/Header/ToolbarToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,17 @@ class ToolbarToggle extends Component {
</DropdownItem>
);

const toggle = <DropdownToggle iconComponent={null} onToggle={this.onToggle}>
const toggle = <DropdownToggle
widget-type={this.props.widgetType}
className={this.props.className}
id={this.props.id}
iconComponent={null}
onToggle={this.onToggle}>
<this.props.icon />
</DropdownToggle>;

return (
<Dropdown
aria-label='Settings'
position={DropdownPosition.right}
toggle={toggle}
isOpen={this.state.isOpen}
Expand Down
Loading

0 comments on commit 4595ea3

Please sign in to comment.