Page MenuHomePhabricator

Show selected countries and regions under tree selector
Closed, ResolvedPublic

Description

Should probably be in the same format as shown on the campaign list in T243011

Event Timeline

Ejegg renamed this task from Collapse countries and regions into one column in the campaign list to Show selected countries and regions under tree selector.Jan 22 2020, 11:18 PM
Ejegg updated the task description. (Show Details)

So this I actually do see happening already.

From @Ejegg: This other ticket: T243012 is about showing the full list under the tree selector (rather than just the count of countries and regions) so that people can see at a glance what's selected, without scrolling through the whole tree selector.

From me: Gotcha!

In my initial investigation, it looks like we can't mimic the exact way it looks in the columns because as of now, the columns in Special:CentralNotice use region numerical codes and what's available in js for the selector tree is either the text name or a letter code.

Current thoughts:

  • If we're going to display the regions the same way as the dashboard, I for some reason am blanking on how to group them all by country and then convert to a string. In one iteration I had the object but my brain wouldn't recreate how to pull it out into a string.
  • I've wondered how the UX will be if the list is too long and played with some other formats, though as I write I'm thinking the first is probably best. (Other formats like, listing countries, then saying X number regions in another countries list.)

Actually since writing that I'm much closer on the first problem, just have to remember how to slice off the last two characters of a string.

DStrine raised the priority of this task from High to Needs Triage.Mar 2 2020, 3:22 PM

@spatton @Pcoombe @TSkaff

Check out the changes we have made for Geotargeting in the CN staging sever here:
https://cn-stage-2.wmflabs.org/w/index.php?title=Special:CentralNotice&subaction=noticeDetail&notice=test_campaign1
That link will take you directly to a test campaign where you can see the tree selector for countries (screenshot also below). Let us know what you think of this.

This looks good! The arrows to expand a country could be a bit more obvious though. I like the filter, and also how it tells you what is currently selected below.

Change 591123 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@master] Include region code with name in tree selector

https://gerrit.wikimedia.org/r/591123

Change 591123 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Include country and region codes in tree selector

https://gerrit.wikimedia.org/r/591123