diff --git a/config/changelog.yaml b/config/changelog.yaml index 22a79619fcf..a663c604abe 100644 --- a/config/changelog.yaml +++ b/config/changelog.yaml @@ -2,7 +2,9 @@ Unreleased: date: Added: i18n: - - Added translations for Penelope and Waralee + - Added translations for Penelope, Waralee, and Simone + simone: + - Added the Simone shirt pattern penelope: - Added the Penelope Pencil Skirt pattern by @woutervdub utils: @@ -29,6 +31,8 @@ Unreleased: package has been deprecated. Please import our patterns individually. Removed: Fixed: + components: + - Fixed display of nested option in SampleConfigurator simon: - Fixed an issue where the store wasn't properly initialized causing hips and waist ease to be set incorrectly diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 77ddac0c256..a9001b71c5a 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -3,9 +3,9 @@ ## Unreleased -**Note:** Version bump only for package components - +### Changed + - Added Penelope and Waralee linedrawings ## 2.0.4 (2019-09-27) ### Added diff --git a/packages/components/src/SampleConfigurator/OptionGroup/index.js b/packages/components/src/SampleConfigurator/OptionGroup/index.js index c0603452466..dfae06eca0a 100644 --- a/packages/components/src/SampleConfigurator/OptionGroup/index.js +++ b/packages/components/src/SampleConfigurator/OptionGroup/index.js @@ -1,47 +1,54 @@ -import React from "react"; -import PropTypes from "prop-types"; -import { FormattedMessage } from "react-intl"; -import { injectIntl } from "react-intl"; +import React from 'react' +import PropTypes from 'prop-types' +import { FormattedMessage } from 'react-intl' +import { injectIntl } from 'react-intl' const OptionGroup = props => { return ( {props.options.map(name => { - let output = []; - if (typeof name === "object") { + let output = [] + if (typeof name === 'object') { // Subgroup for (let subGroup of Object.keys(name)) { output.push( -
- +
+
- ); - let children = []; - for (let option of name[subGroup]) children.push(

{option}

); - output.push(
    {children}
); + ) + let children = [] + for (let option of name[subGroup]) + children.push( +
  • + props.sampleOption(option)}> + + +
  • + ) + output.push(
      {children}
    ) } } else output.push(
  • props.sampleOption(name)}> - +
  • - ); + ) - return output; + return output })} - ); -}; + ) +} OptionGroup.propTypes = { config: PropTypes.object.isRequired, options: PropTypes.array.isRequired -}; +} -OptionGroup.defaultProps = {}; +OptionGroup.defaultProps = {} -export default injectIntl(OptionGroup); +export default injectIntl(OptionGroup) diff --git a/packages/components/src/SampleConfigurator/index.js b/packages/components/src/SampleConfigurator/index.js index c4ecfbde98f..51259d71887 100644 --- a/packages/components/src/SampleConfigurator/index.js +++ b/packages/components/src/SampleConfigurator/index.js @@ -1,48 +1,48 @@ -import React, { useState } from "react"; -import { FormattedMessage } from "react-intl"; -import PatternOptions from "./PatternOptions"; -import { withoutBreasts } from "@freesewing/models"; +import React, { useState } from 'react' +import { FormattedMessage } from 'react-intl' +import PatternOptions from './PatternOptions' +import { withBreasts, withoutBreasts } from '@freesewing/models' const SampleConfigurator = props => { - const [expanded, setExpanded] = useState([]); + const [expanded, setExpanded] = useState([]) const sampleOption = option => { props.updateGist( { - type: "option", + type: 'option', option }, - "settings", - "sample" - ); - }; + 'settings', + 'sample' + ) + } const sampleMeasurement = measurement => { props.updateGist( { - type: "measurement", + type: 'measurement', measurement }, - "settings", - "sample" - ); - }; + 'settings', + 'sample' + ) + } const sampleModels = models => { props.updateGist( { - type: "models", + type: 'models', models }, - "settings", - "sample" - ); - }; + 'settings', + 'sample' + ) + } let antMan = { ant: {}, man: withoutBreasts.manSize42 - }; - for (let m in withoutBreasts.manSize42) antMan.ant[m] = antMan.man[m] / 10; + } + for (let m in withoutBreasts.manSize42) antMan.ant[m] = antMan.man[m] / 10 return (