Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

New nav structure #157

Merged
merged 95 commits into from
Mar 21, 2019
Merged

New nav structure #157

merged 95 commits into from
Mar 21, 2019

Conversation

jsms90
Copy link
Contributor

@jsms90 jsms90 commented Mar 11, 2019

Implement new navbar structure, including dropdowns - Trello ticket

Navbar:

  • Split Header into TopNav & SideNav & pass in an object of links as a prop to both
  • Split DesktopDropdown into 2 versions
  • Implement new/updated spacings for TopNav (e.g. padding above and below logo & anchors)
  • Implement new/updated designs for SideNav - colour, font size, spacing - everything
  • Update styling for newly designed states in Zeplin. These styles live in a file called outerItemStyles.js, for re-use across anchors & the dropdown names
  • Use navItemSpacing.js files to share spacing values between outer & inner list items - done via a combination of padding and margin, in order to make room for the outline styles on focus
  • Use 960px again, as the breakpoint width for TopNav turning into SideNav

Refactor, during build:

  • Remove outline from theme & use vibrant everywhere in codebase. Also update the vibrant colour to "Neon green" from Zeplin
  • Stop passing activeClassName prop through to ExternalLink (fixes console log error)
  • Change the background colour of the sections on the Our Work page - hero section is now white & main section is grey
  • Increase values of time to FCP & FMP on lighthouse tests - performance issues to be investigated

Review template

  • checked that this PR resolves the spec provided from trello / this description
  • ensured that this PR does not introduce any obvious bugs

and allow configuration from the Header level (via an array for now & possibly Contentful at a future date)
… 'Navbar' as SideNav only

therefore altered all media queries in the existing Navbar file to correspond to 959px (not quite tablet)
we only have a story for the TopNavbar, since the SideNav is still not to spec
…ccommodate 8th link

this is only temporary and will be replaced as soon as the dropdowns are incorporated into the TopNav
…nchor components

are written
& change TopNav to accept the same props
by forcing 'overflow: visible' onto Row & Col wrapping the header
background: ${props => props.theme.colors.white};
color: ${props => props.theme.colors.text};
opacity: 1;
`

export const hoverLightStyles = css`
const hoverLight = css`
background: ${props => props.theme.colors.greyBG};
color: ${props => props.theme.colors.text};
opacity: 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that since the opacity: 1 is on the default state, some of these opacity: 1 rule can be remove, or am I wrong?

if (props.themeVariation === 'light') {
return css`
${defaultLightStyles}
${props => props.states.default}
Copy link
Contributor

Choose a reason for hiding this comment

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

this turned out pretty elegant 💅

import { lightStates, darkStates } from './outerItemStates'

const DropdownContainer = styled.li.attrs(props => ({
states: props.themeVariation === 'dark' ? darkStates : lightStates
Copy link
Contributor

Choose a reason for hiding this comment

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

🚀

@jsms90 jsms90 merged commit cc3b8aa into master Mar 21, 2019
@jsms90 jsms90 deleted the new-nav-structure branch March 21, 2019 15:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants