Skip to content

Commit

Permalink
Merge 70077c3 into 796aa43
Browse files Browse the repository at this point in the history
  • Loading branch information
klzns committed Jul 4, 2019
2 parents 796aa43 + 70077c3 commit 6aa37da
Show file tree
Hide file tree
Showing 44 changed files with 1,050 additions and 286 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -37,6 +37,5 @@ docs/_book/
npm-debug.log
.build/
lib
.eslintrc
.vscode/
coverage/
59 changes: 59 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,13 +6,26 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Deprecated

- `ProductSummaryContext`.

### Changed

- Use `vtex.product-summary-context` instead of local context.

### Added

- `product-identifier` as allowed block.

## [2.26.2] - 2019-07-03

## [2.26.1] - 2019-07-03

## [2.26.0] - 2019-07-02

### Changed

- Uses product id to link to product page

## [2.25.1] - 2019-06-27
Expand All @@ -32,103 +45,148 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Add `product-rating-inline` to `product-summary-column`.

## [2.24.2] - 2019-06-04

### Changed

- Updated `vtex.pixel-manager`.

## [2.24.1] - 2019-05-28

### Added

- ProductSummaryPrice content properties to `contentSchemas.json`.

## [2.24.0] - 2019-05-28

### Added

- List and Selling price range feature to `ProductSummaryPrice`.

## [2.23.1] - 2019-05-27

### Changed

- Use absolute path for definitions in `interfaces.json`.

## [2.23.0] - 2019-05-27

### Added

- Send cart events to Pixel Manager when updating quantity of product.

## [2.22.0] - 2019-05-27

### Added

- `contentSchemas.json` for definition of content properties.
- i18n content edition support through CMS.

## [2.21.0] - 2019-05-21

### Fixed

- Include `labelListPrice` prop in `productSummaryPrice`.

## [2.20.3] - 2019-05-14

### Fixed

- ProductQuantityStepper was sending undefined seller param to updateItems mutation.

## [2.20.2] - 2019-05-13

### Fixed

- Show `ImagePlaceholder` when the image cannot be fetched (e.g.: offline).

## [2.20.1] - 2019-05-09

### Fixed

- Attachment related messages had IDs like storefront props and were not showing properly after message scope change.

## [2.20.0] - 2019-05-08

### Added

- Add a `imagePlaceholder` CSS handler.

## [2.19.2] - 2019-04-30

### Fixed

- Fix `ProductImage` product evaluation.

## [2.19.1] - 2019-04-30

### Fixed

- Do not render `ProductPrice` when selling price is zero.
- Remove content loader from `ProductImage` and put a placeholder when the product has no image.

## [2.19.0] - 2019-04-29

### Fixed

- Interfaces to inject the `wishlist` plugins.
- `inlinePrice` height to fit its parent's height.

## [2.18.1] - 2019-04-26

### Changed

- Rename `product-summary.unstable--flex` to `product-summary.shelf`

## [2.18.0] - 2019-04-25

### Added

- Allow `product-rating-inline` in `product-summary.unstable--flex`.

## [2.17.0] - 2019-04-24

### Changed

- Scope Messages

## [2.16.0] - 2019-04-15

## [2.15.3-beta] - 2019-04-15

## [2.15.2] - 2019-04-08

### Fixed

- Legacy should use attachment list component from legacy.

## [2.15.1] - 2019-04-08

### Fixed

- Rename interface `_` to `product-summary-space` to prevent conflict.

## [2.15.0] - 2019-04-08

### Added

- Added new experimental `product-summary.unstable--flex`, under an `unstable--` flag.

## [2.14.5] - 2019-04-01

### Fixed

- Product shape prop-types.

## [2.14.4] - 2019-04-01

### Changed

- Use `cartIndex` to correctly update items quantity on cart.

## [2.14.3] - 2019-03-28

### Fixed

- Replace `background-image` for `img` on Image component.

## [2.14.2] - 2019-03-28
Expand All @@ -144,6 +202,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Remove spread on `getSchema` that was crashing site editor.

### Added

- Add tests.
- Add interface to inject the `wish-list` plugin in the normal mode.
- Add `showQuantitySelector` props to set the quantity selector visibility in the inline mode.
Expand Down
2 changes: 2 additions & 0 deletions manifest.json
Expand Up @@ -19,6 +19,8 @@
"vtex.store-components": "3.x",
"vtex.store-resources": "0.x",
"vtex.product-review-interfaces": "1.x",
"vtex.product-summary-context": "0.x",
"vtex.product-identifier": "0.x",
"vtex.styleguide": "9.x",
"vtex.pixel-manager": "1.x"
},
Expand Down
3 changes: 0 additions & 3 deletions react/.babelrc

This file was deleted.

8 changes: 8 additions & 0 deletions react/.eslintrc
@@ -0,0 +1,8 @@
{
"extends": "vtex-react",
"env": {
"browser": true,
"es6": true,
"jest": true
}
}
3 changes: 2 additions & 1 deletion react/.prettierrc
@@ -1,5 +1,6 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "es5",
"eslintIntegration": true
}
7 changes: 1 addition & 6 deletions react/Column.js
@@ -1,12 +1,7 @@
import React from 'react'
import classNames from 'classnames'

const Column = ({ children }) => {
return (
<div className="flex items-center">
{children}
</div>
)
return <div className="flex items-center">{children}</div>
}

export default Column
2 changes: 1 addition & 1 deletion react/ProductSummaryAddToListButton.js
@@ -1,3 +1,3 @@
import ProductSummaryAddToListButton from './components/ProductSummaryAddToListButton/ProductSummaryAddToListButton'

export default ProductSummaryAddToListButton
export default ProductSummaryAddToListButton
6 changes: 3 additions & 3 deletions react/Spacer.js
@@ -1,5 +1,5 @@
import React from "react"
import React from 'react'

const Spacer = () => <div className="flex flex-grow-1" />
const Spacer = () => <div className="flex flex-grow-1" />

export default Spacer
export default Spacer
6 changes: 2 additions & 4 deletions react/__mocks__/react-content-loader.js
Expand Up @@ -5,8 +5,6 @@ import React, { Component } from 'react'
*/
export default class ContentLoader extends Component {
render() {
return (
<div>ContentLoader</div>
)
return <div>ContentLoader</div>
}
}
}
1 change: 1 addition & 0 deletions react/__mocks__/vtex.pixel-manager/PixelContext.js
@@ -1,6 +1,7 @@
import React from 'react'

export function Pixel(Comp) {
// eslint-disable-next-line react/display-name
return class extends React.Component {
render() {
return <Comp {...this.props} push={() => {}} subscribe={() => {}} />
Expand Down
@@ -0,0 +1,11 @@
import React, { createContext, useContext } from 'react'

const ProductSummaryContext = createContext({})

export const ProductSummaryProvider = ({ product, ...rest }) => {
return <ProductSummaryContext.Provider value={{ product }} {...rest} />
}

export const useProductSummary = () => {
return useContext(ProductSummaryContext)
}
4 changes: 1 addition & 3 deletions react/__mocks__/vtex.render-runtime.js
Expand Up @@ -5,9 +5,7 @@ export function Link({ children }) {
}

export function ExtensionPoint(props) {
return (
<div {...props} />
)
return <div {...props} />
}

export function withRuntimeContext(Comp) {
Expand Down
2 changes: 1 addition & 1 deletion react/__mocks__/vtex.store-components/BuyButton.js
@@ -1,4 +1,4 @@
import React, { Component } from 'react'
import React from 'react'

/**
* BuyButton Mocked Component.
Expand Down
9 changes: 3 additions & 6 deletions react/__mocks__/vtex.store-components/ProductPrice.js
Expand Up @@ -4,12 +4,9 @@ import React, { Component } from 'react'
* ProductPrice Mocked Component.
*/
export default class ProductPrice extends Component {

static schema = {properties: {}}
static schema = { properties: {} }

render() {
return (
<div>ProductPrice</div>
)
return <div>ProductPrice</div>
}
}
}
16 changes: 4 additions & 12 deletions react/__mocks__/vtex.store-components/index.js
Expand Up @@ -4,24 +4,16 @@ export const DiscountBadge = ({ children }) => {
return <div className="discount-badge-mock">{children}</div>
}

const CollectionBadges = ({ children }) => {
return <div className="collection-badges-mock">{children}</div>
}

export class ProductPrice extends Component {
static schema = {properties: {}}
static schema = { properties: {} }

render() {
return (
<div>ProductPrice</div>
)
return <div>ProductPrice</div>
}
}

export class ProductName extends Component {
render() {
return (
<div>ProductName</div>
)
return <div>ProductName</div>
}
}
}
2 changes: 1 addition & 1 deletion react/__tests__/ProductSummary.test.js
@@ -1,6 +1,6 @@
import React from 'react'
import { render } from '@vtex/test-tools/react'
const fs = require('fs')
import fs from 'fs'

import ProductSummary from '../legacy/index'

Expand Down

0 comments on commit 6aa37da

Please sign in to comment.