rgbkrk / atom-achievements Goto Github PK
View Code? Open in Web Editor NEW:star: Unlock Achievements in the Atom Editor!
Home Page: https://atom.io/packages/achievements
License: MIT License
:star: Unlock Achievements in the Atom Editor!
Home Page: https://atom.io/packages/achievements
License: MIT License
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:55:11)
AchievementsView.achieve (/Users/sduy/.atom/packages/achievements/lib/achievements-view.coffee:32:9)
[Enter steps to reproduce below:]
Atom Version: 0.187.0
System: Mac OS X 10.9.5
Thrown From: achievements package, v0.7.0
Failed to activate the achievements package
At undefined is not a function
TypeError: undefined is not a function
at AchievementsView.module.exports.AchievementsView.achieve (/Users/jwillson/.atom/packages/achievements/lib/achievements-view.coffee:32:40)
at Achiever.module.exports.Achiever.achieve (/Users/jwillson/.atom/packages/achievements/lib/achiever.coffee:130:25)
at Achiever.module.exports.Achiever.processUnlock (/Users/jwillson/.atom/packages/achievements/lib/achiever.coffee:99:6)
at /Users/jwillson/.atom/packages/achievements/lib/achiever.coffee:1:1
at Atom.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:118:15)
at Object.module.exports.activate (/Users/jwillson/.atom/packages/achievements/lib/achievements.coffee:13:10)
at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:240:19)
at /Applications/Atom.app/Contents/Resources/app/src/package.js:221:30
at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:167:15)
at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:214:14)
at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:465:21)
at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/package-manager.js:268:29
at exit (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/package-manager.js:43:16)
at BufferedProcess.triggerExitCallback (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:63:47)
at /Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:70:18
at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:150:18)
at Socket.emit (events.js:138:20)
at Pipe.close (net.js:477:12)
4x -0:47.9 core:backspace (atom-text-editor.editor.mini)
2x -0:46.8 core:confirm (atom-text-editor.editor.mini)
{
"core": {
"disabledPackages": [
"underscorejs-snippets"
]
}
}
# User
Search, v0.4.0
achievements, v0.7.0
auto-update-packages, v0.2.2
autocomplete-css, v0.4.0
autocomplete-emojis, v1.0.0
autocomplete-html, v0.3.0
autocomplete-paths, v1.0.2
autocomplete-plus, v2.4.1
autocomplete-snippets, v1.0.1
color-picker, v1.4.4
git-tab-status, v1.5.3
javascript-snippets, v1.0.0
linter, v0.12.0
minimap, v4.5.0
sync-settings, v0.2.2
tabs-to-spaces, v0.8.1
# Dev
No dev packages
[Enter steps to reproduce below:]
Atom Version: 1.8.0
System: Unknown Windows Version
Thrown From: achievements package, v0.9.0
Uncaught TypeError: Cannot read property 'tokens' of undefined
At /C:/Users/Administrator/.atom/packages/minimap/lib/mixins/canvas-drawer.js:509
TypeError: Cannot read property 'tokens' of undefined
at _loop (C:/Users/Administrator/.atom/packages/minimap/lib/mixins/canvas-drawer.js:419:38)
at atom-text-editor-minimap.tokenLinesForScreenRows (C:/Users/Administrator/.atom/packages/minimap/lib/mixins/canvas-drawer.js:417:87)
at atom-text-editor-minimap.drawLines (C:/Users/Administrator/.atom/packages/minimap/lib/mixins/canvas-drawer.js:478:29)
at atom-text-editor-minimap.redrawRangesOnLayer (C:/Users/Administrator/.atom/packages/minimap/lib/mixins/canvas-drawer.js:270:14)
at atom-text-editor-minimap.updateTokensLayer (C:/Users/Administrator/.atom/packages/minimap/lib/mixins/canvas-drawer.js:136:10)
at atom-text-editor-minimap.updateCanvas (C:/Users/Administrator/.atom/packages/minimap/lib/mixins/canvas-drawer.js:104:10)
at atom-text-editor-minimap.update (C:/Users/Administrator/.atom/packages/minimap/lib/minimap-element.js:841:10)
at C:/Users/Administrator/.atom/packages/minimap/lib/minimap-element.js:740:12
{
"core": {
"autoHideMenuBar": true,
"disabledPackages": [
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"vim-mode-plus",
"symbols-view",
"activate-power-mode",
"minimap-hide",
"minimap-autohide",
"minimap-hide",
"minimap-hide",
"minimap-hide",
"minimap-hide",
"minimap-hide",
"minimap-hide",
"minimap-hide",
"minimap-hide",
"minimap-codeglance",
"minimap-hide",
"minimap-hide"
]
}
}
# User
atom-bootstrap4, v1.4.0
atom-ctags, v4.5.2
autocomplete-plus, v2.31.0
color-picker, v2.1.1
file-icons, v1.7.8
git-log, v0.4.1
merge-conflicts, v1.4.2
minimap, v4.23.2
minimap-bookmarks, v0.3.1
minimap-cursorline, v0.1.0
minimap-find-and-replace, v4.5.1
minimap-highlight-selected, v4.4.0
minimap-pigments, v0.2.1
minimap-selection, v4.4.0
minimap-split-diff, v0.3.0
open-in-browsers, v0.0.13
# Dev
No dev packages
Requiring View
from atom
is no longer supported.
Please require atom-space-pen-views
instead:
{View} = require 'atom-space-pen-views'
Add "atom-space-pen-views": "^2.0.3"
to your package dependencies.
Object.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/exports/atom.js:61:9)
Object.<anonymous> (/Users/ishahid/.atom/packages/achievements/lib/achievements-view.coffee:1:1)
This may probably come as a no brainer but the more achievements someone earns the larger that unlockedAchievements
object gets, which in turn gets serialized, which will increase the time it takes to load Atom.
I'm not sure how many it will take to cause real issues though it may be well out of the realm of real consideration.
What do you think about adding a button to the settings view for achievements that allows you to trigger a test achievement?
The use case I have in mind for this is trying out different delay speeds for the achievement banner without having to trigger an actual achievement. I am sure there could be other use cases as well.
Thoughts?
[Enter steps to reproduce below:]
Atom Version: 0.177.0
System: Microsoft Windows 8.1
Thrown From: achievements package, v0.7.0
Uncaught Error: EPERM, operation not permitted 'D:\code...'
At C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\pathwatcher\lib\file.js:318
Error: EPERM, operation not permitted 'D:\code\...'
at Error (native)
at Object.fs.mkdirSync (fs.js:752:18)
at Function.sync (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\mkdirp\index.js:55:12)
at Object.fsPlus.writeFileSync (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\fs-plus\lib\fs-plus.js:227:14)
at File.module.exports.File.writeFileSync (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\pathwatcher\lib\file.js:234:19)
at File.module.exports.File.writeFileWithPrivilegeEscalationSync (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\pathwatcher\lib\file.js:304:21)
at File.module.exports.File.write (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\pathwatcher\lib\file.js:293:12)
at TextBuffer.module.exports.TextBuffer.saveAs (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\text-buffer\lib\text-buffer.js:970:17)
at TextBuffer.module.exports.TextBuffer.save (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\text-buffer\lib\text-buffer.js:958:19)
at TextEditor.module.exports.TextEditor.save (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\src\text-editor.js:620:26)
at Object.module.exports.autosavePaneItem (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\autosave\lib\autosave.js:56:80)
at Object.module.exports.autosaveAllPaneItems (C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\autosave\lib\autosave.js:64:28)
at C:\Users\Russell Dempsey\AppData\Local\atom\app-0.177.0\resources\app\node_modules\autosave\lib\autosave.js:25:26
-2:48.4 project-find:show (atom-text-editor.editor)
-2:44.9 core:confirm (atom-text-editor.editor.mini)
-1:59.9 editor:consolidate-selections (atom-text-editor.editor.mini)
-1:59.9 core:cancel (atom-text-editor.editor.mini)
{
"core": {
"themes": [
"seti-ui",
"base16-tomorrow-dark-theme"
]
}
}
# User
achievements, v0.7.0
atom-beautify, v0.21.2
atom-jasmine, v0.5.0
atom-jshint, v1.5.0
autocomplete-plus, v2.0.12
autocomplete-snippets, v1.0.1
docblockr, v0.5.8
editor-stats, v0.17.0
editorconfig, v0.3.0
git-log, v0.2.0
git-tab-status, v1.5.3
highlight-column, v0.3.2
highlight-line, v0.9.3
irc, v0.2.9
js-refactor, v0.3.0
jshint, v1.2.0
line-ending-converter, v1.0.0
linter, v0.11.1
linter-csslint, v0.0.11
minimap, v4.1.0
project-manager, v1.15.5
refactor, v0.4.1
seti-ui, v0.6.3
tabs-to-spaces, v0.8.1
trailing-spaces, v0.2.4
# Dev
No dev packages
/cc @atom/core
When building this, I thought it was saving state per user. Turns out it's actually per project.
You'll get achievements all over again once you open an editor in a new project workspace. If opening Atom from the Icon, you'll always see the "You're an achiever" Achievement every single time you open the editor.
Atom Version: 0.175.0-e0e821e
System: linux 3.18.6-1-ARCH
Thrown From: achievements package, v0.7.0
Uncaught TypeError: undefined is not a function
At /home/chris/.atom/packages/achievements/lib/achievements-view.coffee:32
TypeError: undefined is not a function
at AchievementsView.module.exports.AchievementsView.achieve (/home/chris/.atom/packages/achievements/lib/achievements-view.coffee:32:40)
at Achiever.module.exports.Achiever.achieve (/home/chris/.atom/packages/achievements/lib/achiever.coffee:130:25)
at Achiever.module.exports.Achiever.processUnlock (/home/chris/.atom/packages/achievements/lib/achiever.coffee:99:6)
at /home/chris/.atom/packages/achievements/lib/achiever.coffee:1:1
at Atom.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/emissary/lib/emitter.js:118:15)
at ScriptView.module.exports.ScriptView.run (/home/chris/.atom/packages/script/lib/script-view.coffee:213:10)
at ScriptView.module.exports.ScriptView.start (/home/chris/.atom/packages/script/lib/script-view.coffee:112:6)
at ScriptView.module.exports.ScriptView.defaultRun (/home/chris/.atom/packages/script/lib/script-view.coffee:77:6)
at atom-workspace.<anonymous> (/home/chris/.atom/packages/script/lib/script-view.coffee:26:50)
at atom-workspace.handler (/usr/share/atom/resources/app/src/space-pen-extensions.js:115:32)
at atom-workspace.jQuery.event.dispatch (/usr/share/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/usr/share/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:243:29)
at /usr/share/atom/resources/app/src/command-registry.js:3:61
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/usr/share/atom/resources/app/node_modules/command-palette/lib/command-palette-view.js:120:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app/node_modules/archive-view/node_modules/atom-space-pen-views/lib/select-list-view.js:335:21)
at space-pen-div.atom.commands.add.core:confirm (/usr/share/atom/resources/app/node_modules/archive-view/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:243:29)
at /usr/share/atom/resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app/src/window-event-handler.js:170:20)
4x -3:30.5 core:backspace (atom-text-editor.editor.mini)
4x -3:27.8 core:move-down (atom-text-editor.editor.mini)
-3:26.5 core:move-up (atom-text-editor.editor.mini)
-3:25.9 core:confirm (atom-text-editor.editor.mini)
-3:25.9 open-on-search-engine:search-google (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
-3:24.7 core:confirm (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
5x -1:42.8 core:backspace (atom-text-editor.editor.mini)
-1:40.5 core:confirm (atom-text-editor.editor.mini)
-0:31.8 command-palette:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-0:29.8 core:confirm (atom-text-editor.editor.mini)
-0:29.8 script:run (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
5x -0:14.7 core:backspace (atom-text-editor.editor.is-focused)
-0:11.4 core:save (atom-text-editor.editor.is-focused)
-0:03.1 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:00.0 core:confirm (atom-text-editor.editor.mini)
-0:00.0 script:run (atom-text-editor.editor.is-focused)
{
"core": {}
}
# User
achievements, v0.7.0
atomatigit, v1.2.3
file-icons, v1.4.11
script, v2.16.0
# Dev
No dev packages
/cc @atom/core
Usually achievements have two parts: a name (some clever pun) and the sentence-long description. You could display the name in an @h1
on the achievement popup, say.
Maybe key off achievement identity off of the name instead of the description, too.
Is there any possible way to show users all the available achievements registered by developer, so that the user kind of has a roadmap to work on?
Allow to have the achievements in several languages, as far as one of them is english (as a lingua franca).
Store package style sheets in the styles/
directory instead of stylesheets/
in the achievements
package
Package.getStylesheetsPath (/Applications/Atom.app/Contents/Resources/app/src/package.js:448:9)
Package.getStylesheetPaths (/Applications/Atom.app/Contents/Resources/app/src/package.js:459:32)
As mentioned on the Atom forums by @tcarlsen, use categories/plugins and add points while we're at it.
atom.emit "achievement:unlock",
category: "Linting"
package: "jslint"
msg: "Is that lint on your sweater or are you just happy to JavaScript?"
points: 200
atom.emit "achievement:unlock",
category: "Linting"
package: "csslint"
msg: "We pulled your CSS out of the dryer. It has little fuzzies."
points: 200
A number of achievement systems reward you for reaching some threshold count of doing something. Rather than rely on every package that's adding achievements as an easter egg to implement global counter storage themselves, it would be great to have an API for advancing progress toward an achievement as well as the one for immediately rewarding one.
Here's an event mock:
atom.emit 'achievement:advance',
package: 'merge-conflicts',
name: 'Deeply Conflicted'
msg: "You've resolved 1000 conflict hunks. Yowza!"
points: 10
count: @conflicts.length # Optional, default to 1.
necessary: 1000
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.