Skip to content

Commit 02b00d1

Browse files
committed
Lots of little fixes and adjustments while QAing.
1 parent cc40fa1 commit 02b00d1

File tree

5 files changed

+31
-71
lines changed

5 files changed

+31
-71
lines changed

NOTES.md

Lines changed: 7 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
##To-do
1+
##Left-off
22

3-
**QA b4 Launch**
3+
**QA B4 LAUNCH (Still in progress)**
44
* Check to make sure all levels work
55
* Check that examples are correct
6-
* QA the reset - it's wiggin out yo? is it????
7-
8-
9-
106

117
##Feature Ideas
128

@@ -16,7 +12,6 @@
1612
* Do more work to figure out who has already been there, treat them a bit differently?
1713
* "Welcome back et."
1814

19-
2015
**Gameplay**
2116

2217
* Award stars when a level is completed without commas and using the indicated selector
@@ -28,75 +23,30 @@
2823
* Add a new one every week
2924
* Gives me a reason to bring people back
3025

31-
3226
**Fun sfuff**
3327

3428
* Some kind of bonus level
3529
* Appears randomly and not very often
3630
* Can have different food items
3731
* Or a special riddle that they get two shots on
3832

39-
4033
**Aesthetic Cleanup**
4134

4235
* Color the hover border according to the element hovered and context
4336
* Apples have a red border...
4437

38+
**Branding**
4539

46-
**Final Attrib Rules**
47-
* has attribute
48-
* attribute value = something
49-
* attribute starts with
50-
* attribute ends with
51-
52-
53-
**TO-DO**
54-
55-
* Pull jquery from CDN?
56-
* Refactor
40+
* Pull jquery from CDN
5741
* Figure out CNAME setup for github
5842
* Would be cool for it to always show up as cssdiner.com
59-
* Figure out next steps to increase reach and use
60-
* Email signup?
61-
* Dedicated twitter account?
62-
* Figure out next steps to improve product
63-
* More selectors
64-
* More levels per selector
65-
6643

6744
**Questions**
6845

69-
* How to test completion of twitter actions?
70-
* How to track where it's being shared already?
71-
* Sharetally, or something similar?
72-
73-
74-
What kind of new content could I have?
75-
76-
* Special riddle mode?
77-
* Create a challenge mode?
78-
* Sandbox mode
79-
* New levels
80-
81-
82-
**Attribute selectors**
83-
84-
* has attribute [for]
85-
* has an attribute with exact value
86-
* ``[for=bob]``
87-
* has an attribute that starts with
88-
* ``[for^=bob]``
89-
* has an attribute that contains
90-
* ``[for*=bob]``
91-
* has an attribute that ends with
92-
* ``[for$=bob]``
93-
* has this value in a list of space-separated attributes ``for="bob mary"``
94-
* ``[for~=bob]``
95-
* has this value in a list of dash separated attributes ``for="bob-mary"``
96-
* ``[for~=bob]``
97-
46+
* Is it possible to track where & how the diner is being shared?
47+
* Sharetally, or something similar?
9848

99-
####Figuring out hard levels
49+
**Tracking where people have trouble**
10050

10151
* Figure out how best to track which levels are the hardest
10252
* Current proposed method is by tracking incorrect guess counts per level

css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ tag:after {
12721272
color: #09699b;
12731273
font-size: 22px;
12741274
box-shadow: -3px 4px 0 rgba(0,0,0,.1);
1275-
background-image: url(http://github.com/..%3Cspan%20class=%22pl-c1%22%3E/%3C/span%3Eimages/line.%3Cspan%20class=%22x%20x-first%20x-last%22%3Epng%3C/span%3E);
1275+
background-image: url(http://github.com/..%3Cspan%20class=%22pl-c1%22%3E/%3C/span%3Eimages/line.%3Cspan%20class=%22x%20x-first%20x-last%22%3Egif%3C/span%3E);
12761276
z-index: 9999;
12771277
padding: 30px 0 2px 0 ;
12781278
background-color: #c5d6dd;

images/line.gif

1.18 KB
Loading

js/levels.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,10 @@ var levels = [
569569
doThis : "Select the items for someone",
570570
selector : "[for]",
571571
syntax: "[attribute]",
572-
help : "It does not matter what the value of the attribute is, it can even be blank.",
572+
help : 'Attributes appear inside the opening tag of an element, like this: <tag>span attribute="value"</tag>. An attribute does not always have a value, it can be blank!',
573573
examples : [
574574
'<strong>a[href]</strong> selects all <tag>a</tag> elements that have a <strong>href="anything"</strong> attribute.',
575-
'<strong>[id]</strong> selects all elements that have a <strong>href="anything"</strong>. attribute'
575+
'<strong>[type]</strong> selects all elements that have a <strong>type="anything"</strong>. attribute'
576576
],
577577
boardMarkup:`
578578
<bento><apple class="small"/></bento>
@@ -587,7 +587,7 @@ var levels = [
587587
doThis : "Select the plates for someone",
588588
selector : "plate[for]",
589589
syntax: "A[attribute]",
590-
help : "You can combine the attribute selector with other selectors, like the tag name selector.",
590+
help : "Combine the attribute selector with another selector (like the tag name selector) by adding it to the end.",
591591
examples : [
592592
'<strong>[value]</strong> selects all elements that have a <strong>value="anything"</strong> attribute.',
593593
'<strong>a[href]</strong> selects all <tag>a</tag> elements that have a <strong>href="anything"</strong> attribute.',
@@ -605,8 +605,8 @@ var levels = [
605605
helpTitle: "Select all elements that have a specific attribute value",
606606
doThis : "Select Vitaly's meal",
607607
selector : "[for=Vitaly]",
608-
syntax: "A[attribute=value]",
609-
help : "You can combine the attribute selector with other selectors, like the tag name selector.",
608+
syntax: "[attribute=value]",
609+
help : "Attribute selectors are case sensitive, each character must match exactly.",
610610
examples : [
611611
'<strong>input[type=checkbox]</strong> selects all checkbox input elements.'
612612
],
@@ -623,9 +623,9 @@ var levels = [
623623
doThis : "Select the items for names that start with 'Sa'",
624624
selector : "[for^='Sa']",
625625
syntax: "[attribute^=value]",
626-
help : 'Attribute selectors are case sensitive, each character must match exactly.',
626+
help : "You can use quotes around the value in the selector, or not&mdash;it's optional!",
627627
examples : [
628-
'<strong>.toy[category^=Swim]</strong> selects elements with class <strong>toy</strong> and either <strong>category="Swimwear</strong> or <strong>category="Swimming</strong>".'
628+
'<strong>.toy[category^=Swim]</strong> selects elements with class <strong>toy</strong> and either <strong>category="Swimwear</strong> or <strong>category="Swimming"</strong>.'
629629
],
630630
boardMarkup: `
631631
<plate for="Sam"><pickle/></plate>

js/restaurant.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,21 @@ function addAnimation(el, className){
170170
})
171171
}
172172

173-
// Reset all progress!
174-
// Should also scroll the menu to the top...
173+
// Reset all progress
174+
// * Removes checkmarks from level header and list
175+
// * Scrolls level menu to top
176+
// * Resets the progress object
177+
175178
function resetProgress(){
176179
currentLevel = 0;
177180
progress = blankProgress;
178181
localStorage.setItem("progress",JSON.stringify(progress));
182+
finished = false;
179183

180184
$(".completed").removeClass("completed");
181185
loadLevel();
182-
closeMenu(); // what does it do??
183-
$("#mCSB_2_container").css("top",0); // weird scroll reset - because of the
186+
closeMenu();
187+
$("#mCSB_2_container").css("top",0); // Strange element to reset scroll due to scroll plugin
184188
}
185189

186190

@@ -198,6 +202,9 @@ function checkCompleted(levelNumber){
198202
}
199203
}
200204

205+
206+
// Builds the slide-out level menu
207+
201208
function buildLevelmenu(){
202209
for(var i = 0; i < levels.length; i++){
203210
var level = levels[i];
@@ -226,16 +233,19 @@ function openMenu(){
226233
$(".right-col").addClass("menu-open");
227234
}
228235

236+
237+
// Hides & shows the tooltip that appears when an eleemnt
238+
// on the table or the editor is hovered over.
239+
229240
function hideTooltip(){
230241
$(".enhance").removeClass("enhance");
231242
$("[data-hovered]").removeAttr("data-hovered");
232243
$(".helper").hide();
233244
}
234245

235246
function showTooltip(el){
236-
237247
if(finished){
238-
return;
248+
return; // Only show tooltip if the game isn't finished yet
239249
}
240250

241251
el.attr("data-hovered",true);

0 commit comments

Comments
 (0)