Skip to content

Commit 9ad3e67

Browse files
committed
updates to first time user flow
1 parent 7506192 commit 9ad3e67

File tree

17 files changed

+183
-24
lines changed

17 files changed

+183
-24
lines changed

coder-base/apps/auth/app.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,20 @@ exports.logout = function( req ) {
120120

121121

122122
exports.index_handler = function( req, res ) {
123+
124+
var firstuse = "?firstuse";
125+
if ( typeof( req.param('firstuse') ) === 'undefined' ) {
126+
firstuse = "";
127+
}
128+
123129
if ( !exports.isConfigured() ) {
124-
res.redirect('/app/auth/configure');
130+
res.redirect('/app/auth/configure?firstuse');
125131
} else if ( !exports.hasPassword() ) {
126-
res.redirect('/app/auth/addpassword');
132+
res.redirect('/app/auth/addpassword?firstuse');
127133
} else if ( !exports.isAuthenticated(req) ) {
128-
res.redirect('/app/auth/login');
134+
res.redirect('/app/auth/login' + firstuse);
129135
} else {
130-
res.redirect('/app/coder');
136+
res.redirect('/app/coder' + firstuse);
131137
}
132138
};
133139

coder-base/apps/auth/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"created": "2013-03-05",
3-
"modified": "2013-06-25",
3+
"modified": "2013-07-17",
44
"color": "#1abc9c",
55
"author": "Jason Striegel",
66
"name": "Auth",

coder-base/apps/coder/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"created": "2013-03-05",
3-
"modified": "2013-06-26",
3+
"modified": "2013-07-17",
44
"color": "#bdc3c7",
55
"author": "Jason Striegel",
66
"name": "Coder",

coder-base/apps/coderlib/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"created": "2013-03-05",
3-
"modified": "2013-06-26",
3+
"modified": "2013-07-17",
44
"color": "#3e3e3e",
55
"author": "Jason Striegel",
66
"name": "CoderLib",

coder-base/apps/editor/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"created": "2013-03-05",
3-
"modified": "2013-06-19",
3+
"modified": "2013-07-17",
44
"color": "#80d4ea",
55
"author": "Jason Striegel",
66
"name": "Editor",

coder-base/apps/hello_coder/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"created": "2013-05-08",
3-
"modified": "2013-06-26",
3+
"modified": "2013-07-17",
44
"color": "#d977d4",
55
"author": "Jason Striegel",
66
"name": "Hello Coder",

coder-base/static/apps/auth/js/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ var loginClick = function( what ) {
236236
function( data ) {
237237
console.log( data );
238238
if( data.status === "success" ) {
239-
window.location.href="/app/coder";
239+
if ( typeof getParams['firstuse'] !== 'undefined' ) {
240+
firstuse = '?firstuse';
241+
}
242+
window.location.href="/app/coder" + firstuse;
240243
} else {
241244
$form.find('.errormessage').text( data.error ).css('visibility','visible');
242245
$form.find('.pass').addClass('error');
@@ -300,7 +303,11 @@ var addPasswordClick = function() {
300303
function( data ) {
301304
console.log( data );
302305
if( data.status === "success" ) {
303-
window.location.href="/app/auth";
306+
var firstuse = '';
307+
if ( typeof getParams['firstuse'] !== 'undefined' ) {
308+
firstuse = '?firstuse';
309+
}
310+
window.location.href="/app/auth" + firstuse;
304311
} else {
305312
$form.find('.pass').addClass('error');
306313
$form.find('.errormessage').text( data.error ).css('visibility','visible');
@@ -462,3 +469,4 @@ var updateAnimation = function() {
462469
};
463470

464471

472+

coder-base/static/apps/coder/css/index.css

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
#additem {
6-
background-color: #bdc3c7;
6+
background-color: #2ecc71;
77
}
88

99
#applist {
@@ -71,7 +71,7 @@
7171
position: absolute;
7272
background-image: url(/static/common/media/coder_icons.png);
7373
background-position: -167px 0px;
74-
opacity: 0.6;
74+
opacity: 0.8;
7575
}
7676
#addapp_button:hover #addapp_icon {
7777
background-color: rgba(255,255,255,0.1);
@@ -411,4 +411,79 @@
411411
cursor: pointer;
412412
}
413413

414+
#introduction {
415+
position: fixed;
416+
top: 0;
417+
left: 0;
418+
width: 100%;
419+
height: 100%;
420+
background-color: rgba(0,0,0,0.4);
421+
z-index:4;
422+
}
423+
424+
425+
.intromessage {
426+
width: 450px;
427+
position: absolute;
428+
top: 400px;
429+
color: #fff;
430+
left: 50%;
431+
margin-left: -200px;
432+
text-align: center;
433+
}
434+
435+
.intromessage h1 {
436+
font-size: 28px;
437+
line-height: 28px;
438+
font-weight: bold;
439+
margin:0;
440+
padding: 0 0 20px 0;
441+
}
442+
.intromessage p {
443+
font-size: 21px;
444+
line-height: 1.2em;
445+
padding: 0 0 20px 0;
446+
margin:0;
447+
}
448+
.intromessage a, .intromessage a:hover, .intromessage a:active, .intromessage a:visited {
449+
color: #333;
450+
text-decoration: underline;
451+
}
452+
.gotit {
453+
font-size: 21px;
454+
font-weight: bold;
455+
line-height: 60px;
456+
border-radius: 4px;
457+
width: 400px;
458+
margin-left:25px;
459+
margin-bottom: 24px;
460+
background-color: rgba(0,0,0,0.5);
461+
}
462+
.gotit:hover {
463+
cursor: pointer;
464+
background-color: rgba(0,0,0,1);;
465+
}
466+
#dontshow {
467+
vertical-align: middle;
468+
width: 20px;
469+
height: 20px;
470+
}
471+
.dontshowmsg {
472+
vertical-align: middle;
473+
}
414474

475+
#myapps_tip {
476+
position: absolute;
477+
left: 440px;
478+
top: 220px;
479+
}
480+
#newapp_tip {
481+
position: absolute;
482+
left: 140px;
483+
top: 220px;
484+
}
485+
#settings_tip {
486+
position: absolute;
487+
right: 60px;
488+
top: 20px;
489+
}

coder-base/static/apps/coder/js/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,26 @@ $(document).ready( function() {
6464
$("#settingscontainer .logout").click( function() {
6565
window.location.href="/app/auth/logout";
6666
});
67+
68+
if ( typeof getParams['firstuse'] !== 'undefined' ) {
69+
buildIntroduction();
70+
}
6771
});
6872

73+
74+
var buildIntroduction = function() {
75+
$('#introduction').fadeIn();
76+
$('.gotit').click( function() {
77+
$('#introduction').fadeOut(function() {
78+
$(this).hide();
79+
});
80+
});
81+
};
82+
83+
84+
85+
86+
6987
var revertSettings = function() {
7088
activateCurrentCoderColor();
7189
updateSettingsData();
Loading
Loading
Loading

coder-base/static/apps/coderlib/js/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,18 @@ if ( typeof appname != 'nothing' ) {
5858
if ( typeof appurl != 'nothing' ) {
5959
Coder.appurl = appurl;
6060
}
61+
62+
var getParams = (function(qs){
63+
var params = {};
64+
if ( typeof qs !== 'undefined' ) {
65+
for ( var x=0; x<qs.length; x++ ) {
66+
var param = qs[x].split('=');
67+
if (param.length == 2) {
68+
params[param[0]] = decodeURIComponent(param[1].replace(/\+/g, " "));
69+
} else {
70+
params[param[0]] = '';
71+
}
72+
}
73+
}
74+
return params;
75+
})(window.location.search.substr(1).split('&'));

coder-base/static/apps/editor/css/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ BODY, HTML {
6969
font-size: 24px;
7070
line-height: 60px;
7171
float: left;
72+
cursor: pointer;
7273
}
7374

7475
.sidepanel h1 {

coder-base/static/apps/editor/js/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ $(document).ready( function() {
7070
$("#settingscontainer input").on('change', checkChangedSettings );
7171
$("#settingscontainer input").on('keydown', function() { setTimeout( checkChangedSettings, 0); } );
7272

73+
$("#editornav .application_name").click( function() {
74+
window.location.href = '/app/' + edit_appname;
75+
});
7376
//uncomment to open preview by default
7477
//togglePreview();
7578

coder-base/static/apps/hello_coder/css/index.css

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,34 @@ Try to change the text and background colors to something you like.
5959
See what happens when you change the font-size value to 40px.
6060
*/
6161
h1 {
62-
background-color: #000000;
63-
color: #ffffff;
64-
font-size: 24px;
65-
line-height: 60px;
66-
display: block;
67-
margin: 0;
68-
text-transform: uppercase;
62+
text-align: center;
63+
background-color: #FFFFFF;
64+
color: #D977D4;
65+
font-size: 42px;
66+
line-height: 60px;
6967
margin: 0;
7068
padding: 0;
71-
margin-bottom: 200px;
72-
padding-left: 24px;
69+
font-weight: bold;
70+
71+
72+
/*
73+
This lets us set a width on the block.
74+
Otherwise it will default to the full
75+
page width.
76+
*/
77+
width: 400px;
78+
79+
/*
80+
We can center the block using relative
81+
positioning, placing it 50% of the page
82+
width from the left. The negative
83+
margin-left compensates for half the
84+
width of the block to complete the
85+
centering.
86+
*/
87+
position: relative;
88+
left: 50%;
89+
margin-left: -200px;
7390
}
7491

7592
/*
@@ -85,7 +102,6 @@ p {
85102
margin-bottom: 10px;
86103
font-size: 28px;
87104
line-height: 28px;
88-
font-weight: bold;
89105
text-align: center;
90106
color: #ffffff;
91107
padding: 0;
@@ -118,11 +134,13 @@ p {
118134
<div class="pagecontent">
119135
We're placing everything inside of this and using this class to
120136
position this content on top of the animation canvas using z-index.
137+
It also uses padding-top to position all of the text content 200px
138+
down from the top of the page.
121139
*/
122140
.pagecontent {
123141
z-index: 2;
124142
position: relative;
125-
height: 100%;
143+
padding-top: 200px;
126144
width: 100%;
127145
}
128146

coder-base/views/apps/coder/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,20 @@ <h1>Settings</h1>
120120
<div class="cancel">Cancel</div>
121121
</div>
122122

123+
<div id="introduction" style="display:none">
124+
125+
<div class="intromessage">
126+
<h1>Getting Started</h1>
127+
<p>Check out the quick tips above. For a more detailed tour, go to <a href="http://goo.gl/coder" target="_blank">goo.gl/coder</a>. When you're ready to dive in, just click 'Got It'.</p>
128+
<div class="finished">
129+
<div class="gotit">Got It</div>
130+
</div>
131+
</div>
132+
<img src="/static/apps/coder/media/myapps_tip.png" id="myapps_tip" />
133+
<img src="/static/apps/coder/media/settings_tip.png" id="settings_tip"/>
134+
<img src="/static/apps/coder/media/newapp_tip.png" id="newapp_tip"/>
135+
136+
</div>
137+
123138
</body>
124139
</html>

0 commit comments

Comments
 (0)