Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
c77db390
Commit
c77db390
authored
Nov 05, 2019
by
picklesrus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Guard calls to componentDidMount with a check for existence.
Fix tag on username step.
parent
30967a30
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
7 deletions
+19
-7
src/components/join-flow/birthdate-step.jsx
src/components/join-flow/birthdate-step.jsx
+3
-1
src/components/join-flow/country-step.jsx
src/components/join-flow/country-step.jsx
+3
-1
src/components/join-flow/email-step.jsx
src/components/join-flow/email-step.jsx
+3
-1
src/components/join-flow/gender-step.jsx
src/components/join-flow/gender-step.jsx
+3
-1
src/components/join-flow/registration-error-step.jsx
src/components/join-flow/registration-error-step.jsx
+3
-1
src/components/join-flow/username-step.jsx
src/components/join-flow/username-step.jsx
+3
-1
test/unit/components/username-step.test.jsx
test/unit/components/username-step.test.jsx
+1
-1
No files found.
src/components/join-flow/birthdate-step.jsx
View file @
c77db390
...
...
@@ -55,7 +55,9 @@ class BirthDateStep extends React.Component {
]);
}
componentDidMount
()
{
this
.
props
.
sendAnalytics
(
'
join-birthdate
'
);
if
(
this
.
props
.
sendAnalytics
)
{
this
.
props
.
sendAnalytics
(
'
join-birthdate
'
);
}
}
validateSelect
(
selection
)
{
...
...
src/components/join-flow/country-step.jsx
View file @
c77db390
...
...
@@ -23,7 +23,9 @@ class CountryStep extends React.Component {
this
.
countryOptions
=
[];
}
componentDidMount
()
{
this
.
props
.
sendAnalytics
(
'
join-country
'
);
if
(
this
.
props
.
sendAnalytics
)
{
this
.
props
.
sendAnalytics
(
'
join-country
'
);
}
this
.
setCountryOptions
();
}
setCountryOptions
()
{
...
...
src/components/join-flow/email-step.jsx
View file @
c77db390
...
...
@@ -35,7 +35,9 @@ class EmailStep extends React.Component {
this
.
emailRemoteCache
=
{};
}
componentDidMount
()
{
this
.
props
.
sendAnalytics
(
'
join-email
'
);
if
(
this
.
props
.
sendAnalytics
)
{
this
.
props
.
sendAnalytics
(
'
join-email
'
);
}
// automatically start with focus on username field
if
(
this
.
emailInput
)
this
.
emailInput
.
focus
();
...
...
src/components/join-flow/gender-step.jsx
View file @
c77db390
...
...
@@ -62,7 +62,9 @@ class GenderStep extends React.Component {
]);
}
componentDidMount
()
{
this
.
props
.
sendAnalytics
(
'
join-gender
'
);
if
(
this
.
props
.
sendAnalytics
)
{
this
.
props
.
sendAnalytics
(
'
join-gender
'
);
}
}
handleSetCustomRef
(
customInputRef
)
{
this
.
customInput
=
customInputRef
;
...
...
src/components/join-flow/registration-error-step.jsx
View file @
c77db390
...
...
@@ -16,7 +16,9 @@ class RegistrationErrorStep extends React.Component {
]);
}
componentDidMount
()
{
this
.
props
.
sendAnalytics
(
'
join-error
'
);
if
(
this
.
props
.
sendAnalytics
)
{
this
.
props
.
sendAnalytics
(
'
join-error
'
);
}
}
handleSubmit
(
e
)
{
// JoinFlowStep includes a <form> that handles a submit action.
...
...
src/components/join-flow/username-step.jsx
View file @
c77db390
...
...
@@ -40,7 +40,9 @@ class UsernameStep extends React.Component {
// Send info to analytics when we aren't on the standalone page.
// If we are on the standalone join page, the page load will take care of this.
if
(
!
window
.
location
.
pathname
.
includes
(
'
/join
'
))
{
this
.
props
.
sendAnalytics
(
'
join-email
'
);
if
(
this
.
props
.
sendAnalytics
)
{
this
.
props
.
sendAnalytics
(
'
join-username-modal
'
);
}
}
// automatically start with focus on username field
...
...
test/unit/components/username-step.test.jsx
View file @
c77db390
...
...
@@ -80,7 +80,7 @@ describe('UsernameStep test', () => {
<
UsernameStep
sendAnalytics=
{
sendAnalyticsFn
}
/>);
expect
(
sendAnalyticsFn
).
toHaveBeenCalledWith
(
'
join-
emai
l
'
);
expect
(
sendAnalyticsFn
).
toHaveBeenCalledWith
(
'
join-
username-moda
l
'
);
});
test
(
'
handleValidSubmit passes formData to next step
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment