Make WordPress Core

Opened 13 years ago

Closed 8 years ago

#15355 closed enhancement (maybelater)

Add ability to clear search results

Reported by: nacin's profile nacin Owned by: garyc40's profile garyc40
Milestone: Priority: normal
Severity: normal Version: 3.5.2
Component: Administration Keywords: has-patch
Focuses: ui Cc:

Description

Let's put a (X) next to "Search results for string" that immediately clears the search results. Otherwise there is no way to do it, without clearing the box manually and hitting enter.

We would use the same X we use for bulk edit.

Attachments (6)

clear_search.15355.patch (10.3 KB) - added by ocean90 13 years ago.
First pass
clear_search.2.15355.patch (13.0 KB) - added by ocean90 13 years ago.
With _search_results_subtitle()
garyc40.15355.diff (2.6 KB) - added by garyc40 13 years ago.
put #clear-search inside search box
garyc40.15355.2.diff (2.7 KB) - added by garyc40 13 years ago.
correct search box padding when X button is displayed
searchbox.png (9.2 KB) - added by garyc40 13 years ago.
screenshot
garyc40.15355.3.diff (2.7 KB) - added by garyc40 13 years ago.
check $_REQUEST['s'] instead of is_search()

Download all attachments as: .zip

Change History (28)

#1 @westi
13 years ago

Patches Welcome

#2 @ocean90
13 years ago

  • Owner set to ocean90
  • Status changed from new to accepted

#3 @ocean90
13 years ago

  • Keywords has-patch added; needs-patch removed

@ocean90
13 years ago

First pass

#4 @ocean90
13 years ago

  • Keywords ui-feedback added

@ocean90
13 years ago

With _search_results_subtitle()

#5 @JohnONolan
13 years ago

Can this go in post UI-freeze? If so, should definitely be run past Jane first

#6 @nacin
13 years ago

I proposed it to Jane originally and she approved it before I ticketed it.

However, I'm wondering if we're putting the X in the wrong spot now: Think maybe it should go in the search box itself. Koopersmith and I were considering that for internal linking as well.

#7 @JohnONolan
13 years ago

My preference would indeed be to have it in the search box. The search box is an expected place for a user interaction in order to modify or delete a search term, the heading of the page maybe not so much.

#8 @JohnONolan
13 years ago

  • Milestone changed from 3.1 to Future Release

#9 @ocean90
13 years ago

  • Keywords needs-patch added; has-patch ui-feedback removed

#10 @JohnONolan
13 years ago

  • Keywords needs-ui early-3.2 added

#11 @voyagerfan5761
13 years ago

  • Cc WordPress@… added

#12 @aaroncampbell
13 years ago

  • Keywords 3.2-early added; early-3.2 removed

#13 @garyc40
13 years ago

  • Owner changed from ocean90 to garyc40
  • Status changed from accepted to assigned

@garyc40
13 years ago

put #clear-search inside search box

@garyc40
13 years ago

correct search box padding when X button is displayed

@garyc40
13 years ago

screenshot

@garyc40
13 years ago

check $_REQUEST['s'] instead of is_search()

#14 @garyc40
13 years ago

  • Keywords has-patch added; needs-patch removed

#15 @scribu
13 years ago

  • Keywords added; 3.2-early removed

Out of scope for 3.2.

#16 @jane
12 years ago

  • Keywords removed

In the search box would make more sense, but realistically if the search is cleared, then it returns to the list table, no? Possibly a link to return to list table would be the easier approach?

#17 @ocean90
12 years ago

With [20168] Webkit browsers will have the X inside the search box, but it clears only the input field.

#18 @sethshoultes
11 years ago

  • Keywords dev-feedback added
  • Resolution set to worksforme
  • Status changed from assigned to closed
  • Version set to 3.5.2

What is the status of this ticket? I see the X (using webkit browsers) while testing the latest versions of WordPress (3.5 and 3.6). Are there plans to try making this work for non-webkit browsers?

Also, regarding this comment:
"In the search box would make more sense, but realistically if the search is cleared, then it returns to the list table, no? Possibly a link to return to list table would be the easier approach?"

I agree that a link to return to the list table makes. Maybe a new ticket should be created for that (if one has not been created already). However, if I understand the statement correctly, I don't agree that you should be returned to the table list, when clicking the X within the search box. It makes more sense to me that you just want to clear the text field when clicking the X.

#19 @helen
11 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Sounds like the original idea was not about an X in the input field, which of course should just clear the field and nothing else.

#20 @sethshoultes
11 years ago

Sorry! I didn't mean to close this ticket.

#21 @helen
10 years ago

  • Focuses ui added
  • Keywords reporter-feedback added; needs-ui dev-feedback removed

Do we still want this?

#22 @chriscct7
8 years ago

  • Keywords reporter-feedback removed
  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from reopened to closed

No further requests in 2 years, closing as maybelater

Note: See TracTickets for help on using tickets.