Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#16196 closed defect (bug) (fixed)

"Available themes" is empty/confusing when there are no other themes installed

Reported by: solarissmoke's profile solarissmoke Owned by:
Milestone: 3.1 Priority: normal
Severity: minor Version: 3.1
Component: Themes Keywords: has-patch commit
Focuses: Cc:

Description

When there are no alternative themes installed, wp-admin/themes.php just has <h3>Available Themes</h3> followed by an empty table. I think this can be a bit confusing (and it looks a bit weird as well).

It might be better to say something like "you have no other themes installed at the moment. You can [link to theme-install.php] search for themes here." And to not create an empty table.

Attachments (9)

16196.patch (564 bytes) - added by solarissmoke 13 years ago.
Don't show empty "available themes" table, and link to theme-install.php
garyc40.16196.diff (1.7 KB) - added by garyc40 13 years ago.
use display_rows_or_placeholder() for themes-list-table and theme-install-list-table, also fixed some css inconsistencies in theme-install-list-table
before.png (21.6 KB) - added by garyc40 13 years ago.
before css and display_rows_or_placeholder() fix
after.png (23.8 KB) - added by garyc40 13 years ago.
after css and display_rows_or_placeholder() fix
garyc40.16196.2.diff (2.9 KB) - added by garyc40 13 years ago.
also fix empty (hidden) tablenav on themes.php when total_pages <= 1
before garyc40.16196.2.png (107.1 KB) - added by garyc40 13 years ago.
tablenav was output but display:none with height:30px
after garyc40.16196.2.png (100.3 KB) - added by garyc40 13 years ago.
removed tablenav altogether when total_pages <= 1
16196.diff (404 bytes) - added by nacin 13 years ago.
Sad panda.
16196.2.diff (3.4 KB) - added by solarissmoke 13 years ago.

Download all attachments as: .zip

Change History (18)

@solarissmoke
13 years ago

Don't show empty "available themes" table, and link to theme-install.php

#1 @solarissmoke
13 years ago

  • Keywords has-patch dev-feedback added

@garyc40
13 years ago

use display_rows_or_placeholder() for themes-list-table and theme-install-list-table, also fixed some css inconsistencies in theme-install-list-table

@garyc40
13 years ago

before css and display_rows_or_placeholder() fix

@garyc40
13 years ago

after css and display_rows_or_placeholder() fix

@garyc40
13 years ago

also fix empty (hidden) tablenav on themes.php when total_pages <= 1

@garyc40
13 years ago

tablenav was output but display:none with height:30px

@garyc40
13 years ago

removed tablenav altogether when total_pages <= 1

#2 @dd32
13 years ago

  • Keywords 3.2-early added; dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release

3.2 may include a review of the UI screens related to this

#3 follow-up: @nacin
13 years ago

  • Keywords 3.2-early removed
  • Milestone changed from Future Release to 3.1

The main thing here is a regression. The code was written and is in the list table no less.

Please see my attached patch (I found this ticket after) for my simple fix, at least.

@nacin
13 years ago

Sad panda.

#4 in reply to: ↑ 3 @solarissmoke
13 years ago

Do we still need to print an empty table at the bottom - or could we move $wp_list_table->display(); to before the elseif ?

#5 follow-up: @nacin
13 years ago

We would need to check to make sure it's not a search I think -- see the start of that. I didn't dig too deep into the logic, I just remember doing all the strings in no_items() and was very surprised to not see them echo'd.

I don't even want to check what happens when a search returns no results. It looks like no_items() gets called, and no_items() currently doesn't take into account searching and the like. :-(

#6 in reply to: ↑ 5 @solarissmoke
13 years ago

Replying to nacin:

This patch sorts out those issues and I think it is consistent with the generic behaviour of WP_List_Table. The output of no_items() looks a bit funky IMO, but that is a styling issue which garyc40 has provided a suggestion for. I've consolidated all into one patch.

Last edited 13 years ago by solarissmoke (previous) (diff)

#7 @garyc40
13 years ago

Checked all other outputs of no_items(). Seems like WP_Themes_List_Table is the only one we need to account for searching.

#8 @nacin
13 years ago

  • Keywords commit added

Patch tested and looks good. And thanks Gary for checking.

#9 @ryan
13 years ago

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

(In [17303]) Improve presentation when there are no available themes. Props solarissmoke, garyc40. fixes #16196

Note: See TracTickets for help on using tickets.