Skip to content

Commit f859dc3

Browse files
Thomas Rueckstiessimlucas
authored andcommitted
INT-1587 remove all treasure hunt specific code
1 parent f2f1d20 commit f859dc3

File tree

23 files changed

+112
-282
lines changed

23 files changed

+112
-282
lines changed

src/app/explain-plan/index.jade

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050

5151
.tree-container
5252
div(data-hook='tree-subview')
53-
div(data-hook='treasure-hunt-subview', style='padding-bottom:20px; position:absolute; left:50%; margin-left:-100px;')
54-
svg(id="liberty", height="200", width="200", xmlns="http://www.w3.org/2000/svg", style="stroke:#ddd; fill:#ddd")
55-
image(x="0", y="0", height="200", width="200", xlink:href="./images/treasure-hunt/liberty.svg")
56-
div(style='color:#ddd;font-weight: bold;font-size: 23px;text-transform:uppercase;') X marks the spot
5753

5854
.json-container
5955
.panel.panel-default

src/app/explain-plan/index.js

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@ module.exports = View.extend({
8484
return 'INDEX';
8585
}
8686
},
87-
treasureHuntClueVisible: {
88-
deps: ['indexMessageType'],
89-
fn: function() {
90-
return (app.isFeatureEnabled('treasureHunt') &&
91-
this.indexMessageType === 'INDEX');
92-
}
93-
},
9487
showWarningTriangle: {
9588
deps: ['indexMessageType'],
9689
fn: function() {
@@ -147,10 +140,6 @@ module.exports = View.extend({
147140
'click i.link': 'linkIconClicked'
148141
},
149142
bindings: {
150-
treasureHuntClueVisible: {
151-
type: 'toggle',
152-
hook: 'treasure-hunt-subview'
153-
},
154143
ns: {
155144
hook: 'ns'
156145
},
@@ -242,26 +231,6 @@ module.exports = View.extend({
242231
this.on('change:visible', this.onVisibleChanged.bind(this));
243232
this.showExplainTree = app.isFeatureEnabled('showExplainPlanTab');
244233
},
245-
// entire render method just for treasure hunt, remove afterwards
246-
render: function() {
247-
this.renderWithTemplate(this);
248-
if (app.isFeatureEnabled('treasureHunt')) {
249-
var $main = $(this.query('.main'));
250-
var view = this;
251-
// check if user has scrolled to the bottom of the explain tree
252-
$main.on('scroll', function() {
253-
var scrolledToBottom = ($main.scrollTop() + $main.innerHeight() >= $main[0].scrollHeight - 20);
254-
if (view.indexMessageType === 'INDEX' &&
255-
scrolledToBottom &&
256-
view.activeDetailView === 'tree') {
257-
$main.off('scroll');
258-
debug('found the location!');
259-
// user looked at the bottom of an indexed tree explain plan
260-
metrics.track('Treasure Hunt', 'stage6');
261-
}
262-
});
263-
}
264-
},
265234
onModelSynced: function() {
266235
this.ns = this.model._id;
267236
this.fetchExplainPlan();

src/app/home/collection.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,6 @@ var MongoDBCollectionView = View.extend({
164164
this.model.fetch();
165165
},
166166
onCollectionFetched: function(model) {
167-
if (app.isFeatureEnabled('treasureHunt')) {
168-
if (model.getId() === 'news.news') {
169-
// player finds the room with the scrolls (news.news collection)
170-
metrics.track('Treasure Hunt', 'stage3');
171-
}
172-
}
173167
this.switchView(this.activeView);
174168
// track collection information
175169
var metadata = _.omit(model.serialize(), ['_id', 'database',

src/app/home/index.js

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,6 @@ var HomeView = View.extend({
6565
},
6666
render: function() {
6767
this.renderWithTemplate(this);
68-
// treasure hunt enables metrics
69-
if (app.isFeatureEnabled('treasureHunt')) {
70-
app.preferences.trackUsageStatistics = true;
71-
app.preferences.enableFeedbackPanel = true;
72-
app.preferences.trackErrors = true;
73-
// show identify screen if we don't know the user's name/email yet.
74-
if (!app.user.email) {
75-
var identifyView = new IdentifyView();
76-
this.renderSubview(identifyView, this.queryByHook('optin-container'));
77-
}
78-
// don't show feature tour initially in treasure hunt. too easy.
79-
if (pkg.version === '1.3.0-beta.0') {
80-
this.tourClosed();
81-
return;
82-
}
83-
}
8468
if (app.preferences.showFeatureTour) {
8569
this.showTour(false);
8670
} else {
@@ -97,10 +81,8 @@ var HomeView = View.extend({
9781
}
9882
},
9983
showOptIn: function() {
100-
if (!app.isFeatureEnabled('treasureHunt')) {
101-
var networkOptInView = new NetworkOptInView();
102-
this.renderSubview(networkOptInView, this.queryByHook('optin-container'));
103-
}
84+
var networkOptInView = new NetworkOptInView();
85+
this.renderSubview(networkOptInView, this.queryByHook('optin-container'));
10486
},
10587
tourClosed: function() {
10688
app.preferences.unset('showFeatureTour');

src/app/identify/index.jade

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,24 @@
22
.modal-dialog
33
.modal-content
44
.modal-header
5-
h4.modal-title Welcome, ye ole Swashbuckler!
5+
h4.modal-title Welcome to MongoDB Compass
66
.modal-body
7-
img(src='./images/treasure-hunt/treasure-map.png' style='width:75%; margin:0 auto; display: block;')
8-
p Before you can enter The Lost Temple and start with the treasure hunt, please tell us a bit about you:
7+
p Please tell us a bit about you:
98
form
109
ul
1110
li
1211
label
1312
div Your Name
1413
input(type='text', name='name', data-hook='full-name-input')
15-
p.option-description Your name will show up on the leaderboard as you unlock achievements.
1614
li
1715
label
1816
div Email Address
1917
input(type='text', name='email', data-hook='email-input')
20-
p.option-description Use the email address you signed up with for MongoDB World.
2118
li
2219
label
2320
div Twitter Handle (optional)
2421
input(type='text', name='twitter', data-hook='twitter-input')
25-
p.option-description We additionally annouce the winners of the treasure hunt via Twitter.
26-
27-
p Note that while you're connected to this server ("The Lost Temple"), your actions are tracked by us via third party services including intercom, mapbox and bugsnag. Your regular privacy settings apply when you connect to a different server.
28-
22+
2923
.modal-footer
30-
button.btn.btn-cancel(type='button', data-dismiss='modal', data-hook='cancel-button') I'm Too Scared
31-
button.btn.btn-primary(type='button', data-dismiss='modal', data-hook='start-button') Enter The Lost Temple
24+
button.btn.btn-cancel(type='button', data-dismiss='modal', data-hook='cancel-button') Exit
25+
button.btn.btn-primary(type='button', data-dismiss='modal', data-hook='start-button') Start using Compass

src/app/identify/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,5 @@ module.exports = View.extend({
7272
app.user.save(info);
7373
metrics.resources.get('User').set(info);
7474
metrics.trackers.get('intercom')._updateIntercom();
75-
// stage one, player provided name/email, enters the "Lost Temple"
76-
metrics.track('Treasure Hunt', 'stage1');
7775
}
7876
});
-1.63 MB
Binary file not shown.

src/app/images/treasure-hunt/liberty.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
-414 KB
Binary file not shown.

src/app/index.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,6 @@ var Application = View.extend({
306306
* quickly as possible.
307307
*/
308308
render: function() {
309-
if (app.isFeatureEnabled('treasureHunt')) {
310-
if (pkg.version === '1.3.0-beta.1') {
311-
// user upgraded to the next version
312-
metrics.track('Treasure Hunt', 'stage5');
313-
}
314-
}
315309
debug('Rendering app container...');
316310

317311
this.el = document.querySelector('#application');
@@ -402,9 +396,6 @@ app.extend({
402396
message: 'Connecting to MongoDB...'
403397
});
404398

405-
state.preferences.treasureHunt =
406-
(state.connection.hostname === 'world2016-shard-00-00-uuein.mongodb.net');
407-
408399
var DataService = require('mongodb-data-service');
409400
app.dataService = new DataService(state.connection)
410401
.on(DataService.Events.Readable, state.onClientReady.bind(state))

0 commit comments

Comments
 (0)