Make WordPress Core

Opened 16 years ago

Closed 11 years ago

#15355 closed enhancement (maybelater)

Add ability to clear search results

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

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

Download all attachments as: .zip

Change History (28)

#1 @westi
16 years ago

Patches Welcome

#2 @ocean90
16 years ago

  • Owner set to ocean90
  • Status new → accepted

#3 @ocean90
16 years ago

  • Keywords has-patch added; needs-patch removed

@ocean90
16 years ago

First pass

#4 @ocean90
16 years ago

  • Keywords ui-feedback added

@ocean90
16 years ago

With _search_results_subtitle()

#5 @JohnONolan
16 years ago

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

#6 @nacin
16 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
16 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
16 years ago

  • Milestone 3.1 → Future Release

#9 @ocean90
16 years ago

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

#10 @JohnONolan
16 years ago

  • Keywords needs-ui early-3.2 added

#11 @voyagerfan5761
16 years ago

  • Cc WordPress@… added

#12 @aaroncampbell
16 years ago

  • Keywords 3.2-early added; early-3.2 removed

#13 @garyc40
16 years ago

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

@garyc40
16 years ago

put #clear-search inside search box

@garyc40
16 years ago

correct search box padding when X button is displayed

@garyc40
16 years ago

screenshot

@garyc40
16 years ago

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

#14 @garyc40
16 years ago

  • Keywords has-patch added; needs-patch removed

#15 @scribu
16 years ago

  • Keywords 3.2-early removed

Out of scope for 3.2.

#16 @jane
15 years ago

  • Keywords has-patch needs-ui, → has-patch needs-ui

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
14 years ago

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

#18 @sethshoultes
13 years ago

  • Keywords dev-feedback added
  • Resolution → worksforme
  • Status assigned → closed
  • Version → 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
13 years ago

  • Resolution worksforme
  • Status closed → 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
13 years ago

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

#21 @helen
13 years ago

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

Do we still want this?

#22 @chriscct7
11 years ago

  • Keywords reporter-feedback removed
  • Milestone Future Release
  • Resolution → maybelater
  • Status reopened → closed

No further requests in 2 years, closing as maybelater

Note: See TracTickets for help on using tickets.