Skip to content

jQuery - Redundant file common/js/jquery.quicksearch.js #661

@htdat

Description

@htdat

Coming from https://github.com/Automattic/Edit-Flow/pull/649/files#r645394254

Expected/Desired Behavior

Remove file common/js/jquery.quicksearch.js and clean up non-relevant code.

(Optional) Additional notes

tl;dr - We can ignore finding test cases for this file common/js/jquery.quicksearch.js as it's not clear how these events are triggered.

I can not find how this file is relevant to the current state of the plugin, therefore I can not find exactly how these events are triggered.

For example, if I comment out this whole file common/js/jquery.quicksearch.js, only post editors (either Classic or Block) are showing an error:

jquery.min.js?ver=3.5.1:2 Uncaught TypeError: jQuery(...).quicksearch is not a function (user-groups.js?ver=0.9.7-dev-1622795075:2)

Relevant line:
https://github.com/Automattic/Edit-Flow/blob/8a52203127b483576410558f940097e583d6ef3d/modules/user-groups/lib/user-groups.js#L2

Even so, ef-post_following_users element does not exist on this page as well. I searched on HTML output and used this code in the browser console:

jQuery('#ef-post_following_users').length; // return 0

From @mikeyarce: Looks like the ef-post_following_users element was removed in 2011 here:
69d37af#diff-b44786d9772fb20b5bac33f34764ac58b1bbaca4ba7755a28655bd81681c0057L738

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions