Skip to content

Commit a19b023

Browse files
author
vikasrohit
authored
Merge pull request #1274 from appirio-tech/dev
Release: Project creation flow updates with Mobility Testing product
2 parents 195c2a2 + 22e2aaa commit a19b023

File tree

12 files changed

+490
-20
lines changed

12 files changed

+490
-20
lines changed

npm-shrinkwrap.json

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"history": "^1.17.0",
5555
"html5-uploader": "^0.1.1",
5656
"isomorphic-fetch": "^2.2.1",
57+
"js-cookie": "^2.1.4",
5758
"linkify-it": "^2.0.3",
5859
"lodash": "^4.16.4",
5960
"moment": "^2.14.1",

src/components/SelectDropdown/SelectDropdown.jsx

+13-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,19 @@ class SelectDropdown extends Component {
1212
}
1313

1414
componentWillMount() {
15+
let selectedOption = _.find(this.props.options, (o) => o.value === this.props.value)
16+
if (!selectedOption) {
17+
selectedOption = this.props.options[0]
18+
}
1519
this.setState({
16-
selectedOption: this.props.selectedOption || this.props.options[0]
17-
}, function() {
18-
this.props.setValue(this.state.selectedOption)
19-
})
20+
selectedOption
21+
}/*, function() {
22+
// FIXME intentionally commented because it was causing multiple renders when used in mobility testing template
23+
// Need to further analyze
24+
// It does not seem to add any value either in both of its usage (it is used in App Screens section
25+
// for design projects and in mobility testing projects)
26+
this.props.setValue(this.state.selectedOption.value)
27+
}*/)
2028
}
2129

2230
handleClick(option) {
@@ -25,7 +33,7 @@ class SelectDropdown extends Component {
2533
this.props.onSelect(this.state.selectedOption)
2634
}
2735
})
28-
this.props.setValue(option)
36+
this.props.setValue(option.value)
2937
}
3038

3139
render() {

src/config/constants.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -260,4 +260,8 @@ export const LS_INCOMPLETE_PROJECT = 'incompleteProject'
260260

261261
export const CONNECT_MESSAGE_API_URL = process.env.CONNECT_MESSAGE_API_URL || TC_API_URL
262262

263-
export const NEW_PROJECT_PATH = '/new-project'
263+
export const NEW_PROJECT_PATH = '/new-project'
264+
265+
// Analytics constants
266+
export const GA_CLICK_ID = '_gclid'
267+
export const GA_CLIENT_ID = '_gacid'

0 commit comments

Comments
 (0)