WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 7 days ago

#51884 new enhancement

Events Widget: There isn't a UI for clearing the selected city

Reported by: iandunn Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords: good-first-bug needs-design has-patch
Focuses: ui Cc:

Description

If someone has manually selected a city in the Events Widget, there isn't an obvious way for them to clear that selection through the UI. They can manually change it to another city, but they can't go back to where the city would be automatically determined by IP geolocation.


Side note: One workaround is to enter an invalid city, like narnia, and then refresh the page.

Attachments (2)

clear link-button.png (174.7 KB) - added by iandunn 7 weeks ago.
Rough idea: add an extra link-button with text like "clear"
x icon.png (162.2 KB) - added by iandunn 7 weeks ago.
Rough idea: Add an x icon

Download all attachments as: .zip

Change History (7)

@iandunn
7 weeks ago

Rough idea: add an extra link-button with text like "clear"

@iandunn
7 weeks ago

Rough idea: Add an x icon

#1 @iandunn
7 weeks ago

The above screenshots show a few potential solutions. I think they'd still need some work to communicate to people how "clear" is different than "cancel", or what happens when they click "x".

Most people probably aren't aware, or don't remember, that the widget initially selected their location for them. So they might be unsure about those buttons would do, and hesitant to click them.

Last edited 7 weeks ago by iandunn (previous) (diff)

This ticket was mentioned in PR #844 on WordPress/wordpress-develop by Yeora.


3 weeks ago

  • Keywords has-patch added; needs-patch removed

#3 @mabipress
3 weeks ago

Hello :)
This is my first contribution to WordPress.
I skipped the AJAX PHP Unit test.
I tried to write a test with the _handleAjax Method , unfortunately it didn't work as I had imagined. (it only "mimics" the ajax request)

How do I test AJAX calls?

Thanks :)

#4 @mabipress
3 weeks ago

OKAY. I figured out how it works.
I had to update my dependencies.
With npm run watch.
Now PHPUnit tests are also included :)

Last edited 3 weeks ago by mabipress (previous) (diff)

#5 @prbot
7 days ago

Yeora commented on PR #844:

@iandunn Thank you for your suggestions for improvement :)

Note: See TracTickets for help on using tickets.