Should probably be in the same format as shown on the campaign list in T243011
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Include country and region codes in tree selector | mediawiki/extensions/CentralNotice | master | +14 -2 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • mepps | T226438 Epic: Rebase and finish Geotargeting (sub national targeting) | |||
Resolved | • mepps | T243012 Show selected countries and regions under tree selector |
Event Timeline
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.
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¬ice=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
Change 591123 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Include country and region codes in tree selector