Opened 7 years ago
Closed 6 years ago
#41112 closed enhancement (fixed)
Show WordCamps higher up in the News Dashboard widget
Reported by: | grapplerulrich | Owned by: | metalandcoffee |
---|---|---|---|
Milestone: | 4.9.7 | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Administration | Keywords: | fixed-major |
Focuses: | Cc: |
Description
WordCamp Bern is planned for 9th September. Till then we have three Meetups planned for June, July and August. Due to this the WordCamp is not being displayed on the list of events.
It is not really important for us that people see the Meetup happening in August but that people see that there is a WordCamp in September.
As there is less organising for meetup it does not mater if people sign up a few days before but for WordCamp we want people to buy their tickets as soon as possible.
If there is a WordCamp nearby it should be shown at the top of list of events.
Related #40702
Attachments (8)
Change History (34)
#1
@
7 years ago
- Focuses rest-api removed
- Milestone changed from Awaiting Review to WordPress.org
Not related to the REST API; data is provided by WordPress.org under the hood, and it seems like that's probably where this wants to be fixed.
#2
@
7 years ago
- Focuses javascript removed
- Keywords ui-feedback good-first-bug added
This was brought up previously, and I think it's a great idea; there just wasn't time for it in v1.
It'll require some changes on the API side to make camps sticky in API responses, but I think it'll also require some minor (PHP and CSS) tweaks in Core.
cc @mrwweb, @mapk
#3
@
7 years ago
- Keywords has-patch added
- Owner set to grapplerulrich
- Status changed from new to assigned
Assigning ownership to mark the good-first-bug
as "claimed".
#4
@
7 years ago
@iandunn Is there already a meta ticket for the API change? Without that change, one cannot really work on this ticket.
#5
@
7 years ago
For anyone looking to contribute the API code can be found here: https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/events/1.0/index.php#L682
#6
@
7 years ago
The Meta ticket is meta:#2994.
#8
@
7 years ago
- Owner set to metalandcoffee
This is being worked on at WordCamp Philly contributor day . Assigning to @metalandcoffee as her computer is being used for the patch.
#9
@
7 years ago
- Keywords has-patch added; needs-patch removed
The above patch was worked on at WordCamp Philly Contributor Day by myself, @warmlaundry, and @alejandroxlopez along with @jorbin.
We found a way to do this without any API changes being necessary. Feedback is encouraged.
#10
@
7 years ago
I tested it with the location Utrecht
as I knew there was a WordCamp planned but at least three meetups till then. See the screenshot above of the before and after applying the patch.
#11
@
7 years ago
- Milestone changed from WordPress.org to 5.0
Thanks @metalandcoffee, I think 41112.diff moves this forward :)
My hunch is that we'll also need some changes on the API side. In some active cities, there can be 2-3 meetup events per week. Since Core only requests 5 events from the API, the WordCamp wouldn't show up in the API response until about 2-3 weeks before the date.
Regardless of that, though, this is still an improvement on the current situation. If the API changes are languishing, then maybe we can do something like this for 5.0, and then iterate on it once the API is ready. If anyone wants to work on that side of things, the details are in #meta2994, and I posted some instructions for setting up the dev environment in Slack.
I think the widget will probably feel the most intuitive to people if the camp is just listed in the normal chronological flow, rather than having a fixed position at the top. We talked about it a bit before, but there wasn't a lot of feedback, so I'm definitely open to other ideas if you think having it at the top is better.
This ticket was mentioned in Slack in #meta-wordcamp by mrwweb. View the logs.
7 years ago
#13
follow-up:
↓ 14
@
7 years ago
Some suggestions for improvement:
- The ‘Community Events’ widget could be tabbed. One tab for WordCamps, one for meetups. That way we still could stick to 3 items and not mix up the types of events.
- Fix with: next local WordCamp, Local Meetup and Regional WordCamp. If there is not alocal WordCamp or a Regional WordCamp then show a meetup.
#14
in reply to:
↑ 13
@
7 years ago
Replying to vertizio:
The ‘Community Events’ widget could be tabbed. One tab for WordCamps, one for meetups. That way we still could stick to 3 items and not mix up the types of events.
I think one of the great things about the way the widget is currently designed, is that the user doesn't have to do anything. Their location is detected automatically, and the relevant events are shown automatically.
The goal of the widget is to promote WP events to users who aren't already aware of the community, so we can't expect them to do any work in order to get the information. We're just trying to pique their interest.
If we switch to tabs, then the user has to do extra work to see the extra events, and I'd worry that the vast majority would never do that.
The current approach feels like it lines up much more with the design for the majority
and decisions not options
part of WP's philosophy.
#15
@
7 years ago
- Keywords has-unit-tests needs-testing added
A camp is now pinned to the API response, as of [meta6275].
41112.2.diff moves the pinned camp from the top to the bottom, and adds a unit test. It needs a bit more testing, but I think it's in good shape.
#16
@
7 years ago
41112.3.diff restores the continue
, in order to make the diff a bit simpler, and also adds some more tests.
For manual testing, you should see it working for Albuquerque
and Philly
right now, since they have camps coming up in the next 6 weeks, but 3+ meetups before then.
Sticking this in an mu-plugin
is helpful, to avoid having to manually clear the local cache:
add_action( 'init', 'clear_events_cache' );
function clear_events_cache() {
$location = get_user_option( 'community-events-location', get_current_user_id() );
if ( isset( $location['ip'] ) ) {
delete_site_transient( 'community-events-' . md5( $location['ip'] ) );
}
if ( isset( $location['latitude'], $location['longitude'] ) ) {
delete_site_transient( 'community-events-' . md5( $location['latitude'] . $location['longitude'] ) );
}
}
#17
follow-up:
↓ 18
@
7 years ago
@dd32, do you have time to give this a sanity check? I think it's ready for commit.
With the patch applied, you should see WordCamp Lancaster
show up if you set your location to Philadelphia
.
#18
in reply to:
↑ 17
;
follow-up:
↓ 19
@
7 years ago
Replying to iandunn:
@dd32, do you have time to give this a sanity check? I think it's ready for commit.
With the patch applied, you should see
WordCamp Lancaster
show up if you set your location toPhiladelphia
.
After applying your patch I still see WordCamp Lancaster
on the bottom of the list. Shouldn't it show up on top?
#19
in reply to:
↑ 18
@
7 years ago
Replying to nielslange:
After applying your patch I still see
WordCamp Lancaster
on the bottom of the list. Shouldn't it show up on top?
I left them in chronological order, since that seems more intuitive, unless we're going to add some visual indicators that the camp is pinned.
events dashboard widget with only meetups and not the WordCamp