Opened 3 years ago

Closed 2 years ago

#14936 closed task (blessed) (fixed)

Improve theme searching/browsing

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

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

Download all attachments as: .zip

Change History (37)

comment:1   ryan3 years ago

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

  • Cc scribu added

comment:3   ryan3 years ago

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

comment:4   ryan3 years ago

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

comment:5   ryan3 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   ryan3 years ago

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

comment:7   ryan3 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   ryan3 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   ryan3 years ago

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

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.

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

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.

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

comment:14 follow-up: ↓ 18   ryan3 years ago

Todo:

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

ocean902 years ago

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

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

props ocean90. Sorry :-(

ocean902 years ago

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

Replying to ryan:

Todo:

  • Have Apply Filters do an AJAX submit.

Done with 14936.ajax.filter.patch.

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)
  • Keywords needs-patch added

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

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

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

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

  • Resolution set to fixed
  • Status changed from new to closed
  • 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.

dd322 years ago

  • Keywords has-patch added; needs-patch removed

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.

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

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

dd322 years ago

attachment 14936.2.diff added

That covers my comments here on the patch.

dd32's patch tested. Works fine.

Does that remove_query_arg() need esc_url()?

  • 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.