Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refactor Header component to function #1241

Merged
merged 3 commits into from
May 15, 2019
Merged

Conversation

supernova-at
Copy link
Contributor

Description

This PR updates the Header/header.js component to be a function instead of a class.

It was part of the transition to Peregrine / Hooks, but this component is very simple and doesn't need to make use of any hooks at all. As a result, nothing was moved to Peregrine in this PR.

Related Issue

Closes #979 .

Verification Steps

  1. Open Venia
  2. Verify that the header looks correct
  3. Verify that the Hamburger menu on the left of the header opens the account slide out
  4. Verify that the home button on the menu takes you back to the main (CMS) page
  5. Verify that the search button opens the search input
  6. Verify that the shopping cart button opens the shopping cart slide out

How Have YOU Tested this?

  1. yarn test
  2. Verification steps above

Screenshots / Screen Captures (if appropriate):

The Header component:

Screen Shot 2019-05-14 at 12 29 48 PM

Proposed Labels for Change Type/Package

  • major (e.g x.0.0 - a breaking change)
  • minor (e.g 0.x.0 - a backwards compatible addition)
  • patch (e.g 0.0.x - a bug fix)

Checklist:

  • I have updated the documentation accordingly, if necessary.
  • I have added tests to cover my changes, if necessary.

@vercel
Copy link

vercel bot commented May 14, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://venia-git-supernova-979header.magento-research1.now.sh

get searchIcon() {
return <Icon src={SearchIcon} />;
}
const SearchBar = React.lazy(() => import('src/components/SearchBar'));
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm new to React.lazy. How can I see that this is indeed lazily loading? What affect should it have in the browser? I'm not seeing a new chunk/request being made which is confusing me :D

Copy link
Contributor

@sirugh sirugh left a comment

Choose a reason for hiding this comment

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

Looks good! I only had one question/comment but probably not worth holding up the PR.

@sirugh sirugh assigned dpatil-magento and unassigned sirugh May 15, 2019
@dpatil-magento dpatil-magento merged commit 841ec0a into develop May 15, 2019
zetlen pushed a commit that referenced this pull request May 23, 2019
feat: centralize configuration

fixup porting lambda to new config

fixup config management from sender, not receiver

refactor: Configuration class

docs: unified config doc draft
@supernova-at supernova-at deleted the supernova/979_header branch July 25, 2019 15:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Peregrine: Header Component
3 participants