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

Feature/sc 66152/fe desktop update core nav bar #834

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 8 additions & 10 deletions src/navigation/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,11 @@ export class Nav extends React.Component {
(isProAdminEasyCreateGroup || isProInNavDesktop) && 'navItemLink-pro'
),
counterBadgeClassName: cx(
isNewNavActiveDesktop &&
!isProAdminEasyCreateGroup &&
!isProInNavDesktop &&
'navItem--counterBadge',
(isProAdminEasyCreateGroup || isProInNavDesktop) &&
'navItem--counterBadgeProMessages'
'navItem--counterBadgeProMessages',
isNewNavActiveDesktop &&
(!isProAdminEasyCreateGroup || !isProInNavDesktop) &&
'navItem--counterBadge'
),
icon: getMessagesIcon(),
hasUpdates: messages.unreadMessages > 0,
Expand All @@ -453,12 +452,11 @@ export class Nav extends React.Component {
(isProAdminEasyCreateGroup || isProInNavDesktop) && 'navItemLink-pro'
),
counterBadgeClassName: cx(
isNewNavActiveDesktop &&
!isProAdminEasyCreateGroup &&
!isProInNavDesktop &&
'navItem--counterBadge',
(isProAdminEasyCreateGroup || isProInNavDesktop) &&
'navItem--counterBadgeProNotifications'
'navItem--counterBadgeProNotifications',
isNewNavActiveDesktop &&
(!isProAdminEasyCreateGroup || !isProInNavDesktop) &&
'navItem--counterBadge'
),
icon: getNotificationsIcon(),
onClickAction:
Expand Down
21 changes: 20 additions & 1 deletion src/navigation/nav.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,23 @@ storiesOf('Site Chrome/Nav', module)
style={{ width: '100%' }}
media={{ isAtMediumUp: true, isAtLargeUp: true }}
/>
));
))
.add('authenticated with updated nav design with unread notifications', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

We do not need this story, because it is nearly the same we already have.

const notifications = { ...navItems.notifications };
notifications.unreadNotifications = 1;
const items = { ...navItems, notifications };
return (
<TestNav
self={{
is_pro_admin: true,
...MOCK_MEMBER,
}}
navItems={items}
style={{ width: '100%' }}
media={{ isAtMediumUp: true, isAtLargeUp: true }}
isNewNavActive
isNewNavsOrder
isProInNavFFEnabled
/>
);
});