Tagged: Local Backup Toggle Comment Threads | Keyboard Shortcuts

  • Mihai Chereji 2:50 pm on August 30, 2011 Permalink | Reply
    Tags: Local Backup,   

    My screencast 

     
    • scribu 10:13 pm on September 2, 2011 Permalink | Reply

      Before closing the browser, you had 3 paragraphs. After recovering the post, you only have one. Surely that’s not expected behavior?

    • Mihai Chereji 12:51 am on September 3, 2011 Permalink | Reply

      That’s only a display bug, which I was aware of (not in track though) – tinymce shows the “raw” version of the post, but it saves the formatted version.

      Something which will be solved in 0.9.2 shortly 🙂

  • Mihai Chereji 3:43 pm on August 22, 2011 Permalink | Reply
    Tags: Local Backup   

    LocalStorage – impressions, future plans, ideas, roadplan, 

    Hello world.

    Well, this is the last of my updates on this blog, I guess. Let me start by saying this has been a really nice experience. I feel like I’ve learned quite a bit, and has done nothing but to strengthen my resolve to become an active part of the WordPress community.

    IMHO, the plug-in turned out really nice. But software is never done, and I’m determined to work on it even further.

    First thing, like @wojtekskutnik, I’ll post a call on wp-hackers to help with further testing and feedback.

    1.0 will be the version after some further “real-world” testing is done.

    Subsequent versions will have the following improvements:

    • multiple versions backed up for each post (right now the plug-in saves the latest autosave and the latest “final” version). On request, the user will be able to see each one.
    • a meta-box which will hold a button to manually “Save to localStorage”, the previous versions, and a button to delete any (or all) the versions.
    • leveraging Application Cache to keep an editor in browser cache. On connection down, clicking on “Add post” will bring up this minimal editor.
    • Integration with core, hopefully for 3.4.
    Thanks a lot to my mentors, and I hope the community will find my work useful. Have a nice end-of-summer, everyone 🙂
     
  • Mihai Chereji 6:22 pm on August 20, 2011 Permalink | Reply
    Tags: Local Backup   

    This is just a short post to explain… 

    This is just a short post to explain theme and plugin developers how to use my plugin (LocalStorage Plugin), which, btw, made it’s way into the official wp plugin repo – feedback and impressions always welcome. 🙂

    Thanks to the awesomeness of amplify.js, it’s easy to have something akin to WP PHP hooks in JavaScript – beyond events and callbacks.

    You see, the core of the amplify library offers two methods –  publish and subscribe, which are equivalent to do_action and add_action.For more info, check out amplify.js documentation

    The cool thing about it is that you can send parameters, and they’re sent by reference, so it works both as actions and as filters.

    In the hooks I’ve added so far, you can modify the post_data which will be saved, or submitted, before the actions take place

    a.publish('aboutToSave', action, post_data);

    The “plugin” example I’ve chosen to implement backs up the post format and modifies the value when showing the backup (on request).

    amplify.subscribe("aboutToSave", function (action, post_data) {
    	post_data.post_format = $('input.post-format:checked').val();
    });
    amplify.subscribe("showBackup", function (action, post_data) {
    	$("input.post-format").filter("[value=" + post_data.post_format + "]").prop("checked", true);
    });

    And this is basically it! I’ll add some more examples later, but this is what it’s mostly about.

     
    • Andrew Ozz 8:57 pm on August 21, 2011 Permalink | Reply

      Tried to get it to work a few times by disconnecting the network cable. It seems to save to the local storage but later fails to show the notice to publish/restore the last saved content. Not sure what’s the cause, will look more into it.

      Also made a small patch to the plugin, http://plugins.trac.wordpress.org/ticket/1373

      • Mihai Chereji 9:45 pm on August 21, 2011 Permalink | Reply

        Hey, what browser version are you using?

        • Andrew Ozz 9:47 pm on August 21, 2011 Permalink

          FF 5 and Chrome 12 on win, can test in other too.

        • Mihai Chereji 9:51 pm on August 21, 2011 Permalink

          Are you using the version from the plug-in repo?

        • Andrew Ozz 9:52 pm on August 21, 2011 Permalink

          Yes, that’s the latest “official” one, right? It shows the “Publish/Delete” notice only if I put FF in offline mode before quitting. Will try to trace it later.

        • Mihai Chereji 9:54 pm on August 21, 2011 Permalink

          Yeah, will look into it. Tested it on both Chrome and FF myself, would love to know what other plugins you have installed.

        • Andrew Ozz 9:56 pm on August 21, 2011 Permalink

          No other plugins but was testing on trunk (WP 3.3-alpha). Not many JS changes there from 3.2.

        • Mihai Chereji 9:59 pm on August 21, 2011 Permalink

          Tested on that too (that’s what running on my blog too). The thing is, if you leave the page on the editor, when the connection comes back online, you should not notice anything, it will sync in the background.

          If you navigate to another page (or reload the page before it syncs) you should indeed get a notification.

        • Andrew Ozz 10:02 pm on August 21, 2011 Permalink

          I was quitting the browser, connecting the network cable and starting the browser again 🙂

        • Mihai Chereji 10:11 pm on August 21, 2011 Permalink

          Then indeed, you should have seen a notification 😀

          This is quite weird, as I’ve tried the same on both FF and Chrome.

        • Mihai Chereji 11:52 pm on August 21, 2011 Permalink

          After some more debugging, we found out that this was due to @azaozz ‘s browsers acting up (somehow deleting localStorage on closing, thus rendering it useless).

  • Mihai Chereji 6:19 am on August 16, 2011 Permalink | Reply
    Tags: Local Backup,   

    This week I’ve added localization options to the plugin. Also fixed a few bugs,and will add the plugin to the main plug-ins repo later today.

    The following days I’ll add plugability and write a few short tutorials on how to add custom functionality to my plug-in. (Should be useful for plug-in/theme developers).

    Also, final code clean-up will follow, to make it pretty for the final evaluations. =)

     
  • Mihai Chereji 3:02 am on August 9, 2011 Permalink | Reply
    Tags: Local Backup,   

    Added security checking these days. (nonces, etc)

    This week I’ll focus on localization settings, adding plugability to my plugin (via apmpify’s pub/sub system) and a few bug fixes.

     
  • Mihai Chereji 11:11 pm on August 6, 2011 Permalink | Reply
    Tags: Local Backup,   

    I know I’m late again, sorry.

    Good thing is, I took care of some bugs, and now things work correctly when it comes to scheduling a post for later, or when you want to make a post private.

    I also took care of whitespace issues, making my code more readable.

    Right now I’m adding nonces (which I’ll have in by monday’s update, which will take place as scheduled).

     
  • Mihai Chereji 5:25 pm on July 28, 2011 Permalink | Reply
    Tags: Local Backup,   

    Hello all,

    Terribly sorry for the late update. This has been a truly hectic week, for which I’ll make up in the weekend.
    I’ve been talking to @suscov and he’s given me a few ideas and pointers. Priorities: security, documentation and white space issues in the code 🙂

     
  • Mihai Chereji 10:44 pm on July 18, 2011 Permalink | Reply
    Tags: Local Backup,   

    Last week I’ve added support for notifying a user when he has an unsynced post which is waiting to be published, and patched a few bugs. This week is one of self-assessment, reordering and bug hunting and fixing. Some new trac tickets will be open. Some old ones will be closed, etc. Top priority is hardening security, at the moment.

     
  • Mihai Chereji 6:31 am on July 12, 2011 Permalink | Reply
    Tags: Local Backup,   

    Terribly sorry for the slightly delayed update.

    I’ve got a (crude) notification system going for when you have backed-up posts which are to be published/updated. Tomorrow I’ll tag the first version (0.1) of the plug-in, after I’ve quashed a few bugs and made a few improvements, mostly to the notification/ui.

     
  • Mihai Chereji 6:43 pm on July 4, 2011 Permalink | Reply
    Tags: Local Backup, UX,   

    Last week was pretty good.

    The plugin now has a component that loads on all admin pages and checks if you have backed up pages and syncs if it needs to.

    It also checks when an autosave request fails in the post editor, and also sends a dummy request when you press the “Publish” button.

    (this part was also posted here but I might as well copy-paste it, as this blog gets a lot more visitors)

    @mitchoyoshitaka believes that when the server is not reachable, the “Publish/Update” buttons should be greyed out. I think a notification that the post will be submitted later suffices, and greying out the buttons detters the user from clicking, and (part of) what I’m trying to do is to make it ok to push that button even when offline.

    We’d both love some more input from more UX-savvy people.

    This week I’ll work on some user notifications and some bugs to bring it to a really usable version before midterm 🙂

     
    • Simon Wheatley 7:54 am on July 6, 2011 Permalink | Reply

      My 2 cents: I agree that greying out will discourage users from clicking; perhaps there could be some subtle indication somewhere that the system is operating “offline”?

      • Mihai Chereji 4:30 pm on July 6, 2011 Permalink | Reply

        Right now, there’s a message that appears below the editor, where “Draft successfully saved” usually appears, that says something along the lines of “Connection seems to be down, but that’s ok”. @azaozz suggested to move this below the main publishing box so it’s clear as day when the user clicks the button.

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel