Opened 12 years ago
Closed 12 years ago
#27451 closed enhancement (fixed)
Widget Customizer: Remove jQuery.liveFilter dependency
| Reported by: | ocean90 | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.9 |
| Component: | Customize | Version: | 3.9 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
The search should do a better job. First pass attached.
- Moves search to collection
- Searches in description field too
Attachments (2)
Change History (7)
This ticket was mentioned in IRC in #wordpress-dev by ocean90. View the logs.
12 years ago
#4
@
12 years ago
- Resolution fixed
- Status closed → reopened
Filtering the widget collection turns out to cause some issues with adding multiple widgets of a certain instance, and also for sorting widgets in a widget area. Patch incoming...
@
12 years ago
Update a search_matched property on the WidgetModel instead of filtering out widgets from availableWidgets; otherwise, the incremented multi_number gets lost, and only one instance of a multi-widget can be added. This also fixes a bug with a widget area losing its sortability after adding a widget via a search. Also, don't equate an empty array with an error when the instance is passed to the update_widget Ajax request. https://github.com/x-team/wordpress-develop/pull/9/files
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@ocean90: I love how the filter now matches against both the widget name and description, and how the order of the terms is irrelevant. Great idea on combining multiple lookahead patterns.
I found two issues:
/ /ginstead of' '), so only the order of the first two words was not significantHere're my revisions on your patch: https://github.com/x-team/wordpress-develop/commit/95c146a718b72f13419776e6dc41daa09327cbba
Our patches combined: https://github.com/x-team/wordpress-develop/pull/3/files