From 3349f399579623921d1ba3d6bac54bd24c02bf5d Mon Sep 17 00:00:00 2001 From: Matthew Twomey Date: Fri, 29 Sep 2017 16:00:44 -0500 Subject: [PATCH 01/24] New branch and deployment for bug bash --- circle.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/circle.yml b/circle.yml index fd35990be..2084eb9ca 100644 --- a/circle.yml +++ b/circle.yml @@ -28,6 +28,11 @@ deployment: owner: appirio-tech commands: - ./deploy.sh TEST01 + test02: + branch: test02 + owner: appirio-tech + commands: + - ./deploy.sh TEST02 qa: branch: qa owner: appirio-tech From 36887cee696a58c0e397e62ebd62163dda06d1b5 Mon Sep 17 00:00:00 2001 From: Zhouxing Shi Date: Sat, 30 Sep 2017 23:01:27 +0800 Subject: [PATCH 02/24] Fix issue #994 --- src/projects/detail/containers/Specification.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/projects/detail/containers/Specification.scss b/src/projects/detail/containers/Specification.scss index e12db078e..637700415 100644 --- a/src/projects/detail/containers/Specification.scss +++ b/src/projects/detail/containers/Specification.scss @@ -85,7 +85,8 @@ $sideBarWidth: 280px; text-transform: none; } - &:-moz-placeholder { + &::-moz-placeholder { + line-height: 45px; color: #888894; opacity: 1; text-transform: none; From f6706e6db10c3cc1e4f56f0100b5866b79cf3758 Mon Sep 17 00:00:00 2001 From: Zhouxing Shi Date: Sat, 30 Sep 2017 23:20:37 +0800 Subject: [PATCH 03/24] Fix issue #946 --- src/components/ActionCard/ActionCard.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/ActionCard/ActionCard.scss b/src/components/ActionCard/ActionCard.scss index 166967f6a..ed0990f37 100644 --- a/src/components/ActionCard/ActionCard.scss +++ b/src/components/ActionCard/ActionCard.scss @@ -124,6 +124,10 @@ &::before { content: " ยท "; } + + a { + color: $tc-gray-70; + } } .card-status { From b28f7d79b7e9b9725f86eae346b1541f40d8a5b7 Mon Sep 17 00:00:00 2001 From: Hammad Siddiqui Date: Sun, 1 Oct 2017 12:21:01 +0500 Subject: [PATCH 04/24] Fix for Code Blocks breaking in Feed The following fix wraps the code block in the feed to the size of its parent (i.e the size of the post) --- src/components/Feed/draftjs.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Feed/draftjs.scss b/src/components/Feed/draftjs.scss index de1d851e8..cac45de63 100644 --- a/src/components/Feed/draftjs.scss +++ b/src/components/Feed/draftjs.scss @@ -104,6 +104,7 @@ color: #333; border: 1px solid #ededf2; border-radius: 4px; + white-space: pre-wrap; } strong { font-weight: bold; From 6e824100e1a2aea6d9aa6e8f2bd0133cc784a4dd Mon Sep 17 00:00:00 2001 From: Hammad Siddiqui Date: Sun, 1 Oct 2017 14:55:51 +0500 Subject: [PATCH 05/24] Paragraph dividing fix --- src/projects/create/components/ProjectOutline.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/projects/create/components/ProjectOutline.scss b/src/projects/create/components/ProjectOutline.scss index 172aed47b..41750e8b0 100644 --- a/src/projects/create/components/ProjectOutline.scss +++ b/src/projects/create/components/ProjectOutline.scss @@ -37,6 +37,7 @@ margin-top: $base-unit * 4; margin-bottom: $base-unit * 4; word-break: break-all; + white-space: pre; } .project-meta-data { From 83849e2c5cf8dc3cd03b08315c03f8dba05f1870 Mon Sep 17 00:00:00 2001 From: shubhu Date: Sun, 1 Oct 2017 23:57:13 +0530 Subject: [PATCH 06/24] fixes #1165 changed fonts path from absolute to relative --- src/styles/_fonts.scss | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/styles/_fonts.scss b/src/styles/_fonts.scss index aba02dca7..b955b4c88 100644 --- a/src/styles/_fonts.scss +++ b/src/styles/_fonts.scss @@ -1,17 +1,16 @@ // FONT STACK // -------------------------------------------------------------------------------------------- // Use the mixin to include fonts. - @mixin font-family($font-name, $font-weight, $font-style, $font-url, $font-file) { @font-face { - font-family: '#{$font-name}'; - src: url('#{$font-url}#{$font-file}.eot'); - src: url('#{$font-url}#{$font-file}.eot?#iefix') format('embedded-opentype'), - url('#{$font-url}#{$font-file}.woff') format('woff'), - url('#{$font-url}#{$font-file}.ttf') format('truetype'), - url('#{$font-url}.svg##{$font-file}') format('svg'); - font-weight: $font-weight; - font-style: $font-style; + font-family: '#{$font-name}'; + src: url('#{$font-url}#{$font-file}.eot'); + src: url('#{$font-url}#{$font-file}.eot?#iefix') format('embedded-opentype'), + url('#{$font-url}#{$font-file}.woff') format('woff'), + url('#{$font-url}#{$font-file}.ttf') format('truetype'), + url('#{$font-url}#{$font-file}.svg##{$font-name}') format('svg'); + font-weight: $font-weight; + font-style: $font-style; } } @@ -30,20 +29,20 @@ // 900 Black (Heavy) // Roboto -@include font-family('Roboto', 900, normal, '~/src/assets/fonts/roboto/', 'roboto-black'); -@include font-family('Roboto', 900, italic, '~/src/assets/fonts/roboto/', 'roboto-blackitalic'); +@include font-family('Roboto', 900, normal, '../assets/fonts/roboto/', 'roboto-black'); +@include font-family('Roboto', 900, italic, '../assets/fonts/roboto/', 'roboto-blackitalic'); -@include font-family('Roboto', 700, normal, '~/src/assets/fonts/roboto/', 'roboto-bold'); -@include font-family('Roboto', 700, italic, '~/src/assets/fonts/roboto/', 'roboto-bolditalic'); +@include font-family('Roboto', 700, normal, '../assets/fonts/roboto/', 'roboto-bold'); +@include font-family('Roboto', 700, italic, '../assets/fonts/roboto/', 'roboto-bolditalic'); -@include font-family('Roboto', 500, normal, '~/src/assets/fonts/roboto/', 'roboto-medium'); -@include font-family('Roboto', 500, italic, '~/src/assets/fonts/roboto/', 'roboto-mediumitalic'); +@include font-family('Roboto', 500, normal, '../assets/fonts/roboto/', 'roboto-medium'); +@include font-family('Roboto', 500, italic, '../assets/fonts/roboto/', 'roboto-mediumitalic'); -@include font-family('Roboto', 400, normal, '~/src/assets/fonts/roboto/', 'roboto-regular'); -@include font-family('Roboto', 400, italic, '~/src/assets/fonts/roboto/', 'roboto-italic'); +@include font-family('Roboto', 400, normal, '../assets/fonts/roboto/', 'roboto-regular'); +@include font-family('Roboto', 400, italic, '../assets/fonts/roboto/', 'roboto-italic'); -@include font-family('Roboto', 300, normal, '~/src/assets/fonts/roboto/', 'roboto-light'); -@include font-family('Roboto', 300, italic, '~/src/assets/fonts/roboto/', 'roboto-lightitalic'); +@include font-family('Roboto', 300, normal, '../assets/fonts/roboto/', 'roboto-light'); +@include font-family('Roboto', 300, italic, '../assets/fonts/roboto/', 'roboto-lightitalic'); -@include font-family('Roboto', 100, normal, '~/src/assets/fonts/roboto/', 'roboto-thin'); -@include font-family('Roboto', 100, italic, '~/src/assets/fonts/roboto/', 'roboto-thinitalic'); +@include font-family('Roboto', 100, normal, '../assets/fonts/roboto/', 'roboto-thin'); +@include font-family('Roboto', 100, italic, '../assets/fonts/roboto/', 'roboto-thinitalic'); From a1307f5d9d053be4a69220ddd5655e580c0913da Mon Sep 17 00:00:00 2001 From: Samir Gondzetovic Date: Fri, 6 Oct 2017 12:50:16 +0100 Subject: [PATCH 07/24] add scrollbar to code blocks in posts --- src/components/ActionCard/ActionCard.jsx | 2 +- src/components/ActionCard/ActionCard.scss | 5 +++++ src/components/Feed/Feed.jsx | 2 +- src/components/Feed/draftjs.scss | 1 - src/projects/create/components/ProjectOutline.scss | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/ActionCard/ActionCard.jsx b/src/components/ActionCard/ActionCard.jsx index f9bcf8a36..1b5106820 100644 --- a/src/components/ActionCard/ActionCard.jsx +++ b/src/components/ActionCard/ActionCard.jsx @@ -75,7 +75,7 @@ class Header extends React.Component{
 
-
+
{this.props.title}
diff --git a/src/components/ActionCard/ActionCard.scss b/src/components/ActionCard/ActionCard.scss index ed0990f37..14e64fcc2 100644 --- a/src/components/ActionCard/ActionCard.scss +++ b/src/components/ActionCard/ActionCard.scss @@ -136,6 +136,10 @@ } } + .topicBody{ + width: calc(100% - 40px); + } + .card-body { @include roboto; font-size: $tc-label-lg; @@ -143,6 +147,7 @@ line-height: $base-unit*5; padding: 10px 0; word-break: break-word; + overflow-x:auto; &.comment-section { margin-bottom: -50px; diff --git a/src/components/Feed/Feed.jsx b/src/components/Feed/Feed.jsx index b2742f455..b51cc2e51 100644 --- a/src/components/Feed/Feed.jsx +++ b/src/components/Feed/Feed.jsx @@ -77,7 +77,7 @@ class Feed extends React.Component {
-
+
{title}
{self && ( diff --git a/src/components/Feed/draftjs.scss b/src/components/Feed/draftjs.scss index cac45de63..de1d851e8 100644 --- a/src/components/Feed/draftjs.scss +++ b/src/components/Feed/draftjs.scss @@ -104,7 +104,6 @@ color: #333; border: 1px solid #ededf2; border-radius: 4px; - white-space: pre-wrap; } strong { font-weight: bold; diff --git a/src/projects/create/components/ProjectOutline.scss b/src/projects/create/components/ProjectOutline.scss index 41750e8b0..7f5766f6a 100644 --- a/src/projects/create/components/ProjectOutline.scss +++ b/src/projects/create/components/ProjectOutline.scss @@ -37,7 +37,7 @@ margin-top: $base-unit * 4; margin-bottom: $base-unit * 4; word-break: break-all; - white-space: pre; + white-space: pre-line; } .project-meta-data { From c34f03af439ab15e0b6d0fe55c9f31c9ed3c467e Mon Sep 17 00:00:00 2001 From: kevinkid Date: Sat, 7 Oct 2017 13:58:08 +0300 Subject: [PATCH 08/24] Trial fix Issue: #990 --- src/components/Home/Home.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/Home/Home.scss b/src/components/Home/Home.scss index f48b1f5e9..bf2d5755d 100644 --- a/src/components/Home/Home.scss +++ b/src/components/Home/Home.scss @@ -70,6 +70,7 @@ padding-bottom: $base-unit*6; } .tc-btn{ + color: #cfe6ff; height:$base-unit*8; width: $base-unit*50; text-align: center; @@ -79,6 +80,14 @@ font-size: $tc-label-lg; display: block; margin-bottom: $base-unit * 4; + &:hover { + color:#ffffff; + background-image: linear-gradient(#3996FF 0%, #127BF3 100%) !important; + } + &:active { + color:#ffffff; + background-image: linear-gradient(#3996FF 0%, #127BF3 100%) !important; + } } } } \ No newline at end of file From e131ed65354b2e59afeb61f0a257f893d00648a9 Mon Sep 17 00:00:00 2001 From: Dimitrina Sirakova Date: Mon, 9 Oct 2017 23:30:15 +0300 Subject: [PATCH 09/24] Fix #1221 --- src/projects/detail/containers/Specification.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/projects/detail/containers/Specification.scss b/src/projects/detail/containers/Specification.scss index e12db078e..1c9c514e1 100644 --- a/src/projects/detail/containers/Specification.scss +++ b/src/projects/detail/containers/Specification.scss @@ -849,7 +849,7 @@ $sideBarWidth: 280px; .project-name { word-break: break-all; font-size: 20px; - margin-top: 10px; + /*margin-top: 10px;*/ } } From 2194af0e6fb6bfac82816df1d863dd2cccb28272 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Tue, 10 Oct 2017 13:22:25 +0530 Subject: [PATCH 10/24] =?UTF-8?q?Github=20issue#1104,=20"Create=20a=20new?= =?UTF-8?q?=20project"=20action=20should=20consider=20the=20product=20from?= =?UTF-8?q?=20the=20URL=20=E2=80=94=20Added=20logic=20to=20direct=20user?= =?UTF-8?q?=20directly=20to=20the=20form=20details=20page=20when=20the=20d?= =?UTF-8?q?eep=20link=20is=20for=20the=20same=20product=20as=20of=20the=20?= =?UTF-8?q?save=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/projects/create/components/ProjectWizard.jsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/projects/create/components/ProjectWizard.jsx b/src/projects/create/components/ProjectWizard.jsx index db5f264c0..8a2670308 100644 --- a/src/projects/create/components/ProjectWizard.jsx +++ b/src/projects/create/components/ProjectWizard.jsx @@ -48,10 +48,21 @@ class ProjectWizard extends Component { const incompleteProjectStr = window.localStorage.getItem(LS_INCOMPLETE_PROJECT) if(incompleteProjectStr) { const incompleteProject = JSON.parse(incompleteProjectStr) + // const incompleteProjectType = _.get(incompleteProject, 'type') + const incompleteProduct = _.get(incompleteProject, 'details.products[0]') + let wizardStep = WZ_STEP_INCOMP_PROJ_CONF + if (incompleteProduct && params && params.product) { + // assumes the params.product to be id of a product because incomplete project is set only + // after user selects a particular product + const product = findProduct(params.product, true) + if (product && product.id === incompleteProduct) { + wizardStep = WZ_STEP_FILL_PROJ_DETAILS + } + } this.setState({ project: update(this.state.project, {$merge : incompleteProject}), dirtyProject: update(this.state.dirtyProject, {$merge : incompleteProject}), - wizardStep: WZ_STEP_INCOMP_PROJ_CONF, + wizardStep: wizardStep, isProjectDirty: false }, () => { typeof onStepChange === 'function' && onStepChange(this.state.wizardStep) From cb0a5572abe2efde88011ed958c60d34fcc2a020 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Tue, 10 Oct 2017 13:24:06 +0530 Subject: [PATCH 11/24] =?UTF-8?q?Github=20issue#1104,=20"Create=20a=20new?= =?UTF-8?q?=20project"=20action=20should=20consider=20the=20product=20from?= =?UTF-8?q?=20the=20URL=20=E2=80=94=20Reverted=20the=20changes=20made=20fo?= =?UTF-8?q?r=20https://github.com/appirio-tech/connect-app/issues/1114=20b?= =?UTF-8?q?ecause=20is=20creating=20more=20issues=20than=20solving=20a=20r?= =?UTF-8?q?are=20problem.=20We=20need=20to=20fix=20it=20again=20using=20so?= =?UTF-8?q?me=20other=20approach.=20With=20this=20change,=20it=20is=20now?= =?UTF-8?q?=20saving=20the=20incomplete=20project=20only=20when=20the=20pr?= =?UTF-8?q?oject=20is=20dirty.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/projects/create/containers/CreateContainer.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/projects/create/containers/CreateContainer.jsx b/src/projects/create/containers/CreateContainer.jsx index 718607789..a73cb8a1f 100644 --- a/src/projects/create/containers/CreateContainer.jsx +++ b/src/projects/create/containers/CreateContainer.jsx @@ -108,9 +108,9 @@ class CreateConainer extends React.Component { // stores the incomplete project in local storage onLeave(e) {// eslint-disable-line no-unused-vars - const { wizardStep } = this.state - if (wizardStep === ProjectWizard.Steps.WZ_STEP_FILL_PROJ_DETAILS) {// Project Details step - console.log('saving incomplete project') + const { wizardStep, isProjectDirty } = this.state + if (wizardStep === ProjectWizard.Steps.WZ_STEP_FILL_PROJ_DETAILS && isProjectDirty) {// Project Details step + console.log('saving incomplete project', this.state.updatedProject) window.localStorage.setItem(LS_INCOMPLETE_PROJECT, JSON.stringify(this.state.updatedProject)) } // commenting alerts for the page unload and route change hooks as discussed From 752bb65252622af0c94e7c74f848342d590fde28 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Tue, 10 Oct 2017 14:15:06 +0530 Subject: [PATCH 12/24] =?UTF-8?q?Github=20issue#1104,=20"Create=20a=20new?= =?UTF-8?q?=20project"=20action=20should=20consider=20the=20product=20from?= =?UTF-8?q?=20the=20URL=20=E2=80=94=20added=20inline=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/projects/create/components/ProjectWizard.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/projects/create/components/ProjectWizard.jsx b/src/projects/create/components/ProjectWizard.jsx index 8a2670308..89436b4c8 100644 --- a/src/projects/create/components/ProjectWizard.jsx +++ b/src/projects/create/components/ProjectWizard.jsx @@ -55,6 +55,7 @@ class ProjectWizard extends Component { // assumes the params.product to be id of a product because incomplete project is set only // after user selects a particular product const product = findProduct(params.product, true) + // load project detais page directly if product of save project and deep link are the same if (product && product.id === incompleteProduct) { wizardStep = WZ_STEP_FILL_PROJ_DETAILS } From fd75dcd7b2664c04ab4729c69596a5a7cb7a1629 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Tue, 10 Oct 2017 18:03:17 +0530 Subject: [PATCH 13/24] =?UTF-8?q?Github=20issue#1235,=20Deep=20link=20does?= =?UTF-8?q?n't=20open=20proper=20page=20if=20a=20project=20was=20not=20com?= =?UTF-8?q?pleted=20and=20user=20clicks=20"Create=20New=20Project"=20?= =?UTF-8?q?=E2=80=94=20Preserving=20the=20project=E2=80=99s=20product=20wh?= =?UTF-8?q?ile=20creating=20new=20project=20from=20incomplete=20project=20?= =?UTF-8?q?screen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create/components/ProjectWizard.jsx | 91 +++++++++++-------- 1 file changed, 52 insertions(+), 39 deletions(-) diff --git a/src/projects/create/components/ProjectWizard.jsx b/src/projects/create/components/ProjectWizard.jsx index 89436b4c8..58f8becc4 100644 --- a/src/projects/create/components/ProjectWizard.jsx +++ b/src/projects/create/components/ProjectWizard.jsx @@ -40,6 +40,7 @@ class ProjectWizard extends Component { this.handleStepChange = this.handleStepChange.bind(this) this.restoreCommonDetails = this.restoreCommonDetails.bind(this) this.handleWizardCancel = this.handleWizardCancel.bind(this) + this.loadProjectAndProductFromURL = this.loadProjectAndProductFromURL.bind(this) } componentDidMount() { @@ -48,16 +49,21 @@ class ProjectWizard extends Component { const incompleteProjectStr = window.localStorage.getItem(LS_INCOMPLETE_PROJECT) if(incompleteProjectStr) { const incompleteProject = JSON.parse(incompleteProjectStr) - // const incompleteProjectType = _.get(incompleteProject, 'type') const incompleteProduct = _.get(incompleteProject, 'details.products[0]') let wizardStep = WZ_STEP_INCOMP_PROJ_CONF if (incompleteProduct && params && params.product) { // assumes the params.product to be id of a product because incomplete project is set only // after user selects a particular product const product = findProduct(params.product, true) - // load project detais page directly if product of save project and deep link are the same - if (product && product.id === incompleteProduct) { - wizardStep = WZ_STEP_FILL_PROJ_DETAILS + if (product) { + // load project detais page directly if product of save project and deep link are the same + if (product.id === incompleteProduct) { + wizardStep = WZ_STEP_FILL_PROJ_DETAILS + } else { // for different product type, update local state with URL params + const projectType = findProductCategory(params.product) + _.set(incompleteProject, 'type', projectType.id) + _.set(incompleteProject, 'details.products[0]', product.id) + } } } this.setState({ @@ -73,20 +79,7 @@ class ProjectWizard extends Component { const updateQuery = {} let wizardStep = WZ_STEP_SELECT_PROJ_TYPE if (params && params.product) { - // first try the path param to be a project category - let projectType = findCategory(params.product, true) - if (projectType) {// if its a category - updateQuery['type'] = { $set : projectType.id } - wizardStep = WZ_STEP_SELECT_PROD_TYPE - } else { - // if it is not a category, it should be a product and we should be able to find a category for it - projectType = findProductCategory(params.product, true) - // finds product object from product alias - const product = findProduct(params.product, true) - updateQuery['type'] = { $set : projectType.id } - updateQuery['details'] = { products : { $set: [product.id] } } - wizardStep = WZ_STEP_FILL_PROJ_DETAILS - } + wizardStep = this.loadProjectAndProductFromURL(params.product, updateQuery) } // retrieve refCode from query param // TODO give warning after truncating @@ -118,22 +111,7 @@ class ProjectWizard extends Component { let wizardStep = type && product ? WZ_STEP_FILL_PROJ_DETAILS : null const updateQuery = {} if (params && params.product) { // if there exists product path param - // first try the path param to be a project category - let projectType = findCategory(params.product, true) - if (projectType) {// if its a category - updateQuery['type'] = { $set : projectType.id } - wizardStep = WZ_STEP_SELECT_PROD_TYPE - } else { - // if it is not a category, it should be a product and we should be able to find a category for it - projectType = findProductCategory(params.product, true) - // finds product object from product alias - const product = findProduct(params.product, true) - if (projectType) {// we can have `incomplete` as params.product - updateQuery['type'] = { $set : projectType.id } - updateQuery['details'] = { products : { $set: [product.id] } } - wizardStep = WZ_STEP_FILL_PROJ_DETAILS - } - } + wizardStep = this.loadProjectAndProductFromURL(params.product, updateQuery) } else { // if there is not product path param, it should be first step of the wizard updateQuery['type'] = { $set : null } updateQuery['details'] = { products : { $set: [] } } @@ -151,6 +129,33 @@ class ProjectWizard extends Component { } } + /** + * Loads project type and product from the given URL parameter. + * + * @param {string} urlParam URL parameter value which represents either project type or product + * @param {object} updateQuery query object which would be updated according to parsed project type and product + * + * @return {number} step where wizard should move after parsing the URL param + */ + loadProjectAndProductFromURL(urlParam, updateQuery) { + // first try the path param to be a project category + let projectType = findCategory(urlParam, true) + if (projectType) {// if its a category + updateQuery['type'] = { $set : projectType.id } + return WZ_STEP_SELECT_PROD_TYPE + } else { + // if it is not a category, it should be a product and we should be able to find a category for it + projectType = findProductCategory(urlParam, true) + // finds product object from product alias + const product = findProduct(urlParam, true) + if (projectType) {// we can have `incomplete` as params.product + updateQuery['type'] = { $set : projectType.id } + updateQuery['details'] = { products : { $set: [product.id] } } + return WZ_STEP_FILL_PROJ_DETAILS + } + } + } + /** * Loads incomplete project from the local storage and populates the state from that project. * It also moves the wizard to the project details step if there exists an incomplete project. @@ -175,14 +180,22 @@ class ProjectWizard extends Component { * Removed incomplete project from the local storage and resets the state. Also, moves wizard to the first step. */ removeIncompleteProject() { - const { onStepChange } = this.props + const { onStepChange, params, onProjectUpdate } = this.props + // remove incomplete project from local storage window.localStorage.removeItem(LS_INCOMPLETE_PROJECT) + const projectType = _.get(this.state.project, 'type') + const product = _.get(this.state.project, 'details.products[0]') + let wizardStep = WZ_STEP_SELECT_PROJ_TYPE + if (product) { + wizardStep = WZ_STEP_FILL_PROJ_DETAILS + } else if (projectType) { + wizardStep = WZ_STEP_SELECT_PROD_TYPE + } this.setState({ - project: { details: {} }, - dirtyProject: { details: {} }, - wizardStep: WZ_STEP_SELECT_PROJ_TYPE + wizardStep: wizardStep }, () => { - typeof onStepChange === 'function' && onStepChange(this.state.wizardStep) + typeof onProjectUpdate === 'function' && onProjectUpdate(this.state.dirtyProject, true) + typeof onStepChange === 'function' && onStepChange(this.state.wizardStep, this.state.project) }) } From 16f6985f7ecab5558895dd8dbbdd9d1068ee7406 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 11:47:53 +0530 Subject: [PATCH 14/24] Fixed lint error --- src/projects/create/components/ProjectWizard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/projects/create/components/ProjectWizard.jsx b/src/projects/create/components/ProjectWizard.jsx index 58f8becc4..e2e4a0526 100644 --- a/src/projects/create/components/ProjectWizard.jsx +++ b/src/projects/create/components/ProjectWizard.jsx @@ -180,7 +180,7 @@ class ProjectWizard extends Component { * Removed incomplete project from the local storage and resets the state. Also, moves wizard to the first step. */ removeIncompleteProject() { - const { onStepChange, params, onProjectUpdate } = this.props + const { onStepChange, onProjectUpdate } = this.props // remove incomplete project from local storage window.localStorage.removeItem(LS_INCOMPLETE_PROJECT) const projectType = _.get(this.state.project, 'type') From 60a7a0acb4c21fb9598510ff0b118fb1b4724a69 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 17:55:51 +0530 Subject: [PATCH 15/24] =?UTF-8?q?Github=20issue#1234,=20Functions=20of=20t?= =?UTF-8?q?he=20"Connect=20Logo",=20"Back",=20"Esc"=20buttons=20in=20logge?= =?UTF-8?q?d=20in=20and=20logged=20out=20states=20Github=20issue#1035,=20U?= =?UTF-8?q?RL=20does=20not=20change=20when=20selecting=20project=20from=20?= =?UTF-8?q?"New=20Project"=20page=20=E2=80=94=20Removed=20modal=20view=20o?= =?UTF-8?q?f=20create=20project=20wizard=20for=20logged=20in=20user.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TopBar/ProjectsToolBar.js | 73 ++----------------- .../create/containers/CreateContainer.jsx | 13 ++++ 2 files changed, 18 insertions(+), 68 deletions(-) diff --git a/src/components/TopBar/ProjectsToolBar.js b/src/components/TopBar/ProjectsToolBar.js index 19c208fb2..2c2d26b15 100644 --- a/src/components/TopBar/ProjectsToolBar.js +++ b/src/components/TopBar/ProjectsToolBar.js @@ -1,19 +1,16 @@ require('./ProjectsToolBar.scss') import React, {PropTypes, Component} from 'react' +import { Link } from 'react-router' import { connect } from 'react-redux' import cn from 'classnames' import _ from 'lodash' -import Modal from 'react-modal' import { SearchBar } from 'appirio-tech-react-components' import Filters from './Filters' -import ModalControl from '../ModalControl' import SVGIconImage from '../SVGIconImage' import CoderBot from '../CoderBot/CoderBot' -import ProjectWizard from '../../projects/create/components/ProjectWizard' -import { createProjectWithStatus as createProjectAction } from '../../projects/actions/project' import { projectSuggestions, loadProjects } from '../../projects/actions/loadProjects' import { ROLE_CONNECT_COPILOT, @@ -28,18 +25,14 @@ class ProjectsToolBar extends Component { constructor(props) { super(props) this.state = { - isCreateProjectModalVisible : false, errorCreatingProject: false, isFilterVisible: false } this.applyFilters = this.applyFilters.bind(this) this.toggleFilter = this.toggleFilter.bind(this) - this.showCreateProjectDialog = this.showCreateProjectDialog.bind(this) - this.hideCreateProjectDialog = this.hideCreateProjectDialog.bind(this) this.handleTermChange = this.handleTermChange.bind(this) this.handleSearch = this.handleSearch.bind(this) this.handleMyProjectsFilter = this.handleMyProjectsFilter.bind(this) - this.createProject = this.createProject.bind(this) this.onLeave = this.onLeave.bind(this) } @@ -51,7 +44,6 @@ class ProjectsToolBar extends Component { this.setState({ isProjectDirty : false }, () => { - this.hideCreateProjectDialog() this.props.router.push('/projects/' + nextProps.project.id) }) } else { @@ -103,26 +95,6 @@ class ProjectsToolBar extends Component { this.applyFilters({memberOnly: event.target.checked}) } - showCreateProjectDialog() { - this.setState({ - isCreateProjectModalVisible : true - }) - } - - hideCreateProjectDialog() { - let confirm = true - if (this.state.isProjectDirty) { - confirm = window.confirm('You have unsaved changes. Are you sure you want to leave?') - } - if (confirm === true) { - this.setState({ - isProjectDirty: false, - isCreateProjectModalVisible : false, - errorCreatingProject: false - }) - } - } - applyFilters(filter) { const criteria = _.assign({}, this.props.criteria, filter) if (criteria && criteria.keyword) { @@ -155,62 +127,27 @@ class ProjectsToolBar extends Component { this.props.loadProjects(criteria, page) } - createProject(project) { - this.props.createProjectAction(project, PROJECT_STATUS_IN_REVIEW) - } - shouldComponentUpdate(nextProps, nextState) { const { user, criteria, creatingProject, projectCreationError, searchTermTag } = this.props - const { isCreateProjectModalVisible, errorCreatingProject, isFilterVisible } = this.state + const { errorCreatingProject, isFilterVisible } = this.state return nextProps.user.handle !== user.handle || JSON.stringify(nextProps.criteria) !== JSON.stringify(criteria) || nextProps.creatingProject !== creatingProject || nextProps.projectCreationError !== projectCreationError || nextProps.searchTermTag !== searchTermTag - || nextState.isCreateProjectModalVisible !== isCreateProjectModalVisible || nextState.errorCreatingProject !== errorCreatingProject || nextState.isFilterVisible !== isFilterVisible } render() { const { logo, userMenu, userRoles, criteria, isPowerUser } = this.props - const { isCreateProjectModalVisible, errorCreatingProject, isFilterVisible } = this.state + const { errorCreatingProject, isFilterVisible } = this.state const isLoggedIn = userRoles && userRoles.length const noOfFilters = _.keys(criteria).length - 1 // -1 for default sort criteria return (
- - } - label="esc" - onClick={ this.hideCreateProjectDialog } - /> - { !errorCreatingProject && - { - this.setState({ - isProjectDirty: dirty - }) - } - } - /> - } - { errorCreatingProject && } -
{ logo } { @@ -240,7 +177,7 @@ class ProjectsToolBar extends Component { { !!isLoggedIn &&
- + New Project + + New Project
} { userMenu } @@ -289,6 +226,6 @@ const mapStateToProps = ({ projectSearchSuggestions, searchTerm, projectSearch, } } -const actionsToBind = { projectSuggestions, loadProjects, createProjectAction } +const actionsToBind = { projectSuggestions, loadProjects } export default connect(mapStateToProps, actionsToBind)(ProjectsToolBar) \ No newline at end of file diff --git a/src/projects/create/containers/CreateContainer.jsx b/src/projects/create/containers/CreateContainer.jsx index a73cb8a1f..45ebb3c80 100644 --- a/src/projects/create/containers/CreateContainer.jsx +++ b/src/projects/create/containers/CreateContainer.jsx @@ -58,6 +58,7 @@ class CreateConainer extends React.Component { } this.createProject = this.createProject.bind(this) this.onLeave = this.onLeave.bind(this) + this.closeWizard = this.closeWizard.bind(this) } componentWillReceiveProps(nextProps) { @@ -139,12 +140,24 @@ class CreateConainer extends React.Component { }) } + closeWizard() { + const { userRoles } = this.props + const isLoggedIn = userRoles && userRoles.length > 0 + if (isLoggedIn) { + this.props.router.push("/projects") + } else { + this.props.router.push("/") + } + } + render() { return ( { // type of the project let projectType = _.get(updatedProject, 'type', null) From 4b450371e56fbe06f3ddfe9a430e1734d7c99d16 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 18:01:22 +0530 Subject: [PATCH 16/24] Fixed bug around handling incomplete project screen and its after steps after changes for GitHub issues#1235,1104,1035 --- src/components/TopBar/ProjectsToolBar.js | 8 +--- .../create/components/ProjectWizard.jsx | 46 ++++++++++++------- .../create/containers/CreateContainer.jsx | 10 ++-- src/routes.jsx | 2 +- 4 files changed, 38 insertions(+), 28 deletions(-) diff --git a/src/components/TopBar/ProjectsToolBar.js b/src/components/TopBar/ProjectsToolBar.js index 2c2d26b15..0b96c8c8d 100644 --- a/src/components/TopBar/ProjectsToolBar.js +++ b/src/components/TopBar/ProjectsToolBar.js @@ -8,15 +8,11 @@ import _ from 'lodash' import { SearchBar } from 'appirio-tech-react-components' import Filters from './Filters' -import SVGIconImage from '../SVGIconImage' -import CoderBot from '../CoderBot/CoderBot' - import { projectSuggestions, loadProjects } from '../../projects/actions/loadProjects' import { ROLE_CONNECT_COPILOT, ROLE_CONNECT_MANAGER, - ROLE_ADMINISTRATOR, - PROJECT_STATUS_IN_REVIEW + ROLE_ADMINISTRATOR } from '../../config/constants' @@ -141,7 +137,7 @@ class ProjectsToolBar extends Component { render() { const { logo, userMenu, userRoles, criteria, isPowerUser } = this.props - const { errorCreatingProject, isFilterVisible } = this.state + const { isFilterVisible } = this.state const isLoggedIn = userRoles && userRoles.length const noOfFilters = _.keys(criteria).length - 1 // -1 for default sort criteria diff --git a/src/projects/create/components/ProjectWizard.jsx b/src/projects/create/components/ProjectWizard.jsx index e2e4a0526..7e8975e8c 100644 --- a/src/projects/create/components/ProjectWizard.jsx +++ b/src/projects/create/components/ProjectWizard.jsx @@ -51,6 +51,7 @@ class ProjectWizard extends Component { const incompleteProject = JSON.parse(incompleteProjectStr) const incompleteProduct = _.get(incompleteProject, 'details.products[0]') let wizardStep = WZ_STEP_INCOMP_PROJ_CONF + let updateQuery = {} if (incompleteProduct && params && params.product) { // assumes the params.product to be id of a product because incomplete project is set only // after user selects a particular product @@ -59,20 +60,21 @@ class ProjectWizard extends Component { // load project detais page directly if product of save project and deep link are the same if (product.id === incompleteProduct) { wizardStep = WZ_STEP_FILL_PROJ_DETAILS - } else { // for different product type, update local state with URL params - const projectType = findProductCategory(params.product) - _.set(incompleteProject, 'type', projectType.id) - _.set(incompleteProject, 'details.products[0]', product.id) + updateQuery = {$merge : incompleteProject} + } else { + // explicitly ignores the wizardStep returned by the method + // we need to call this method just to get updateQuery updated with correct project type and product + this.loadProjectAndProductFromURL(params, updateQuery) } } } this.setState({ - project: update(this.state.project, {$merge : incompleteProject}), - dirtyProject: update(this.state.dirtyProject, {$merge : incompleteProject}), - wizardStep: wizardStep, + project: update(this.state.project, updateQuery), + dirtyProject: update(this.state.dirtyProject, updateQuery), + wizardStep, isProjectDirty: false }, () => { - typeof onStepChange === 'function' && onStepChange(this.state.wizardStep) + typeof onStepChange === 'function' && onStepChange(this.state.wizardStep, this.state.project) }) } else { // if there is no incomplete project in the local storage, load the wizard with appropriate step @@ -111,7 +113,7 @@ class ProjectWizard extends Component { let wizardStep = type && product ? WZ_STEP_FILL_PROJ_DETAILS : null const updateQuery = {} if (params && params.product) { // if there exists product path param - wizardStep = this.loadProjectAndProductFromURL(params.product, updateQuery) + wizardStep = this.loadProjectAndProductFromURL(params, updateQuery) } else { // if there is not product path param, it should be first step of the wizard updateQuery['type'] = { $set : null } updateQuery['details'] = { products : { $set: [] } } @@ -132,22 +134,28 @@ class ProjectWizard extends Component { /** * Loads project type and product from the given URL parameter. * - * @param {string} urlParam URL parameter value which represents either project type or product + * @param {object} urlParams URL parameters map * @param {object} updateQuery query object which would be updated according to parsed project type and product * * @return {number} step where wizard should move after parsing the URL param */ - loadProjectAndProductFromURL(urlParam, updateQuery) { + loadProjectAndProductFromURL(urlParams, updateQuery) { + const productParam = urlParams && urlParams.product + const statusParam = urlParams && urlParams.status + if ('incomplete' === statusParam) { + return WZ_STEP_INCOMP_PROJ_CONF + } + if (!productParam) return // first try the path param to be a project category - let projectType = findCategory(urlParam, true) + let projectType = findCategory(productParam, true) if (projectType) {// if its a category updateQuery['type'] = { $set : projectType.id } return WZ_STEP_SELECT_PROD_TYPE } else { // if it is not a category, it should be a product and we should be able to find a category for it - projectType = findProductCategory(urlParam, true) + projectType = findProductCategory(productParam, true) // finds product object from product alias - const product = findProduct(urlParam, true) + const product = findProduct(productParam, true) if (projectType) {// we can have `incomplete` as params.product updateQuery['type'] = { $set : projectType.id } updateQuery['details'] = { products : { $set: [product.id] } } @@ -180,21 +188,25 @@ class ProjectWizard extends Component { * Removed incomplete project from the local storage and resets the state. Also, moves wizard to the first step. */ removeIncompleteProject() { - const { onStepChange, onProjectUpdate } = this.props + const { onStepChange } = this.props // remove incomplete project from local storage window.localStorage.removeItem(LS_INCOMPLETE_PROJECT) const projectType = _.get(this.state.project, 'type') const product = _.get(this.state.project, 'details.products[0]') let wizardStep = WZ_STEP_SELECT_PROJ_TYPE + let project = null if (product) { + project = { type: projectType, details: { products: [product] } } wizardStep = WZ_STEP_FILL_PROJ_DETAILS } else if (projectType) { + project = { type: projectType, details: { products: [] } } wizardStep = WZ_STEP_SELECT_PROD_TYPE } this.setState({ - wizardStep: wizardStep + project: _.merge({}, project), + dirtyProject: _.merge({}, project), + wizardStep }, () => { - typeof onProjectUpdate === 'function' && onProjectUpdate(this.state.dirtyProject, true) typeof onStepChange === 'function' && onStepChange(this.state.wizardStep, this.state.project) }) } diff --git a/src/projects/create/containers/CreateContainer.jsx b/src/projects/create/containers/CreateContainer.jsx index 45ebb3c80..a11dd3d8d 100644 --- a/src/projects/create/containers/CreateContainer.jsx +++ b/src/projects/create/containers/CreateContainer.jsx @@ -144,9 +144,9 @@ class CreateConainer extends React.Component { const { userRoles } = this.props const isLoggedIn = userRoles && userRoles.length > 0 if (isLoggedIn) { - this.props.router.push("/projects") + this.props.router.push('/projects') } else { - this.props.router.push("/") + this.props.router.push('/') } } @@ -156,7 +156,7 @@ class CreateConainer extends React.Component { {...this.props} createProject={ this.createProject } processing={ this.state.creatingProject } - showModal={true} + showModal closeModal={ this.closeWizard } onStepChange={ (wizardStep, updatedProject) => { // type of the project @@ -172,7 +172,9 @@ class CreateConainer extends React.Component { // updates the productType variable to use first alias to create SEO friendly URL productType = _.get(product, 'aliases[0]', productType) if (wizardStep === ProjectWizard.Steps.WZ_STEP_INCOMP_PROJ_CONF) { - browserHistory.push(NEW_PROJECT_PATH + '/incomplete') + let productUrl = productType ? ('/' + productType) : '' + productUrl = !productType && projectType ? ('/' + projectType) : productUrl + browserHistory.push(NEW_PROJECT_PATH + productUrl + '/incomplete') } if (wizardStep === ProjectWizard.Steps.WZ_STEP_SELECT_PROJ_TYPE) { browserHistory.push(NEW_PROJECT_PATH + '/' + window.location.search) diff --git a/src/routes.jsx b/src/routes.jsx index b12262b26..3d23a7032 100644 --- a/src/routes.jsx +++ b/src/routes.jsx @@ -104,7 +104,7 @@ const renderTopBarWithProjectsToolBar = (props) => window.scrollTo(0, 0)} component={ App } onEnter={ redirectToConnect }> - + From 8f3e76c9b0827b4e6649dbf508ee93a1a1aa8a88 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 18:01:31 +0530 Subject: [PATCH 17/24] Linting --- src/config/projectWizard/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/projectWizard/index.js b/src/config/projectWizard/index.js index c2f99f994..b9b0d3845 100644 --- a/src/config/projectWizard/index.js +++ b/src/config/projectWizard/index.js @@ -116,7 +116,7 @@ const products = { details: 'Translate designs to a web (HTML/CSS/JavaScript) or mobile prototype', icon: 'product-dev-prototype', id: 'visual_prototype', - aliases: ['visual-prototype','visual_prototype'], + aliases: ['visual-prototype', 'visual_prototype'], disabled: true }, 'Front-end': { From 8719188cd6cad8eb2713ac4e1a256268de4e0fc7 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 18:05:32 +0530 Subject: [PATCH 18/24] =?UTF-8?q?Github=20issue#1234,=20Functions=20of=20t?= =?UTF-8?q?he=20"Connect=20Logo",=20"Back",=20"Esc"=20buttons=20in=20logge?= =?UTF-8?q?d=20in=20and=20logged=20out=20states=20=E2=80=94=20Saving=20inc?= =?UTF-8?q?omplete=20project=20when=20user=20clicks=20close=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/projects/create/containers/CreateContainer.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/projects/create/containers/CreateContainer.jsx b/src/projects/create/containers/CreateContainer.jsx index a11dd3d8d..47f243ede 100644 --- a/src/projects/create/containers/CreateContainer.jsx +++ b/src/projects/create/containers/CreateContainer.jsx @@ -143,6 +143,8 @@ class CreateConainer extends React.Component { closeWizard() { const { userRoles } = this.props const isLoggedIn = userRoles && userRoles.length > 0 + // calls leave handler + this.onLeave() if (isLoggedIn) { this.props.router.push('/projects') } else { From 79031080cef02710341fd25dd7837b740c304c5e Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 20:35:35 +0530 Subject: [PATCH 19/24] =?UTF-8?q?Github=20issue#1234,=20Functions=20of=20t?= =?UTF-8?q?he=20"Connect=20Logo",=20"Back",=20"Esc"=20buttons=20in=20logge?= =?UTF-8?q?d=20in=20and=20logged=20out=20states=20=E2=80=94=20Fixed=20Logo?= =?UTF-8?q?,=20Back=20and=20Close=20buttons=20for=20both=20logged=20in=20a?= =?UTF-8?q?nd=20logged=20out=20views?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/projects/create/components/FillProjectDetails.js | 2 -- .../create/components/IncompleteProjectConfirmation.js | 2 +- src/projects/create/components/ProjectWizard.jsx | 2 +- src/projects/create/components/SelectProduct.js | 2 -- src/projects/create/components/SelectProjectType.jsx | 2 +- src/projects/create/components/_layout.scss | 1 + src/projects/create/containers/CreateContainer.jsx | 4 +++- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/projects/create/components/FillProjectDetails.js b/src/projects/create/components/FillProjectDetails.js index 50c8812fb..0f7092dc8 100644 --- a/src/projects/create/components/FillProjectDetails.js +++ b/src/projects/create/components/FillProjectDetails.js @@ -49,8 +49,6 @@ class FillProjectDetails extends Component { return (
- { !isLoggedIn && } - { !isLoggedIn && }
diff --git a/src/projects/create/components/IncompleteProjectConfirmation.js b/src/projects/create/components/IncompleteProjectConfirmation.js index def957993..c5d8dfd53 100644 --- a/src/projects/create/components/IncompleteProjectConfirmation.js +++ b/src/projects/create/components/IncompleteProjectConfirmation.js @@ -9,7 +9,7 @@ function IncompleteProjectConfirmation({ loadIncompleteProject, removeIncomplete return (
- { !isLoggedIn && } +

Welcome back!

You started a project with us recently.
diff --git a/src/projects/create/components/ProjectWizard.jsx b/src/projects/create/components/ProjectWizard.jsx index 7e8975e8c..4877f328b 100644 --- a/src/projects/create/components/ProjectWizard.jsx +++ b/src/projects/create/components/ProjectWizard.jsx @@ -385,7 +385,7 @@ class ProjectWizard extends Component { onCancel={this.handleWizardCancel} onStepChange={ this.handleStepChange } step={this.state.wizardStep} - shouldRenderBackButton={ (step) => userRoles && userRoles.length && step > 1 } + shouldRenderBackButton={ (step) => step > 1 } >
- { !isLoggedIn && } - { !isLoggedIn && }

{ projectCategory.name } projects

diff --git a/src/projects/create/components/SelectProjectType.jsx b/src/projects/create/components/SelectProjectType.jsx index 3416ef93f..7c1a9893c 100644 --- a/src/projects/create/components/SelectProjectType.jsx +++ b/src/projects/create/components/SelectProjectType.jsx @@ -32,7 +32,7 @@ function SelectProjectType(props) { return (
- { !isLoggedIn && } +

Create a new project

diff --git a/src/projects/create/components/_layout.scss b/src/projects/create/components/_layout.scss index 320b60835..a170190ab 100644 --- a/src/projects/create/components/_layout.scss +++ b/src/projects/create/components/_layout.scss @@ -29,6 +29,7 @@ $minimumPageWidth: 984px; display: flex; justify-content: space-between; margin: 20px 0 0; + height: 43px; button { align-self: flex-start; diff --git a/src/projects/create/containers/CreateContainer.jsx b/src/projects/create/containers/CreateContainer.jsx index 47f243ede..18cd551c5 100644 --- a/src/projects/create/containers/CreateContainer.jsx +++ b/src/projects/create/containers/CreateContainer.jsx @@ -148,7 +148,9 @@ class CreateConainer extends React.Component { if (isLoggedIn) { this.props.router.push('/projects') } else { - this.props.router.push('/') + // this.props.router.push('/') + // FIXME ideally we should push on router + window.location = window.location.origin } } From 0d86ada4b7097a196b67db45a2b92cfc7a90e9e6 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 20:42:06 +0530 Subject: [PATCH 20/24] =?UTF-8?q?Github=20issue#1234,=20Functions=20of=20t?= =?UTF-8?q?he=20"Connect=20Logo",=20"Back",=20"Esc"=20buttons=20in=20logge?= =?UTF-8?q?d=20in=20and=20logged=20out=20states=20=E2=80=94=20Removed=20li?= =?UTF-8?q?nk=20from=20the=20logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../create/components/IncompleteProjectConfirmation.js | 4 +--- src/projects/create/components/SelectProjectType.jsx | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/projects/create/components/IncompleteProjectConfirmation.js b/src/projects/create/components/IncompleteProjectConfirmation.js index c5d8dfd53..31b7ae4bc 100644 --- a/src/projects/create/components/IncompleteProjectConfirmation.js +++ b/src/projects/create/components/IncompleteProjectConfirmation.js @@ -1,15 +1,13 @@ import React, { PropTypes as PT } from 'react' -import { Link } from 'react-router' import SVGIconImage from '../../../components/SVGIconImage' import './IncompleteProjectConfirmation.scss' function IncompleteProjectConfirmation({ loadIncompleteProject, removeIncompleteProject, userRoles }) { const isLoggedIn = userRoles && userRoles.length - const logoTargetUrl = isLoggedIn ? '/projects' : '/' return (
- +

Welcome back!

You started a project with us recently.
diff --git a/src/projects/create/components/SelectProjectType.jsx b/src/projects/create/components/SelectProjectType.jsx index 7c1a9893c..478534543 100644 --- a/src/projects/create/components/SelectProjectType.jsx +++ b/src/projects/create/components/SelectProjectType.jsx @@ -1,5 +1,4 @@ import React, { PropTypes as PT } from 'react' -import { Link } from 'react-router' import config from '../../../config/projectWizard' import ProjectTypeCard from './ProjectTypeCard' import SVGIconImage from '../../../components/SVGIconImage' @@ -32,7 +31,7 @@ function SelectProjectType(props) { return (
- +

Create a new project

From f7c78ac096299445c560432bf4f605aff6c6f1ff Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 20:48:46 +0530 Subject: [PATCH 21/24] Fixed lint errors --- src/projects/create/components/FillProjectDetails.js | 3 --- .../create/components/IncompleteProjectConfirmation.js | 2 +- src/projects/create/components/SelectProduct.js | 4 +--- src/projects/create/components/SelectProjectType.jsx | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/projects/create/components/FillProjectDetails.js b/src/projects/create/components/FillProjectDetails.js index 0f7092dc8..514f6d077 100644 --- a/src/projects/create/components/FillProjectDetails.js +++ b/src/projects/create/components/FillProjectDetails.js @@ -1,10 +1,8 @@ import _ from 'lodash' import React, { PropTypes as PT, Component } from 'react' -import { Link } from 'react-router' import Sticky from 'react-stickynode' import config from '../../../config/projectWizard' -import SVGIconImage from '../../../components/SVGIconImage' import './FillProjectDetails.scss' import ProjectBasicDetailsForm from '../components/ProjectBasicDetailsForm' import ProjectOutline from '../components/ProjectOutline' @@ -36,7 +34,6 @@ class FillProjectDetails extends Component { render() { const { project, dirtyProject, processing, submitBtnText, userRoles } = this.props const isLoggedIn = userRoles && userRoles.length - const logoTargetUrl = isLoggedIn ? '/projects' : '/' const product = _.get(project, 'details.products[0]') const projectTypeId = _.get(project, 'type') const subConfig = config[_.findKey(config, {id : projectTypeId})] diff --git a/src/projects/create/components/IncompleteProjectConfirmation.js b/src/projects/create/components/IncompleteProjectConfirmation.js index 31b7ae4bc..8273f30da 100644 --- a/src/projects/create/components/IncompleteProjectConfirmation.js +++ b/src/projects/create/components/IncompleteProjectConfirmation.js @@ -3,7 +3,7 @@ import SVGIconImage from '../../../components/SVGIconImage' import './IncompleteProjectConfirmation.scss' function IncompleteProjectConfirmation({ loadIncompleteProject, removeIncompleteProject, userRoles }) { - const isLoggedIn = userRoles && userRoles.length + // const isLoggedIn = userRoles && userRoles.length return (
diff --git a/src/projects/create/components/SelectProduct.js b/src/projects/create/components/SelectProduct.js index a40464d55..ac426eac5 100644 --- a/src/projects/create/components/SelectProduct.js +++ b/src/projects/create/components/SelectProduct.js @@ -1,5 +1,4 @@ import React, { PropTypes as PT } from 'react' -import { Link } from 'react-router' import config from '../../../config/projectWizard' import ProductCard from './ProductCard' import SVGIconImage from '../../../components/SVGIconImage' @@ -7,9 +6,8 @@ import { findCategory } from '../../../config/projectWizard' import './SelectProduct.scss' function SelectProduct(props) { - const { userRoles, projectType, onChangeProjectType } = props + const { userRoles, projectType } = props const isLoggedIn = userRoles && userRoles.length - const logoTargetUrl = isLoggedIn ? '/projects' : '/' const cards = [] for (const key in config) { const type = config[key] diff --git a/src/projects/create/components/SelectProjectType.jsx b/src/projects/create/components/SelectProjectType.jsx index 478534543..10ccfcda8 100644 --- a/src/projects/create/components/SelectProjectType.jsx +++ b/src/projects/create/components/SelectProjectType.jsx @@ -8,7 +8,7 @@ import './SelectProjectType.scss' function SelectProjectType(props) { const { userRoles } = props const isLoggedIn = userRoles && userRoles.length - const logoTargetUrl = isLoggedIn ? '/projects' : '/' + // const logoTargetUrl = isLoggedIn ? '/projects' : '/' const cards = [] for (const key in config) { const item = config[key] From efb75c7b525f08818ea532b79820a7a48781ff4e Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Wed, 11 Oct 2017 20:51:03 +0530 Subject: [PATCH 22/24] More linting --- src/projects/create/components/FillProjectDetails.js | 3 +-- .../create/components/IncompleteProjectConfirmation.js | 2 +- src/projects/create/components/SelectProduct.js | 3 +-- src/projects/create/components/SelectProjectType.jsx | 3 --- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/projects/create/components/FillProjectDetails.js b/src/projects/create/components/FillProjectDetails.js index 514f6d077..c472c4ab7 100644 --- a/src/projects/create/components/FillProjectDetails.js +++ b/src/projects/create/components/FillProjectDetails.js @@ -32,8 +32,7 @@ class FillProjectDetails extends Component { } render() { - const { project, dirtyProject, processing, submitBtnText, userRoles } = this.props - const isLoggedIn = userRoles && userRoles.length + const { project, dirtyProject, processing, submitBtnText } = this.props const product = _.get(project, 'details.products[0]') const projectTypeId = _.get(project, 'type') const subConfig = config[_.findKey(config, {id : projectTypeId})] diff --git a/src/projects/create/components/IncompleteProjectConfirmation.js b/src/projects/create/components/IncompleteProjectConfirmation.js index 8273f30da..b94fc4c33 100644 --- a/src/projects/create/components/IncompleteProjectConfirmation.js +++ b/src/projects/create/components/IncompleteProjectConfirmation.js @@ -2,7 +2,7 @@ import React, { PropTypes as PT } from 'react' import SVGIconImage from '../../../components/SVGIconImage' import './IncompleteProjectConfirmation.scss' -function IncompleteProjectConfirmation({ loadIncompleteProject, removeIncompleteProject, userRoles }) { +function IncompleteProjectConfirmation({ loadIncompleteProject, removeIncompleteProject }) { // const isLoggedIn = userRoles && userRoles.length return (
diff --git a/src/projects/create/components/SelectProduct.js b/src/projects/create/components/SelectProduct.js index ac426eac5..fdfeff4bb 100644 --- a/src/projects/create/components/SelectProduct.js +++ b/src/projects/create/components/SelectProduct.js @@ -6,8 +6,7 @@ import { findCategory } from '../../../config/projectWizard' import './SelectProduct.scss' function SelectProduct(props) { - const { userRoles, projectType } = props - const isLoggedIn = userRoles && userRoles.length + const { projectType } = props const cards = [] for (const key in config) { const type = config[key] diff --git a/src/projects/create/components/SelectProjectType.jsx b/src/projects/create/components/SelectProjectType.jsx index 10ccfcda8..f4104b8d5 100644 --- a/src/projects/create/components/SelectProjectType.jsx +++ b/src/projects/create/components/SelectProjectType.jsx @@ -6,9 +6,6 @@ import { findProductsOfCategory } from '../../../config/projectWizard' import './SelectProjectType.scss' function SelectProjectType(props) { - const { userRoles } = props - const isLoggedIn = userRoles && userRoles.length - // const logoTargetUrl = isLoggedIn ? '/projects' : '/' const cards = [] for (const key in config) { const item = config[key] From 047e456e9e354155a367bab85d0c954038ec106d Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Fri, 13 Oct 2017 14:56:28 +0530 Subject: [PATCH 23/24] =?UTF-8?q?Github=20issue#1263,=20Blank=20screen=20s?= =?UTF-8?q?hown=20momentarily=20while=20project=20is=20being=20created=20?= =?UTF-8?q?=E2=80=94=20Fixed=20the=20screen=20so=20that=20it=20now=20shows?= =?UTF-8?q?=20the=20loading=20spinner=20to=20give=20some=20feedback=20to?= =?UTF-8?q?=20user=20that=20something=20is=20happening.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LoadingIndicator/LoadingIndicator.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/LoadingIndicator/LoadingIndicator.scss b/src/components/LoadingIndicator/LoadingIndicator.scss index 41d87fd7e..c34c7ad9c 100644 --- a/src/components/LoadingIndicator/LoadingIndicator.scss +++ b/src/components/LoadingIndicator/LoadingIndicator.scss @@ -1,6 +1,8 @@ .loading-indicator { height: 80%; width: 100%; + min-height: 70px; + min-width: 70px; background: 50% 50% no-repeat; background-size: 70px 70px; } From 6df5fd33d49d0089064173aebe09af90c92eaf31 Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Fri, 13 Oct 2017 15:46:23 +0530 Subject: [PATCH 24/24] Cleaned up circle config to not deploy feature branch. --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 49752f04d..2084eb9ca 100644 --- a/circle.yml +++ b/circle.yml @@ -19,7 +19,7 @@ compile: deployment: development: - branch: [dev, 'feature/back-forward-button-project-wizard'] + branch: dev owner: appirio-tech commands: - ./deploy.sh DEV