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

Break Footer into smaller pieces using composition #54

Merged
merged 17 commits into from Apr 11, 2019
Merged

Conversation

klzns
Copy link
Contributor

@klzns klzns commented Apr 1, 2019

What is the purpose of this pull request?

Fix #46

Break Footer into reusable pieces to make it possible to build a more complex layout.

Components:

  • Social Network
  • Image (previously Badge)
  • Payment Method (previously Payment Form)
  • Text (previously Store Information)
  • Logo
  • Powered by VTEX
  • Newsletter
  • Menu

What problem is this solving?

Today Footer is a single component with a fixed layout. This makes it pretty strict in layout options.

How should this be manually tested?

Store:
https://breno--storecomponents.myvtexdev.com/

CMS:
https://breno--storecomponents.myvtexdev.com/admin/cms/storefront

Screenshots or example usage

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

@klzns klzns marked this pull request as ready for review April 10, 2019 21:15
@@ -1,12 +1,12 @@
import React, { Component } from 'react'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just moved this file and fix lint

@@ -2,8 +2,8 @@ import PropTypes from 'prop-types'
import React from 'react'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just moved this file and fixed lint

@@ -2,8 +2,8 @@ import React from 'react'
import PropTypes from 'prop-types'

import footerList from './footerList'
import withImage from './withImage'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just moved this file and fixed lint

@@ -3,8 +3,8 @@ import React, { Component, Fragment } from 'react'

import Accordion from './Accordion'
import FooterLinkList, { FooterLinkItem } from './FooterLinkList'
import { objectLikeLinkArray } from './../propTypes'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just moved this file and fixed lint

@@ -3,11 +3,11 @@ import React, { Component } from 'react'
import classNames from 'classnames'
import { Container } from 'vtex.store-components'

import FooterBadgeList from './components/FooterBadgeList'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just moved this file and fixed lint

@@ -1,11 +1,11 @@
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Collapse } from 'react-collapse'
import { injectIntl, intlShape, FormattedMessage } from 'react-intl'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just moved this file and fixed lint

react/Footer.js Outdated Show resolved Hide resolved
react/Footer.js Outdated Show resolved Hide resolved
react/typings/vtex.render-runtime.d.ts Outdated Show resolved Hide resolved
"accepted-payment-methods",
"logo",
"newsletter",
"unstable--menu",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"unstable--menu",
"menu",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't right now, since this is not published yet:
vtex-apps/menu#35

error: App build failed with message: I couldn't find an interface "menu". You need to declare it or depend on an app that declares it.

react/Footer.js Outdated Show resolved Hide resolved
react/components/SocialNetwork.tsx Outdated Show resolved Hide resolved
react/components/PaymentMethodIcon.tsx Outdated Show resolved Hide resolved
@klzns klzns merged commit 7c3244c into master Apr 11, 2019
@klzns klzns deleted the feature/composition branch April 11, 2019 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change in structure for better manipulation
2 participants