Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #25187, comment 30


Ignore:
Timestamp:
11/12/2013 10:25:53 PM (11 years ago)
Author:
tollmanz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25187, comment 30

    initial v1  
    1 25187.18.diff is a first pass at the merge of the sticky menu component into core. In the merge process, I have updated a few things:
    2 
    3 * I added a debounce function to the resize and scroll events. It is important that this is throttled
    4 * Everything was cleaned up to pass the jshint rules
    5 * All repeated selectors were cached
    6 
    7 A few questions about this:
    8 
    9 1. Given the integration into core via add JS to an existing JS file and CSS to an existing CSS file, I removed the PHP related to this component that only served to load the assets. One piece of that PHP is that it did not load this JS/CSS on mobile other than iPad. I could not figure out why this was a requirement. Is this needed? Obviously, where possible, especially with a project like WordPress, browser sniffing is not desirable, so it would be nice to remove this altogether, but I do not have an idea as to the implications of it.
    10 1. I stole Underscore.js's debounce function. I did not want to include Underscore.js as it would make Underscore.js a dependency for all of WP admin. Any thoughts use of this function?
     1Removing this comment as it was in the wrong ticket.