From 6ea2f1c76dd42f7a72e26e8e81878762dee762ab Mon Sep 17 00:00:00 2001 From: Dominik Kundel Date: Sat, 28 Jun 2014 12:53:09 +0200 Subject: [PATCH 1/5] added title for tab trigger --- app/schemas/schemas.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/schemas/schemas.coffee b/app/schemas/schemas.coffee index d2a72551e..4ef0cd20e 100644 --- a/app/schemas/schemas.coffee +++ b/app/schemas/schemas.coffee @@ -175,7 +175,7 @@ me.codeSnippet = (mode) -> return snippet = code: {type: 'string', title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'} # code: {type: 'string', format: 'ace', aceMode: 'ace/mode/'+mode, title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'} - tab: {type: 'string', description: 'Tab completion text. Will be expanded to the snippet if typed and hit tab.'} + tab: {type: 'string', title: 'Tab Trigger', description: 'Tab completion text. Will be expanded to the snippet if typed and hit tab.'} me.activity = me.object {description: "Stats on an activity"}, first: me.date() From 2dd4ba6203f2852cf8f56c1e83ded8b82344fb0a Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Mon, 30 Jun 2014 16:43:31 -0700 Subject: [PATCH 2/5] Increased max skills from 30 to 40 --- app/schemas/models/user.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index e77bd6830..508710d50 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -78,7 +78,7 @@ UserSchema = c.object {}, name: c.shortString {title: 'Name', description: 'Name you want employers to see, like "Nick Winter".'} city: c.shortString {title: 'City', description: 'City you want to work in (or live in now), like "San Francisco" or "Lubbock, TX".', default: 'Defaultsville, CA', format: 'city'} country: c.shortString {title: 'Country', description: 'Country you want to work in (or live in now), like "USA" or "France".', default: 'USA', format: 'country'} - skills: c.array {title: 'Skills', description: 'Tag relevant developer skills in order of proficiency.', default: ['javascript'], minItems: 1, maxItems: 30, uniqueItems: true}, + skills: c.array {title: 'Skills', description: 'Tag relevant developer skills in order of proficiency.', default: ['javascript'], minItems: 1, maxItems: 40, uniqueItems: true}, {type: 'string', minLength: 1, maxLength: 50, description: 'Ex.: "objective-c", "mongodb", "rails", "android", "javascript"', format: 'skill'} experience: {type: 'integer', title: 'Years of Experience', minimum: 0, description: 'How many years of professional experience (getting paid) developing software do you have?'} shortDescription: {type: 'string', maxLength: 140, title: 'Short Description', description: 'Who are you, and what are you looking for? 140 characters max.', default: 'Programmer seeking to build great software.'} From 1adefbb3b61716734a86e595f18c8b3ef396335a Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 11:50:44 -0700 Subject: [PATCH 3/5] Update user schema (to avoid cherry picking) --- app/schemas/models/user.coffee | 41 +++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 508710d50..09b5be23c 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -107,7 +107,46 @@ UserSchema = c.object {}, name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "GitHub"', format: 'link-name'} link: c.url {title: 'Link', description: 'The URL.', default: 'http://example.com'} photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image if you want to show a different profile picture to employers than your normal avatar.'} - + curated: c.object {title: 'Curated', required: ['mainTag','location','education','workHistory','phoneScreenFilter','schoolFilter','locationFilter','roleFilter','seniorityFilter']}, + mainTag: + title: 'Main tag' + description: 'A main tag to describe this candidate' + type: 'string' + location: + title: 'Location' + description: "The CURRENT location of the candidate" + type: 'string' + education: + title: 'Education' + description: 'The main educational institution of the candidate' + type: 'string' + workHistory: c.array + title: 'Work history' + description: 'One or two places the candidate has worked' + type: 'array' + , + title: 'Workplace' + type: 'string' + phoneScreenFilter: + title: 'Phone screened' + type: 'boolean' + description: 'Whether the candidate has been phone screened.' + schoolFilter: + title: 'School' + type: 'string' + enum: ['Top 20 Eng.', 'Other US', 'Other Intl.'] + locationFilter: + title: 'Location' + type: 'string' + enum: ['Bay Area', 'New York', 'Other US', 'International'] + roleFilter: + title: 'Role' + type: 'string' + enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager'] + seniorityFilter: + title: 'Seniority' + type: 'string' + enum: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management'] jobProfileApproved: {title: 'Job Profile Approved', type: 'boolean', description: 'Whether your profile has been approved by CodeCombat.'} jobProfileNotes: {type: 'string', maxLength: 1000, title: 'Our Notes', description: "CodeCombat's notes on the candidate.", format: 'markdown', default: ''} employerAt: c.shortString {description: "If given employer permissions to view job candidates, for which employer?"} From 004a14ae3c73f62f86d1c9acb1162a8d4f713db9 Mon Sep 17 00:00:00 2001 From: Dominik Kundel Date: Wed, 2 Jul 2014 20:52:16 +0200 Subject: [PATCH 4/5] fixed autocomplete issue related to switching the programming language --- .../play/level/tome/spell_palette_view.coffee | 2 +- app/views/play/level/tome/spell_view.coffee | 16 +++++++++------- bower.json | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/views/play/level/tome/spell_palette_view.coffee b/app/views/play/level/tome/spell_palette_view.coffee index 18771bd03..3057838e3 100644 --- a/app/views/play/level/tome/spell_palette_view.coffee +++ b/app/views/play/level/tome/spell_palette_view.coffee @@ -93,7 +93,7 @@ module.exports = class SpellPaletteView extends View tabbify = count >= 10 @entries = [] - Backbone.Mediator.publish 'tome:update-snippets', propGroups: propGroups, allDocs: allDocs + Backbone.Mediator.publish 'tome:update-snippets', propGroups: propGroups, allDocs: allDocs, language: @options.language for owner, props of propGroups for prop in props diff --git a/app/views/play/level/tome/spell_view.coffee b/app/views/play/level/tome/spell_view.coffee index 161d6768a..adfd5146f 100644 --- a/app/views/play/level/tome/spell_view.coffee +++ b/app/views/play/level/tome/spell_view.coffee @@ -96,6 +96,7 @@ module.exports = class SpellView extends View @aceSession.selection.on 'changeCursor', @onCursorActivity $(@ace.container).find('.ace_gutter').on 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick @zatanna = new Zatanna @ace, + liveCompletion: aceConfig.liveCompletion ? true completers: keywords: false @@ -180,16 +181,17 @@ module.exports = class SpellView extends View return (owner is 'this' or owner is 'more') and (not doc.owner? or doc.owner is 'this') console.log 'could not find doc for', prop, 'from', e.allDocs['__' + prop], 'for', owner, 'of', e.propGroups unless doc doc ?= prop - if doc.snippets?[@spell.language] + if doc.snippets?[e.language] entry = - content: doc.snippets[@spell.language].code + content: doc.snippets[e.language].code name: doc.name - tabTrigger: doc.snippets[@spell.language].tab + tabTrigger: doc.snippets[e.language].tab snippetEntries.push entry - window.zatanna = @zatanna - window.snippetEntries = snippetEntries - @zatanna.addSnippets snippetEntries, @spell.language + # window.zatanna = @zatanna + # window.snippetEntries = snippetEntries + lang = @editModes[e.language].substr 'ace/mode/'.length + @zatanna.addSnippets snippetEntries, lang onMultiplayerChanged: -> if @session.get('multiplayer') @@ -652,7 +654,7 @@ module.exports = class SpellView extends View onChangeLanguage: (e) -> return unless @spell.canWrite() @aceSession.setMode @editModes[e.language] - @zatanna.set 'language', @editModes[e.language].substr('ace/mode/') + # @zatanna.set 'language', @editModes[e.language].substr('ace/mode/') wasDefault = @getSource() is @spell.originalSource @spell.setLanguage e.language @reloadCode true if wasDefault diff --git a/bower.json b/bower.json index 6fee49838..62304bd97 100644 --- a/bower.json +++ b/bower.json @@ -44,7 +44,7 @@ "bootstrap": "~3.1.1", "validated-backbone-mediator": "~0.1.3", "jquery.browser": "~0.0.6", - "zatanna": "~0.0.1" + "zatanna": "~0.0.2" }, "overrides": { "backbone": { From e54b190918b9c55bafecdc81c4d7302cb9700d10 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 10:02:42 -0700 Subject: [PATCH 5/5] Added shortDescription --- app/schemas/models/user.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 09b5be23c..74e9c7dd3 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -107,7 +107,11 @@ UserSchema = c.object {}, name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "GitHub"', format: 'link-name'} link: c.url {title: 'Link', description: 'The URL.', default: 'http://example.com'} photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image if you want to show a different profile picture to employers than your normal avatar.'} - curated: c.object {title: 'Curated', required: ['mainTag','location','education','workHistory','phoneScreenFilter','schoolFilter','locationFilter','roleFilter','seniorityFilter']}, + curated: c.object {title: 'Curated', required: ['shortDescription','mainTag','location','education','workHistory','phoneScreenFilter','schoolFilter','locationFilter','roleFilter','seniorityFilter']}, + shortDescription: + title: 'Short description' + description: 'A sentence or two describing the candidate' + type: 'string' mainTag: title: 'Main tag' description: 'A main tag to describe this candidate'