Updates from April, 2012 Toggle Comment Threads | Keyboard Shortcuts

  • Jane Wells 11:42 pm on April 4, 2012 Permalink | Reply  

    Image Post 

    20120404-194222.jpg

     
    • Jane Wells 11:51 pm on April 4, 2012 Permalink | Reply

      image posted from new ipad so @azaozz could see bug.

    • Andrew Ozz 2:56 am on April 5, 2012 Permalink | Reply

      Seems in Chrome 18 there are some strange artifacts on the headers of list tables too and the border-color controls their color. This may be related.

      • George Stephanis 7:57 pm on April 5, 2012 Permalink | Reply

        I couldn’t manage to duplicate this in the iPad 2, I’ll be testing on the 3 shortly. Personally, I blame the gremlins.

  • Andrew Nacin 4:31 am on December 7, 2011 Permalink | Reply
    Tags: ,   

    What to watch for: Javascript and Editor changes in WordPress 3.3 

    Updated December 8.

    There was an earlier post on JavaScript changes in 3.3, but a lot has changed, so here it is again (and updated).

    If JavaScript or visual editing broke in your plugin, start here.

    jQuery 1.7.1

    This release had strong backwards compatibility over jQuery 1.6.1 (which was bundled in WordPress 3.2) but there is still a chance that plugin JavaScript has broken. We will always attempt to bundle the latest jQuery version with every major release of WordPress, so if you plan to use jQuery, you should follow that project as well.

    jQuery UI 1.8.16

    jQuery UI has been updated to the latest version, and all UI components are now included in core, including widgets and effects. This will make it a lot easier and simpler for plugins using UI components that are not used in core as they will be able to just enqueue whatever they need. (For reference, WordPress 3.2 included part of 1.8.12.)

    The wp_editor() API

    Since the last post there have been some bug fixes for wp_editor(). This is an updated API for both TinyMCE and Quicktags that outputs all parts of both editors in the same way as used on the Add / Edit Post screens. Plugins will be able to use the WordPress editor anywhere — including rendering the Visual/HTML tabs and the links to upload files and show the media library.

    Example usage:

    $content = 'The  content.';
    $editor_id = 'foo';
    $args = array(); // Optional arguments.
    wp_editor( $content, $editor_id, $args );
    

    Yeah, that’s it (though of course, you need to save it as well). Of note, there’s one pretty big gotcha: If you use wp_editor() to render the visual editor in a meta box, you risk problems. TinyMCE does not support being detached/moved in the DOM, which would occur when a meta box is dragged. (I’d look into the edit_form_advanced hook to render additional editors.)

    For more, there’s a nascent Codex page on the API.

    QuickTags

    Since the previous post there have been a few improvements for Quicktags (the HTML editor toolbar), including better loading of the default buttons and “safe” close_all_tags() functionality. The major issue here is that we updated a JavaScript “API” that was almost as old as WordPress, so maintaining compatibility has been difficult.

    Quicktags was refactored to make it fully multi-instance compatible (#16695). I think it still needs a Codex page, and I’ll ask @azaozz to post a tutorial here on how to use the new methods, and what before/after looks like in terms of converstion.

    wp_localize_script() and wp_add_script_before()

    When switching it to json_encode(), we opened up the possibility for encoding errors, so some changes were made to make this more backwards compatible. If you have previously used wp_localize_script() to pass arbitrary data (rather than localized strings), consider switching to wp_add_script_before().

    Edit, December 8: wp_add_script_before() was removed.

    Plupload

    The old SWFUpload has been replaced with Plupload. Nothing here has really changed since the previous post, other than strings and the presentation of the drop zone.

    wp_enqueue_script() now works mid-page

    Yes: wp_enqueue_script(), called mid-page, will now enqueue the script into the footer. This isn’t new from the previous update.

     
    • Marko Heijnen 7:42 am on December 7, 2011 Permalink | Reply

      If you want to use the editor in a meta box and you don’t want it to be moveable you can use this line of code:
      $(‘.wp-editor-area’).closest(‘.meta-box-sortables’).removeClass(‘meta-box-sortables’);

      It’s not the nicest solution but it is still better then weird behavior when trying to move the metabox.

    • arena 11:51 am on December 7, 2011 Permalink | Reply

      it would be “cool” to have in the new wp_editor api a setting to discard the fullscreen option such as

      ‘fullscreen’ => true/false (default = true)

    • Kenneth Newman 3:56 pm on December 7, 2011 Permalink | Reply

      ah, that wp_localize_script() thing was beating me up yesterday… good to know about wp_add_script_before() (and it also seems like a more semantic name for what we are doing).

    • arena 10:23 pm on December 7, 2011 Permalink | Reply

      Hello,

      I tried to change the_editor() with wp_editor() on my plugin page and got this :

      no buttons displayed
      when clicking on Visual/HTML got a js error :

      ed is undefined => qt._close(”, ed.canvas, ed); => line 550 => quicktags.dev.js

      any idea ?

    • Andrew Nacin 8:53 pm on December 8, 2011 Permalink | Reply

      This post was updated on December 8 to reflect that wp_add_script_before() has been removed.

    • Jason Penney 12:29 pm on December 9, 2011 Permalink | Reply

      Something that bit me, that might not be obvious: The dependencies changed between a lot of the jQuery UI components, meaning if you enqueued A and relied on the fact that A depended on B, you might be in for a surprise (especially since some of them no longer depend on jquery-ui-core).

  • Jane Wells 12:21 am on April 10, 2011 Permalink | Reply
    Tags: ,   

    Agenda for April 13 Dev Chat 

    • 3.2 check-in
    • GSoC update

    Sometimes not everyone is able to get to the dev chat due to time zones, work schedules, nap time, etc, so I think it would be useful to do a pre-meeting run-through of what we’ll cover. If any of these things apply to you (you’re working on it) and you won’t be at the dev chat, please leave a comment here before the meeting so we’ll know the status.

    3.2 check-in

    Freeze is 3 weeks from today, so if anyone has been putting off work on their assignments, now’s the time to get cracking. Quoting from Mark’s scope post for reference:

    people stay on target and making sure we don’t try to slip “one more thing” in.

    Just remember, if we stay on schedule (or better, get ahead of it), then the next release cycle will be here before you know it. No slipping things in.

    List Tables API improvements (Westi and Koop) — finalize the API for third party use and more flexibility.
    List Table XHR loading — to be investigated only after List Table API has stabilized. Make sure it’s worth it before we burn time on it.

    @westi said last week that he needed to “sit down and summarise the changes I think we should make to make it more extensible and start on them.” Progress report?

    PHP 5.2 (5.2.4, specifically) to be required. Drop compat. But don’t go adding a bunch of PHP5 stuff. This release is about dropping the old, not adding the new. More red than green.
    MySQL 5 to be required. This quite literally involves no work beyond changing the requirements. Do not change queries.

    @ryan: I think you were talking about starting on this before getting pulled onto some other stuff last week. Is this still something you’re handling?

    IE6 EOL for the admin. If BrowseHappy is updated in time, we can consider adding a “use a real browser” nag for IE6 users. We probably can’t drop much CSS, as IE7 shares a lot of the issues. This is mostly symbolic, and reduces the platform combos we need to test. This also means any security issues that are shown to only affect IE6 only can be lowered in priority.

    Who owns this?

    Distraction Free Writing. This is our headline “ooh, shiny” user feature. Replace our current fullscreen implementation with something more beautiful, more useful (in terms of line-length and font size), and simpler (only limited RTE functionality). Look at WriteRoom, OmmWriter, http://www.quietwrite.com/ for inspiration. Koop is investigating this, and may crank out a quick plugin to jump-start development efforts.

    @azaozz and @dkoopersmith were working on this, but I haven’t seen a plugin yet. Status?

    Upgrade improvements. Changed-files-only upgrades can be done with zero changes to core. For the first effort, let’s just do updates to the latest point-point from within the same major version. So, 3.2 to 3.2.2 and 3.2.1 to 3.2.2. Optionally consider scanning for changed core files and offering them a full upgrade to overwrite those changed files. Skip the wp-contents directory when upgrading (no more upgrading the default theme or bundled plugins).

    @dd32: Status?

    Speed improvements. There are a bunch of little things we can do to make WordPress load or at least “feel” faster. Nacin is looking at PHP lazy loading. He also is working on a patch to make the admin menu load faster by doing the expansion in PHP.

    Second one is in, first one is not, according to @nacin.

    Speed improvements. We can make the dashboard faster by not doing async requests for panes if the cache is hot.

    Who’s on this?

    Speed improvements. Dion has some FTP improvements that should make upgrades a lot faster for people using a certain FTP server.

    @dd32: update?

    Speed improvements. Everyone can get involved here. Pick sometime small and manageable that will make WordPress a little faster. Together, they’ll add up to a bullet point in the release post.

    Anyone working on any patches that fall under this category? Let’s get them on the list.

    Not on the original post by Mark, but being actively pursued:

    • Low-hanging XML-RPC tickets by @josephscott. Needed to go through them and identify likely candidates. Joseph: any update?
    • TinyMCE update being added to trunk by @azaozz, autop also needs an update. @azaozz asked for help with writing tests for autop. @azaozz: any update?

    GSoC

    By the time of the dev chat, all mentors should have rated/commented on all the student applications and come up with their list of the projects/students they would be willing to mentor. If we have more selected projects than we are likely to have slots, we can discuss the potential projects to see how much community interest there is in each idea. Note that we would have this discussion about projects, not students.

     
    • Andrew Nacin 12:38 am on April 10, 2011 Permalink | Reply

      I’ll be looking into PHP lazy loading this week. Browse Happy will be me as well.

      Mark started on the dashboard widgets with a patch. I’ll return to that this week, and collaborate with Mark on it. We had differing takes on the implementation, I think.

    • scribu 12:42 am on April 10, 2011 Permalink | Reply

      Speed improvements:

      • Taxonomy AND SQL performance: #16706 (tested and patches good to go)
      • General WP_Query SQL performance: #10964 (latest patch needs testing)

      meta query API improvements that should have been in 3.1:

      • meta_value = 0: #15292 (patch + tests ready)
      • ‘relation’ arg: #17011 (needs patch)
    • scribu 2:16 pm on April 10, 2011 Permalink | Reply

      More speed improvements, this time to the rewrite engine:

      • %postname% permalinks #16687 (needs-patch)
      • make better use of stubs #9824 (has-patch)
    • WraithKenny 2:35 pm on April 11, 2011 Permalink | Reply

      I’m willing to help on testing TinyMCE and autop (tab switching). I’ve got a Javascript guy in the office who expressed interest in helping also.

      • Andrew Ozz 9:55 pm on April 12, 2011 Permalink | Reply

        Great. Made a general ticket #17105 for reporting HTML 5.0 issues with the editors and autop.

        TinyMCE is set to keep all new tags although many of them do not display properly in the iframe (this is browser dependent and should improve as the browsers support more and more HTML 5).

        Autop has some known problems (rarely seen) with block tags that contain other block tags but apart from these all new tags should work well. What we need most seem to be more auto-tests for autop.

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
Follow

Get every new post delivered to your Inbox.

Join 1,061 other followers