WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 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 3 years ago.
14936.ajax.filter.patch (3.4 KB) - added by ocean90 3 years ago.
14936.diff (1.7 KB) - added by dd32 3 years ago.
14936.2.diff (1.7 KB) - added by dd32 3 years ago.

Download all attachments as: .zip

Change History (37)

comment:1 ryan4 years ago

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

comment:2 scribu4 years ago

  • Cc scribu added

comment:3 ryan4 years ago

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

comment:4 ryan4 years ago

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

comment:5 ryan4 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

comment:6 ryan4 years ago

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

comment:7 ryan4 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.

comment:8 ryan4 years ago

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

comment:9 ryan4 years ago

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

comment:10 ryan4 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.

comment:11 ryan4 years ago

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

comment:12 demetris4 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.

comment:13 ryan4 years ago

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

comment:14 follow-up: ryan3 years ago

Todo:

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

ocean903 years ago

comment:15 ocean903 years ago

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

comment:16 nacin3 years ago

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

comment:17 nacin3 years ago

props ocean90. Sorry :-(

ocean903 years ago

comment:18 in reply to: ↑ 14 ocean903 years ago

Replying to ryan:

Todo:

  • Have Apply Filters do an AJAX submit.

Done with 14936.ajax.filter.patch.

comment:19 scribu3 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)

comment:20 scribu3 years ago

  • Keywords needs-patch added

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

comment:21 scribu3 years ago

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

comment:22 scribu3 years ago

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

comment:23 scribu3 years ago

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

comment:24 ryan3 years ago

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

comment:25 dd323 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.

dd323 years ago

comment:26 garyc403 years ago

  • Keywords has-patch added; needs-patch removed

comment:27 dd323 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.

comment:28 westi3 years ago

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

comment:29 dd323 years ago

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

dd323 years ago

comment:30 dd323 years ago

attachment 14936.2.diff added

That covers my comments here on the patch.

comment:31 garyc403 years ago

dd32's patch tested. Works fine.

comment:32 ryan3 years ago

Does that remove_query_arg() need esc_url()?

comment:33 ryan3 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.