Addshore added a comment.
So it looks like the only thing we would need to implement to enable a different API format to work would be https://github.com/wikimedia/wvui/blob/d77d02ac54ca2ba9a22e93ffe20debf36fc2e37b/src/components/typeahead-search/http/restSearchClient.ts#L11 This seems to be the place where the API definition of what a Search Result Object <https://www.mediawiki.org/wiki/API:REST_API/Reference#Search_result_object> switch to being a `RestResult` in WVUI. It looks like this could also be the place to tidy up some terminology if this is meant to be a generic search, such a fetchByTitle <https://github.com/wikimedia/wvui/blob/d77d02ac54ca2ba9a22e93ffe20debf36fc2e37b/src/components/typeahead-search/http/SearchClient.ts#L15> etc. As mentioned in the directory structure, this should probably be a generic `typeahead-search` not tied to MediaWiki or MediaWIki concepts. I would hope then that swapping out which client should be used based on if Wikibase is loaded or not would be fairly trivial? And that should either live in WVUI or in Wikibase as some kind of override? If that is the case I see no reason that when we have some free resources we couldn't quickly implement this TS client for the slightly different format. And then also implement the REST api. I'd advocate for an API in core that uses a less mediawikiy, more generic type ahead focused format too. That would also open up this #WUVI component for use in other contexts! TASK DETAIL https://phabricator.wikimedia.org/T275251 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore Cc: Volker_E, Manuel, karapayneWMDE, GreenReaper, R4356th, despens, darthmon_wmde, WMDE-leszek, daniel, sdkim, alexhollender, LGoto, Yair_rand, MPhamWMF, ovasileva, Addshore, Lydia_Pintscher, Aklapper, Jdlrobson, Patafisik_WMF, Invadibot, Selby, caldera, maantietaja, Akuckartz, Demian, WDoranWMF, holger.knust, EvanProdromou, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Winter, JJMC89, Iniquity, _jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, Niedzielski, Izno, Wikidata-bugs, aude, GWicke, Dinoguy1000, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
