Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Save files back to server #159

Merged
merged 30 commits into from
Jul 16, 2016
Merged

Conversation

thatkookooguy
Copy link
Member

@thatkookooguy thatkookooguy commented Jul 7, 2016

Change Summary

  • FUCKING SAVE FILES!!!! [resolves SAVE EXISTING FILES #144]

    We can now save already existing files :-) Later, when we'll start to add more keyboard shortcuts, we should add a cmd + s \ ctrl + s shortcut to save quickly

  • FUCKING SAVE & LOAD SETTINGS!!! [resolves Settings Feature #83]

now, if one of us changes the settings in the demo, anyone can see it on reload! 😄
The only issue I have remining is that for some reason, ruler other than 80 or 0 doesn't work 😢
Settings are saved in the user folder directory under the file .kibibit.json

  • add a way to empty the code editor

in File ▶️ New ▶️ Empty Editor

  • Make selecting a new project empty the file opened if it's a file with a path
  • Save session info (open folder and open file) in sessionStorage

Now, your open session is saved for each tab. So, right click on a kibibit tab and selecting Duplicate, will also copy the sessionStorage and you'll get the same state. But, if you type in the path to kibibit in the url in a new opened tab, a new session will open where you can select a different project to work on

We should change all files little by little to make everything more clear. But no rush, this is just a start

More info

how exciting! 😁

Before you submit a PR, make sure you did the following things:

  • did you link this PR to an issue?
  • did you lint your changes to both javascript and scss?
  • "I'm pretty sure I'll be able to read and understand this PR, even if I wasn't the author." - _said the PR author_

@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-159 July 8, 2016 06:37 Inactive
vm.projectFolderPath = '';
sessionStorage.projectFolderPath = vm.projectFolderPath;
vm.openFile = '';
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after statement

'<p class=\'prompt\'>\' | / | : | ; |.\'; ; ; |.\'; ; : : |-, : | \\ | : | : ;_ | | \'</p>' +
'<p class=\'prompt\'>| ; ; \' \' ; `----\' | | `----\' | | : | ;/| | : \' \'; | \\ \\ `. \' : |</p>' +
'<p class=\'prompt\'>: \' \\ | | | \' : ; \' : ; | : .\' \' \' ;. ; `----. \\ ; | ;</p>' +
'<p class=\'prompt\'>\' : |. \\ | | \' \' : | \' : | \' : ;/| \' : | ; .\' / /`--\' / `--..`; </p>' +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line must be at most 80 characters

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line must be at most 80 characters

@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-159 July 14, 2016 16:54 Inactive
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-159 July 14, 2016 17:49 Inactive
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-159 July 14, 2016 17:57 Inactive
@@ -98,7 +98,7 @@ angular.module('kibibitCodeEditor')
setTimeout(function() {
var gif;

$.get('http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag=kittens', function(result) {
$.get('//api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag=kittens', function(result) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line must be at most 80 characters

This will allow us to replace the sessionStorage later if needed.
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-159 July 16, 2016 17:23 Inactive

.factory('SessionStorageService', ['$window', function($window) {
return $window.sessionStorage;
}]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line feed at file end

@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-159 July 16, 2016 17:34 Inactive
@@ -0,0 +1,5 @@
md-toast {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files should end with a trailing newline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SAVE EXISTING FILES Settings Feature
2 participants