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

feat(megamenu): megamenu web component HC & AI updates #5016

Merged
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
67ac075
feat(megamenu): hc & ai megamenu desktop design update
annawen1 Jan 26, 2021
ebb68aa
fix(megamenu): adjust top left nav padding for old design
annawen1 Jan 26, 2021
126b154
fix(megamenu): check if heading exists before rendering copy component
annawen1 Jan 26, 2021
5b2d7ec
feat(megamenu): mobile menu design update
annawen1 Jan 27, 2021
616d147
feat(megamenu): border styling on highlighted menu items mobile
annawen1 Jan 27, 2021
d16ba4a
Merge branch 'master' into feat/megamenu-hc-ai-updates
annawen1 Jan 27, 2021
5ca8635
chore(snapshot): update snapshots
annawen1 Jan 27, 2021
26f879c
Merge branch 'master' into feat/megamenu-hc-ai-updates
annawen1 Jan 27, 2021
de2b27a
fix(megamenu): adjust spacing between desc and heading
annawen1 Jan 28, 2021
388aaaa
fix(megamenu): try using left-nav-menu for highlighted instead
annawen1 Jan 29, 2021
b105a4d
fix(megamenu): revert changes
annawen1 Jan 29, 2021
a89670d
fix(megamenu): revert changes
annawen1 Jan 29, 2021
cdafd8f
Merge branch 'master' into feat/megamenu-hc-ai-updates
annawen1 Jan 29, 2021
67e6c33
Merge branch 'master' into feat/megamenu-hc-ai-updates
annawen1 Jan 30, 2021
d737515
fix(megamenu): remove highlight components set specific attribute
annawen1 Jan 30, 2021
3633552
Merge branch 'master' into feat/megamenu-hc-ai-updates
annawen1 Feb 1, 2021
9884b7d
fix(megamenu): remove check for links length
annawen1 Feb 1, 2021
5efb688
fix(megamenu): adjust platform name styling
annawen1 Feb 1, 2021
43d0f4c
Merge branch 'master' into feat/megamenu-hc-ai-updates
kodiakhq[bot] Feb 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/services-store/src/types/translateAPI.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020
* Copyright IBM Corp. 2020, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand All @@ -14,6 +14,7 @@
export interface BasicLink {
title: string;
titleEnglish?: string;
highlightedLink?: boolean;
url?: string;
}

Expand Down
43 changes: 42 additions & 1 deletion packages/styles/scss/components/masthead/_masthead-leftnav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,21 @@
}

.#{$prefix}--side-nav__submenu {
display: flex;
flex-direction: column;

.#{$prefix}--side-nav__submenu-content {
width: 100%;
height: 100%;
display: flex;
}

&::after {
content: '';
width: 100%;
border-bottom: 1px solid $ui-03;
}

&[aria-expanded='true'] {
+ .#{$prefix}--side-nav__menu[role='menu'] {
position: absolute;
Expand Down Expand Up @@ -176,7 +191,7 @@
color: $text-01;
padding: 0 $carbon--spacing-05;
height: $container-04;
border-bottom: 1px solid $ui-03;
border-bottom: 1px solid $ui-04;
align-items: center;
}

Expand Down Expand Up @@ -225,6 +240,7 @@
@include carbon--type-style(body-short-02);

color: $text-01;
align-self: center;
}

&[aria-haspopup='true'] {
Expand All @@ -239,6 +255,31 @@
}
}

:host(#{$dds-prefix}-left-nav-menu-category-heading) {
@include type-style('body-long-01');

display: block;
color: $text-02;
padding: $spacing-02 0;
margin: 0 $spacing-05;
border-bottom: 1px solid $ui-03;
}

:host(#{$dds-prefix}-left-nav-menu-item[last-highlighted]),
:host(#{$dds-prefix}-left-nav-menu[last-highlighted]) {
border-bottom: 1px solid $ui-04;
}

:host(#{$dds-prefix}-left-nav-menu-item[last-highlighted])
.#{$prefix}--side-nav__link[role='menuitem']::after {
border-bottom: none;
}

:host(#{$dds-prefix}-left-nav-menu[last-highlighted])
.#{$prefix}--side-nav__submenu::after {
content: none;
}

.#{$prefix}--masthead__side-nav--submemu--selected {
border-left: 3px solid $interactive-01;

Expand Down
37 changes: 31 additions & 6 deletions packages/styles/scss/components/masthead/_masthead-megamenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
.#{$prefix}--masthead__megamenu__categories-section {
display: flex;
flex-direction: column;
padding-top: $spacing-06;
padding-top: rem(18px);
width: 100%;

.#{$prefix}--masthead__megamenu__categories {
Expand All @@ -147,6 +147,15 @@
}
}

:host(#{$dds-prefix}-megamenu-category-group-copy) {
display: block;
@include use-carbon-productive-tokens();
@include type-style('body-short-01');

color: $text-02;
padding: rem(6px) $spacing-05 rem(10px);
}

:host(#{$dds-prefix}-megamenu-category-group),
.#{$prefix}--masthead__megamenu__category-group {
display: inline;
Expand All @@ -156,6 +165,12 @@
display: inline-block;
padding-bottom: $spacing-07;
}

::slotted(#{$dds-prefix}-megamenu-category-group-copy) {
color: $text-01;
margin-top: rem(-6px);
padding: 0 $spacing-05 1px $spacing-05;
}
}

:host(#{$dds-prefix}-megamenu-link-with-icon)[style-scheme='category-headline'],
Expand All @@ -165,7 +180,7 @@
p,
a,
.#{$prefix}--link-with-icon {
padding: 7px $spacing-05;
padding: 6px $spacing-05;
text-decoration: none;
width: 100%;
}
Expand All @@ -174,7 +189,7 @@
p {
color: $text-01;
@include use-carbon-productive-tokens();
@include type-style('productive-heading-01');
@include type-style('expressive-heading-01');
}

svg {
Expand All @@ -191,11 +206,11 @@
:host(#{$dds-prefix}-megamenu-category-link) a,
.#{$prefix}--masthead__megamenu__category-sublink {
@include use-carbon-productive-tokens();
@include type-style('body-short-01');
@include type-style('body-long-01');

color: $text-02;
text-decoration: none;
padding: 7px $spacing-05;
padding: 6px $spacing-05;
display: block;

&:hover,
Expand All @@ -204,6 +219,15 @@
}
}

:host(#{$dds-prefix}-megamenu-link-with-icon)[style-scheme='category-sublink'] {
@include use-carbon-productive-tokens();
@include type-style('body-short-01');

a {
padding: 7px $spacing-05;
}
}

:host(#{$dds-prefix}-megamenu-link-with-icon)[style-scheme='view-all'],
.#{$prefix}--masthead__megamenu__view-all-cta {
margin-top: auto;
Expand Down Expand Up @@ -258,7 +282,7 @@
:host(#{$dds-prefix}-megamenu-left-navigation),
.#{$prefix}--masthead__megamenu__highlight-section {
min-height: 100%;
padding-top: $spacing-06;
padding-top: rem(18px);
border-right: carbon--rem(1px) solid $ui-03;
@include carbon--make-col(4, 16);
}
Expand All @@ -273,6 +297,7 @@
border-right: none;
border-bottom: carbon--rem(1px) solid $ui-03;
column-count: 2;
column-gap: 0;
@include carbon--make-col(8, 8);
}

Expand Down
Loading