Skip to content

Commit

Permalink
Merge pull request #59 from NUDelta/issue37-meteormethods
Browse files Browse the repository at this point in the history
Sped up the time for entering pair research tasks by removing "popular tasks" feature
  • Loading branch information
kapil1garg authored Jan 29, 2022
2 parents c2e8f21 + d4f4e17 commit 60bd0bb
Show file tree
Hide file tree
Showing 31 changed files with 2,518 additions and 981 deletions.
1 change: 1 addition & 0 deletions .idea/jsLibraryMappings.xml

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

1 change: 1 addition & 0 deletions .idea/pair-research-meteor.iml

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

25 changes: 12 additions & 13 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,38 @@
# but you can also edit it by hand.

[email protected] # Packages every Meteor app needs to have
mobile-experience@1.0.5 # Packages for a great mobile UX
mongo@1.7.0 # The database Meteor supports right now
mobile-experience@1.1.0 # Packages for a great mobile UX
mongo@1.11.0 # The database Meteor supports right now
[email protected] # Compile .html files into Meteor Blaze views
[email protected] # Reactive variable for tracker
[email protected] # Helpful client-side library
[email protected] # Meteor's client-side reactive programming library

[email protected] # CSS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers.
ecmascript@0.13.2 # Enable ECMAScript2015+ syntax in app code
ecmascript@0.15.3 # Enable ECMAScript2015+ syntax in app code

aldeed:collection2
accounts-base@1.4.5
accounts-password@1.5.2
accounts-base@1.9.0
accounts-password@1.7.0
kadira:flow-router
kadira:blaze-layout
fourseven:scss
mdg:validated-method
nooitaf:colors
dburles:collection-helpers
poetic:materialize-scss
practicalmeteor:mocha
dburles:factory
momentjs:moment
natestrauser:animate-css
[email protected]
email@1.2.3
email@2.0.0
arillo:flow-router-helpers
archive:jquery-dotdotdot
shell-server@0.4.0
shell-server@0.5.0
practicalmeteor:chai
dynamic-import@0.5.1
dynamic-import@0.6.0
[email protected]
meteorhacks:ssr
montiapm:agent
fourseven:scss
seba:minifiers-autoprefixer
spacebars-compiler
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.8.3
METEOR@2.2.4
112 changes: 55 additions & 57 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accounts-base@1.4.5
accounts-password@1.5.2
accounts-base@1.9.0
accounts-password@1.7.0
aldeed:[email protected]
aldeed:[email protected]
aldeed:[email protected]
Expand All @@ -8,114 +8,112 @@ aldeed:[email protected]
[email protected]
archive:[email protected]
arillo:[email protected]
autoupdate@1.6.0
babel-compiler@7.4.2
babel-runtime@1.4.0
autoupdate@1.7.0
babel-compiler@7.7.0
babel-runtime@1.5.0
[email protected]
[email protected]
blaze@2.3.3
blaze@2.4.0
[email protected]
blaze-tools@1.0.10
boilerplate-generator@1.6.0
[email protected].1
caching-html-compiler@1.1.3
callback-hook@1.2.0
blaze-tools@1.1.0
boilerplate-generator@1.7.1
[email protected].2
caching-html-compiler@1.2.0
callback-hook@1.3.0
[email protected]
[email protected]
dburles:[email protected]
dburles:[email protected]
[email protected]
ddp-client@2.3.3
ddp-client@2.4.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
dynamic-import@0.5.1
ecmascript@0.13.2
dynamic-import@0.6.0
ecmascript@0.15.3
[email protected]
ecmascript-runtime-client@0.9.0
ecmascript-runtime-server@0.8.0
[email protected].0
email@1.2.3
ecmascript-runtime-client@0.11.0
ecmascript-runtime-server@0.10.0
[email protected].1
email@2.0.0
[email protected]
[email protected]
fourseven:scss@3.13.0
fourseven:scss@4.14.2
[email protected]
[email protected]
html-tools@1.0.11
htmljs@1.0.11
html-tools@1.1.0
htmljs@1.1.0
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
kadira:[email protected]
kadira:[email protected]
launch-screen@1.1.1
launch-screen@1.2.1
[email protected]
[email protected]
logging@1.1.20
logging@1.2.0
mdg:[email protected]
mdg:[email protected]
[email protected]
[email protected]
meteorhacks:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
momentjs:[email protected]
mongo@1.7.0
[email protected].1
mongo@1.11.0
[email protected].2
[email protected]
[email protected]
[email protected]
montiapm:agent@2.43.1
montiapm:agent@2.44.2
montiapm:[email protected]
natestrauser:[email protected]
nooitaf:[email protected]_1
[email protected]
npm-mongo@3.2.0
npm-mongo@3.9.0
[email protected]
[email protected]
poetic:[email protected]_1
practicalmeteor:[email protected]_1
practicalmeteor:[email protected]_2
practicalmeteor:[email protected]_6
practicalmeteor:[email protected]
practicalmeteor:[email protected]_2
[email protected]
raix:[email protected]
random@1.1.0
random@1.2.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected]
seba:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
tmeasday:[email protected]
[email protected]
[email protected]
[email protected]
url@1.2.0
webapp@1.7.5
webapp-hashing@1.0.9
url@1.3.1
webapp@1.10.1
webapp-hashing@1.1.0
zimme:[email protected]
zodern:[email protected]
1 change: 1 addition & 0 deletions client/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '/imports/startup/client';
import '../node_modules/materialize-css/dist/js/materialize.min';

if (Meteor.isDevelopment) {
Affinities = require('../imports/api/affinities/affinities.js').Affinities;
Expand Down
2 changes: 1 addition & 1 deletion client/main.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "{poetic:materialize-scss}/sass/materialize.scss";
@import "{}/node_modules/materialize-css/sass/materialize.scss";

@import '{}/imports/ui/stylesheets/global.scss';
@import '{}/imports/ui/stylesheets/collections.scss';
Expand Down
2 changes: 2 additions & 0 deletions imports/api/email-generator.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { SSR } from "./ssr";

export const EmailGenerator = {
addTemplates(templates) {
templates.forEach((template) => {
Expand Down
22 changes: 22 additions & 0 deletions imports/api/ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { SpacebarsCompiler } from 'meteor/spacebars-compiler';
import { Blaze } from "meteor/blaze";

// from: https://forums.meteor.com/t/a-better-way-to-do-ssr-with-blaze-in-meteor-than-meteorhacks-ssr/55687
export const SSR = {
render: (templateName, data) => {
const renderFunc = (data)? Blaze.toHTMLWithData : Blaze.toHTML;
const template = Blaze.Template[templateName];
if (!template) {
throw new Error(`Template ${templateName} not found`);
}
else {
return renderFunc(template, data);
}
},
compileTemplate: (name, content) => {
const renderfunc = eval(`(function(view) { return ${SpacebarsCompiler.compile(content)}(); })`);
const template = new Blaze.Template(name, function() { return renderfunc(this); });
Blaze.Template[name] = template;
return template;
}
};
30 changes: 20 additions & 10 deletions imports/ui/components/pairings.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,30 @@
</div>
<div class="float-center right hide-on-med-and-down">
<p class="range-field">
<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-1" type="radio" disabled>
<label for="{{currentTask._id}}-1">1</label>
<label>
<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-1" type="radio" disabled="disabled">
<span>1</span>
</label>

<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-2" type="radio" disabled>
<label for="{{currentTask._id}}-2">2</label>
<label>
<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-2" type="radio" disabled="disabled">
<span>2</span>
</label>

<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-3" type="radio" disabled>
<label for="{{currentTask._id}}-3">3</label>
<label>
<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-3" type="radio" disabled="disabled">
<span>3</span>
</label>

<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-4" type="radio" disabled>
<label for="{{currentTask._id}}-4">4</label>
<label>
<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-4" type="radio" disabled="disabled">
<span>4</span>
</label>

<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-5" type="radio" disabled>
<label for="{{currentTask._id}}-5">5</label>
<label>
<input name="{{currentTask._id}}-affinity" id="{{currentTask._id}}-5" type="radio" disabled="disabled">
<span>5</span>
</label>
</p>
</div>
</li>
Expand Down
3 changes: 2 additions & 1 deletion imports/ui/components/pairings.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ Template.pairings.events({
});
},

// TODO: this gets deinitialized before the tooltip is destroyed
'click a.tooltipped'(event, instance) {
$('.tooltipped').tooltip('remove');
$('.tooltipped').tooltip('destroy');
}
});
6 changes: 5 additions & 1 deletion imports/ui/components/pairings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@

.range-field {
label {
padding-left: 25px;
padding-left: 0.25rem;
margin-right: 5px;
}

span {
padding-left: 1.6rem;
}
}

// Keeps page height constant
Expand Down
8 changes: 4 additions & 4 deletions imports/ui/layout/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ul>
<nav class="nav-wrapper amber darken-2">
<a href="{{pathFor 'App.home'}}" class="brand-logo">Pair Research</a>
<a href="#" data-activates="mobile-menu" class="button-collapse">
<a href="#" data-target="mobile-menu" class="sidenav-trigger">
<i class="material-icons">menu</i>
</a>
<ul class="right hide-on-small-and-down">
Expand All @@ -32,7 +32,7 @@
</a>
</li>
<li>
<a href="#" class="dropdown-button" data-activates="user_dropdown" data-beloworigin="true">
<a href="#" class="dropdown-trigger" data-target="user_dropdown" >
{{currentUser.profile.fullName}}<i class="material-icons right">arrow_drop_down</i>
</a>
</li>
Expand All @@ -44,7 +44,7 @@
</li>
{{/if}}
</ul>
<ul class="side-nav hide-on-med-and-up" id="mobile-menu">
<ul class="sidenav hide-on-med-and-up" id="mobile-menu">
{{#if currentUser}}
<li>
<a href="{{pathFor 'App.groups.home'}}">
Expand All @@ -55,7 +55,7 @@
</a>
</li>
<li>
<a href="#" class="dropdown-button" data-activates="user_dropdown2" data-beloworigin="true">
<a href="#" class="dropdown-trigger" data-target="user_dropdown2">
{{currentUser.profile.fullName}}<i class="material-icons right">arrow_drop_down</i>
</a>
</li>
Expand Down
Loading

0 comments on commit 60bd0bb

Please sign in to comment.