Opened 3 years ago
Last modified 4 months ago
#51884 new enhancement
Events Widget: There isn't a UI for clearing the selected city
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.2 |
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 (3)
Change History (9)
#1
@
3 years 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.
This ticket was mentioned in PR #844 on WordPress/wordpress-develop by Yeora.
2 years ago
#2
- Keywords has-patch added; needs-patch removed
Fixed #51884
Trac ticket: https://core.trac.wordpress.org/ticket/51884
#3
@
2 years 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
@
2 years ago
OKAY. I figured out how it works.
I had to update my dependencies.
With npm run watch.
Now PHPUnit tests are also included :)
Rough idea: add an extra link-button with text like "clear"