-
Notifications
You must be signed in to change notification settings - Fork 683
Checkout options #319
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
Merged
jimbo
merged 35 commits into
magento:release/2.0
from
bargreenellingson:checkout-options
Nov 19, 2018
Merged
Checkout options #319
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
f05a4f0
Add kebab submenu to items in cart, add option to remove item from cart
Serunde c6443c0
Code cleanup, fix zeroed price bug in recently emptied cart
Serunde 81c2e71
Refactor, additional code cleanup, and unit tests
Serunde e5ad03b
Merge changes from styling branch
Serunde b7020db
Add `edit item` and `favorite` to cart + additional styling
Serunde df815ee
Add storybook and product options stories to Venia
pcvonz f2546b0
Extract logic from `Kebab`, add reusable component `Section`
Serunde 8f682a1
Merge branch 'master' of https://github.com/bargreenellingson/pwa-stu…
Serunde 5349e0e
Merge branch 'storybook' of https://github.com/bargreenellingson/pwa-…
Serunde 3659cd0
Enzyme and Storybook tests, prettier pass
Serunde 5e4fb8d
Remove unnecessary prop types and irrelevant Storybook items
Serunde a08fa9c
Merge branch 'release/2.0' of https://github.com/magento-research/pwa…
Serunde 172757b
Integrate all features and tests with release 2.0 changes
Serunde dd72dcb
Extract conditional logic from checkout and options confirmation comp…
Serunde 84f34fe
Linter pass
Serunde 1abd10f
Add action/reducer tests for `removeItemFromCart()`
Serunde ff193ab
Remove merge conflicts in package.json
Serunde 6ed920a
Merge branch 'release/2.0' into checkout-options
Serunde a3c21cf
Simplify test for cart reset on 404 error
Serunde c8dc9cb
Merge branch 'release/2.0' into checkout-options
6a461bb
Merge branch 'release/2.0' into checkout-options
476d3db
Merge branch 'release/2.0' into checkout-options
zetlen 4d3df9b
Merge branch 'release/2.0' of https://github.com/magento-research/pwa…
Serunde fd898c8
Better CSS organization, minor code cleanup
Serunde 30e57e4
Pull for current package.json
Serunde 4e642e3
Prettier pass, test updates
Serunde 29c6c5d
npm i
Serunde 7e236a9
Merge branch 'release/2.0' into checkout-options
Serunde 6cac7dc
Add classname to `section` stylesheet
Serunde 85393d9
Merge branch 'checkout-options' of https://github.com/bargreenellings…
Serunde feffe61
Merge & merge conflicts
Serunde 2291efc
Merge branch 'release/2.0' into checkout-options
jimbo d658d05
Merge branch 'release/2.0' into checkout-options
jimbo 7fef2c3
Fix package lock conflicts
jimbo dc43f99
Fix package lock file again
jimbo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
function loadStories() { | ||
const context = require.context('../src', true, /__stories__\/.+\.js$/); | ||
context.keys().forEach(context); | ||
} | ||
|
||
configure(loadStories, module); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
const path = require('path'); | ||
|
||
const configureBabel = require('../babel.config.js'); | ||
const babelOptions = configureBabel('development'); | ||
console.log(babelOptions); | ||
|
||
const base_config = require('./webpack.config.js'); | ||
|
||
const themePaths = { | ||
src: path.resolve(__dirname, '../src'), | ||
assets: path.resolve(__dirname, '../web'), | ||
output: path.resolve(__dirname, '../web/js'), | ||
node: path.resolve(__dirname, '../../../') | ||
}; | ||
|
||
console.log(themePaths.node); | ||
|
||
const testPath = path.resolve('../'); | ||
|
||
module.exports = (storybookBaseConfig, configType) => { | ||
storybookBaseConfig.module.rules.push({ | ||
include: [themePaths.src], | ||
test: /\.js$/, | ||
use: [ | ||
{ | ||
loader: 'babel-loader', | ||
options: { ...babelOptions, cacheDirectory: true } | ||
} | ||
] | ||
}); | ||
|
||
storybookBaseConfig.module.rules.push({ | ||
test: /\.css$/, | ||
use: [ | ||
'style-loader', | ||
{ | ||
loader: 'css-loader', | ||
options: { | ||
importLoaders: 1, | ||
localIdentName: '[name]-[local]-[hash:base64:3]', | ||
modules: true | ||
} | ||
} | ||
] | ||
}); | ||
|
||
storybookBaseConfig.module.rules.push({ | ||
test: /\.(jpg|svg)$/, | ||
use: [ | ||
{ | ||
loader: 'file-loader', | ||
options: {} | ||
} | ||
] | ||
}); | ||
|
||
storybookBaseConfig.resolve.alias = { | ||
src: themePaths.src | ||
}; | ||
storybookBaseConfig.resolve.modules = ['node_modules']; | ||
|
||
return storybookBaseConfig; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/venia-concept/src/components/MiniCart/__stories__/Kebab.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
|
||
import Kebab from '../kebab'; | ||
import Section from '../section'; | ||
import 'src/index.css'; | ||
|
||
const stories = storiesOf('Mini Cart/Kebab', module); | ||
|
||
const styles = { | ||
width: '150px', | ||
height: '150px', | ||
display: 'grid' | ||
}; | ||
|
||
stories.add('Kebab Closed', () => ( | ||
<div style={styles}> | ||
<Kebab /> | ||
</div> | ||
)); | ||
|
||
stories.add('Kebab Open', () => ( | ||
<div style={styles}> | ||
<Kebab isOpen={true}> | ||
<Section icon="heart" text="Section 1" /> | ||
<Section icon="x" text="Section 2" /> | ||
<Section icon="chevron-up" text="Section 3" /> | ||
<Section text="Non-icon Section" /> | ||
</Kebab> | ||
</div> | ||
)); |
43 changes: 43 additions & 0 deletions
43
packages/venia-concept/src/components/MiniCart/__stories__/ProductList.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
|
||
import ProductList from '../productList'; | ||
import 'src/index.css'; | ||
|
||
const stories = storiesOf('Mini Cart/Product List', module); | ||
|
||
const items = [ | ||
{ | ||
item_id: 1, | ||
name: 'Product 1', | ||
price: 10, | ||
qty: 1, | ||
sku: 'TEST1', | ||
image: 'test.jpg' | ||
}, | ||
{ | ||
item_id: 2, | ||
name: 'Product 2', | ||
price: 5, | ||
qty: 1, | ||
sku: 'TEST2', | ||
image: 'test.jpg' | ||
}, | ||
{ | ||
item_id: 3, | ||
name: 'Product 3', | ||
price: 15, | ||
qty: 1, | ||
sku: 'TEST3', | ||
image: 'test.jpg' | ||
} | ||
]; | ||
|
||
stories.add('Product List With Kebab', () => ( | ||
<ProductList | ||
items={items} | ||
currencyCode="NZD" | ||
removeItemFromCart={() => {}} | ||
showEditPanel={() => {}} | ||
/> | ||
)); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.