WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#14936 closed task (blessed) (fixed)

Improve theme searching/browsing

Reported by: ryan Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

Lift some of the search and browse ideas from the wordpress.com themes.php.

Attachments (4)

typo.14936.patch (694 bytes) - added by ocean90 6 years ago.
14936.ajax.filter.patch (3.4 KB) - added by ocean90 6 years ago.
14936.diff (1.7 KB) - added by dd32 6 years ago.
14936.2.diff (1.7 KB) - added by dd32 6 years ago.

Download all attachments as: .zip

Change History (37)

#1 @ryan
6 years ago

(In [15644]) Theme searching. First pass. see #14936

#2 @scribu
6 years ago

  • Cc scribu added

#3 @ryan
6 years ago

(In [15645]) Options list for current theme. see #14936

#4 @ryan
6 years ago

(In [15646]) Options list for current theme. see #14936

#5 @ryan
6 years ago

(In [15655]) get_theme_feature_list() replaces install_themes_feature_list(). Does translation and works if feature_list is not accessible from api.wordpress.org. see #14936

#6 @ryan
6 years ago

(In [15656]) Feature filter visuals. First pass. see #14936

#7 @ryan
6 years ago

Rough, first pass of feature filter. It needs to be hooked into the search, paging, AJAX loading stuff.

Vision: Have theme-install.php look and behave the same as themes.php.

#8 @ryan
6 years ago

The Details disclosures in theme-install.php don't work. Looks like theme-install.js was never added and no one noticed?

#9 @ryan
6 years ago

Looks like theme-install.js was collapsed into theme-preview.js. The enqueue for theme-install is dead and can be removed.

#10 @ryan
6 years ago

If we move theme-install to do search and filter like themes.php does, the loop that builds the filter could be stuck in a display_theme_feature_filter() func and shared by both.

#11 @ryan
6 years ago

(In [15727]) Move themes_api() to theme.php so that it is available to themes.php. see #14936

#12 @demetris
6 years ago

The options list for the current theme (added in r15645 and r15646) seems to include all items from the Appearance menu, but not all of those are theme-specific, since plugins can add items there too.

Here is an example, for Twenty Ten:

OPTIONS: Widgets | Menus | Lightbox Plus | Background | Header

Here the list also includes the Lightbox Plus screen, since the Lightbox Plus plugin adds its menu item under Appearance. But Lightbox Plus is not theme-specific.

#13 @ryan
6 years ago

(In [15807]) Hook up theme filter. see #14936

#14 follow-up: @ryan
6 years ago

Todo:

  • Have Apply Filters do an AJAX submit.
  • Look into options issue demetris notes above.

@ocean90
6 years ago

#15 @ocean90
6 years ago

typo.14936.patch: Fix the theme preview and the Details disclosures.

#16 @nacin
6 years ago

(In [16524]) Use correct name in script loader. see #14936.

#17 @nacin
6 years ago

props ocean90. Sorry :-(

#18 in reply to: ↑ 14 @ocean90
6 years ago

Replying to ryan:

Todo:

  • Have Apply Filters do an AJAX submit.

Done with 14936.ajax.filter.patch.

#19 @scribu
6 years ago

Found a problem with 14936.ajax.filter.patch:

  1. Check one or more filters and click Apply (rows are updated)
  2. Uncheck all filters and click Apply (nothing happens)

#20 @scribu
6 years ago

  • Keywords needs-patch added

theme-install.php returns no themes if you check more than one feature.

#21 @scribu
6 years ago

(In [16540]) Remove vestige code from theme.js. See #14936

#22 @scribu
6 years ago

(In [16553]) Ajaxify theme feature filter. Props ocean90 for initial patch. See #14936

#23 @scribu
6 years ago

(In [16554]) Make filter_count() a closure. See #14936

#24 @ryan
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#25 @dd32
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This needs some no-js love, ?filter=1 is present in the Link, however it doesn't have any PHP handler for it.

See Patch.

Note: The patch moves </form> to encompass the table, This is to allow the pagination to be changed by typing a number in, At present, the list table is not within a form element, so typing a number into the pagination option and hitting enter results in.. well.. nothing, Moving the form element corrects this.

@dd32
6 years ago

#26 @garyc40
6 years ago

  • Keywords has-patch added; needs-patch removed

#27 @dd32
6 years ago

note on that patch: <input type="hidden" name="filter" value="1" /> needs to be wrapped in a if ( !empty($_GET['filter']) ) as it's for non-js mode only, and with it in there like that, causes the filter to display every time a search/manual pagination is executed.

#28 @westi
6 years ago

Rather than re-opening this ticket we should really raise a new one to trac the no-js issues

#29 @dd32
6 years ago

I considered it, But given that this had half implemented it already, Felt it was best to keep it all together.

@dd32
6 years ago

#30 @dd32
6 years ago

attachment 14936.2.diff added

That covers my comments here on the patch.

#31 @garyc40
6 years ago

dd32's patch tested. Works fine.

#32 @ryan
6 years ago

Does that remove_query_arg() need esc_url()?

#33 @ryan
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [17364]) Fix theme filtering when no JS. Props dd32. fixes #14936

Note: See TracTickets for help on using tickets.