Skip to content

Commit

Permalink
Add basic getting started info when to index when there are no features
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlower committed Feb 27, 2013
1 parent df4a085 commit 73444ea
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 23 deletions.
7 changes: 6 additions & 1 deletion lib/flipper/ui/assets/javascripts/application.coffee
Expand Up @@ -99,7 +99,12 @@ class App.FeatureList extends Spine.Controller

addAll: =>
@html ''
@addOne feature for feature in Feature.all()
$('#no_features').hide()
all_features = Feature.all()
if all_features.length > 0
@addOne feature for feature in all_features
else
$('#no_features').show()

class App.Feature extends Spine.Controller
elements:
Expand Down
12 changes: 12 additions & 0 deletions lib/flipper/ui/assets/stylesheets/application.scss
Expand Up @@ -63,6 +63,18 @@ body {
padding: 29px 0 22px;
}

div#no_features {
display: none;
h1 {
font-size: 2em;
padding-bottom: 15px;
}
p {
font-size: 1.25em;
padding-bottom: 5px;
}
}

div.feature {
float:left;
width:723px;
Expand Down
9 changes: 9 additions & 0 deletions lib/flipper/ui/public/css/application.css
Expand Up @@ -58,6 +58,15 @@ body {
#header {
padding: 29px 0 22px; }

div#no_features {
display: none; }
div#no_features h1 {
font-size: 2em;
padding-bottom: 15px; }
div#no_features p {
font-size: 1.25em;
padding-bottom: 5px; }

div.feature {
float: left;
width: 723px;
Expand Down
29 changes: 16 additions & 13 deletions lib/flipper/ui/public/js/application.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions lib/flipper/ui/public/js/spine/ajax.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/flipper/ui/public/js/spine/list.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions lib/flipper/ui/public/js/spine/spine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/flipper/ui/views/index.erb
@@ -1,3 +1,9 @@
<div id="features">
<p>loading indicator...</p>
</div>

<div id="no_features">
<h1>Ready to start flipping?</h1>
<p>You haven't created any features yet</p>
<p>Start by reading the <a href='https://github.com/jnunemaker/flipper#usage'>flipper readme</p>
</div>

1 comment on commit 73444ea

@jnunemaker
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet. Thanks. This is a great start. Eventually I want to make it so you can add features to the known set from the UI, but we'll need this either way. Appreciate the help!

Please sign in to comment.