Skip to content

Commit

Permalink
Merge branch 'master' into content-block-headlines-css-grid
Browse files Browse the repository at this point in the history
  • Loading branch information
asudoh authored Feb 4, 2021
2 parents d20b16a + b35605c commit f8e8300
Show file tree
Hide file tree
Showing 15 changed files with 121 additions and 218 deletions.
101 changes: 99 additions & 2 deletions packages/react/src/__tests__/__snapshots__/storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38449,6 +38449,7 @@ exports[`Storyshots Components|Dotcom Shell Default (footer language only) 1`] =
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -45382,6 +45383,7 @@ exports[`Storyshots Components|Dotcom Shell Default 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -51123,6 +51125,48 @@ exports[`Storyshots Components|Dotcom Shell Search open 1`] = `
Skip to main content
</a>
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className="bx--masthead__header--search-active"
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
>
<button
aria-label="Open menu"
className="bx--masthead__header--search-active bx--header__action bx--header__menu-trigger bx--header__menu-toggle bx--header__menu-toggle__hidden"
data-autoid="dds--masthead-default-sidenav__l0-menu"
onClick={[Function]}
title="Open menu"
type="button"
>
<ForwardRef(Menu20)>
<Icon
fill="currentColor"
height={20}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 20 20"
width={20}
xmlns="http://www.w3.org/2000/svg"
>
<svg
aria-hidden={true}
fill="currentColor"
focusable="false"
height={20}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 20 20"
width={20}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2 14.8H18V16H2zM2 11.2H18V12.399999999999999H2zM2 7.6H18V8.799999999999999H2zM2 4H18V5.2H2z"
/>
</svg>
</Icon>
</ForwardRef(Menu20)>
</button>
</HeaderMenuButton>
<IbmLogo
autoid="dds--masthead-default__l0-logo"
isSearchActive={true}
Expand Down Expand Up @@ -59226,6 +59270,7 @@ exports[`Storyshots Components|Dotcom Shell With L1 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-alt-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -68517,6 +68562,7 @@ exports[`Storyshots Components|Dotcom Shell With micro footer (language only) 1`
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -74455,6 +74501,7 @@ exports[`Storyshots Components|Dotcom Shell With micro footer 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -80101,13 +80148,14 @@ exports[`Storyshots Components|Dotcom Shell With platform 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className="bx--masthead__platform"
data-autoid="dds--masthead-eco-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
>
<button
aria-label="Open menu"
className="bx--header__action bx--header__menu-trigger bx--header__menu-toggle bx--header__menu-toggle__hidden"
className="bx--masthead__platform bx--header__action bx--header__menu-trigger bx--header__menu-toggle bx--header__menu-toggle__hidden"
data-autoid="dds--masthead-eco-sidenav__l0-menu"
onClick={[Function]}
title="Open menu"
Expand Down Expand Up @@ -86309,6 +86357,7 @@ exports[`Storyshots Components|Dotcom Shell With short footer (language only) 1`
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -93308,6 +93357,7 @@ exports[`Storyshots Components|Dotcom Shell With short footer 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -115925,6 +115975,7 @@ exports[`Storyshots Components|Masthead Default 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -116480,6 +116531,48 @@ exports[`Storyshots Components|Masthead Search open by default 1`] = `
Skip to main content
</a>
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className="bx--masthead__header--search-active"
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
>
<button
aria-label="Open menu"
className="bx--masthead__header--search-active bx--header__action bx--header__menu-trigger bx--header__menu-toggle bx--header__menu-toggle__hidden"
data-autoid="dds--masthead-default-sidenav__l0-menu"
onClick={[Function]}
title="Open menu"
type="button"
>
<ForwardRef(Menu20)>
<Icon
fill="currentColor"
height={20}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 20 20"
width={20}
xmlns="http://www.w3.org/2000/svg"
>
<svg
aria-hidden={true}
fill="currentColor"
focusable="false"
height={20}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 20 20"
width={20}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2 14.8H18V16H2zM2 11.2H18V12.399999999999999H2zM2 7.6H18V8.799999999999999H2zM2 4H18V5.2H2z"
/>
</svg>
</Icon>
</ForwardRef(Menu20)>
</button>
</HeaderMenuButton>
<IbmLogo
autoid="dds--masthead-default__l0-logo"
isSearchActive={true}
Expand Down Expand Up @@ -118914,6 +119007,7 @@ exports[`Storyshots Components|Masthead With Custom Navigation 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -124358,6 +124452,7 @@ exports[`Storyshots Components|Masthead With L 1 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-alt-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down Expand Up @@ -128096,13 +128191,14 @@ exports[`Storyshots Components|Masthead With Platform 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className="bx--masthead__platform"
data-autoid="dds--masthead-eco-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
>
<button
aria-label="Open menu"
className="bx--header__action bx--header__menu-trigger bx--header__menu-toggle bx--header__menu-toggle__hidden"
className="bx--masthead__platform bx--header__action bx--header__menu-trigger bx--header__menu-toggle bx--header__menu-toggle__hidden"
data-autoid="dds--masthead-eco-sidenav__l0-menu"
onClick={[Function]}
title="Open menu"
Expand Down Expand Up @@ -128688,6 +128784,7 @@ exports[`Storyshots Components|Masthead With logo data 1`] = `
</SkipToContent>
<HeaderMenuButton
aria-label="Open menu"
className=""
data-autoid="dds--masthead-default-sidenav__l0-menu"
isActive={false}
onClick={[Function]}
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/components/Masthead/Masthead.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,13 @@ const Masthead = ({
data-autoid={`${stablePrefix}--masthead`}>
<SkipToContent />

{(mastheadL1Data || navigation) && !isSearchActive && (
{(mastheadL1Data || navigation) && (
<HeaderMenuButton
aria-label={isSideNavExpanded ? 'Close menu' : 'Open menu'}
data-autoid={`${stablePrefix}--masthead-${navType}-sidenav__l0-menu`}
onClick={onClickSideNavExpand}
isActive={isSideNavExpanded}
className={headerSearchClasses}
/>
)}

Expand Down
6 changes: 5 additions & 1 deletion packages/services/src/services/Profile/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ class ProfileAPI {
},
withCredentials: true,
})
.then(response => response.data);
.then(response => response.data)
.catch(error => {
console.log('Failed Profile Network Call', error);
return { user: 'Unauthenticated' };
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
}
}

&.#{$prefix}--masthead__header--search-active {
@include carbon--breakpoint-down('md') {
display: none;
}
}

@include carbon--breakpoint-between('md', 'lg') {
+ .#{$prefix}--header__logo {
a {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f8e8300

Please sign in to comment.