Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added projects: Wikidata, 
MediaWiki-extensions-WikibaseRepository, wdwb-tech.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  In T104344 <https://phabricator.wikimedia.org/T104344>, we updated the 
`wbsearchentities` response to add a `display` section that contains the label 
and description of the returned entity (if available) //with their language 
code//. This makes the old `label` and `description` fields (outside the 
`display`), where the language is unknown, redundant, and in our significant 
change announcement 
<https://lists.wikimedia.org/hyperkitty/list/[email protected]/thread/3LA6FDOZGSK6HSQY73XCFNT4BTYWOY64/>
 we “recommend[ed] that you don’t use them in new code” (though we didn’t call 
them deprecated yet).
  
  At some point in the future – not too soon, but not too far away either; 
perhaps in the MediaWiki 1.40 cycle, since the `display` is present since 1.39 
– we should remove the `label` and `description` without a language code. This 
will remove some code, reduce bandwidth consumed by search responses, and 
perhaps also avoid some confusion by API users over why the label and 
description are returned twice.
  
  At the same time, we should also update the entity selector JS code to no 
longer fall back to the plain `label`/`description` fields when `display` is 
absent. This will affect users of the `wikibase.entityselector.search` JS hook 
(which is a stable interface); they were notified 
<https://www.wikidata.org/w/index.php?title=Wikidata:Project_chat&type=revision&diff=1604758022&oldid=1604665724&diffmode=visual>
 already that they “should” make the returned object have a `display` part, but 
now it will become mandatory.
  
  Both of these changes will be breaking changes, and should be announced 
according to our stable interface policy 
<https://www.wikidata.org/wiki/Wikidata:Stable_Interface_Policy> (probably 
together in a single announcement).
  
  Current API response for this search 
<https://www.wikidata.org/w/api.php?action=wbsearchentities&search=%D9%85%D9%84%D8%B9%D8%A8%20%D9%88%D9%8A%D9%83%D9%8A%20%D8%AF%D8%A7%D8%AA%D8%A7&language=ar&uselang=ar&formatversion=2>:
  
    {
        "searchinfo": {
            "search": "ملعب ويكي داتا"
        },
        "search": [
            {
                "id": "Q4115189",
                "title": "Q4115189",
                "pageid": 4246474,
                "display": {
                    "label": {
                        "value": "ملعب ويكي داتا",
                        "language": "ar"
                    },
                    "description": {
                        "value": "This is a sandbox for testing changes to 
items. Please be gentle with it. Feel free to change anything on this page! For 
testing links, try adding ones to userpages.",
                        "language": "en"
                    }
                },
                "repository": "wikidata",
                "url": "//www.wikidata.org/wiki/Q4115189",
                "concepturi": "http://www.wikidata.org/entity/Q4115189";,
                "label": "ملعب ويكي داتا",
                "description": "This is a sandbox for testing changes to items. 
Please be gentle with it. Feel free to change anything on this page! For 
testing links, try adding ones to userpages.",
                "match": {
                    "type": "label",
                    "language": "ar",
                    "text": "ملعب ويكي داتا"
                }
            }
        ],
        "success": 1
    }
  
  Desired response with fewer fields in the output:
  
    {
        "searchinfo": {
            "search": "ملعب ويكي داتا"
        },
        "search": [
            {
                "id": "Q4115189",
                "title": "Q4115189",
                "pageid": 4246474,
                "display": {
                    "label": {
                        "value": "ملعب ويكي داتا",
                        "language": "ar"
                    },
                    "description": {
                        "value": "This is a sandbox for testing changes to 
items. Please be gentle with it. Feel free to change anything on this page! For 
testing links, try adding ones to userpages.",
                        "language": "en"
                    }
                },
                "repository": "wikidata",
                "url": "//www.wikidata.org/wiki/Q4115189",
                "concepturi": "http://www.wikidata.org/entity/Q4115189";,
                "match": {
                    "type": "label",
                    "language": "ar",
                    "text": "ملعب ويكي داتا"
                }
            }
        ],
        "success": 1
    }

TASK DETAIL
  https://phabricator.wikimedia.org/T304878

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Aklapper, Astuthiodit_1, karapayneWMDE, Invadibot, 
maantietaja, ItamarWMDE, Akuckartz, Nandana, lucamauri, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Addshore, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to