API:Userinfo should have an option or property to return the parsed wikitext message rather than the raw wikitext.
The parsed message would only parse the links just like the display on Special:BlockList
API:Userinfo should have an option or property to return the parsed wikitext message rather than the raw wikitext.
The parsed message would only parse the links just like the display on Special:BlockList
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T190946 Epic: Improve the mobile block experiences | |||
Resolved | matmarex | T194566 Parse the links in the block reason on IP User block notice on mobile | |||
Declined | None | T194530 Add the ability to return the parsed block reason to API:Userinfo |
Agree. Alternatively, we should probably just replace the usage in MinervaNeue with something like T194585 anyways.
See also T191939: How to deal with blocked messages on client that require advanced parsing?, there's already ambiguity between when a block reason should be interpreted as full-featured wikitext versus comment-style limited wikitext. In either case, action=parse already exists (use its summary parameter to parse as comment-style limited wikitext).
Personally, I'd lean towards deprecating and removing the "parsedcomment" properties from other API modules as well.
So what you're saying is, is that the preferred way of parsing wikitext on the client is to use the API to do so? Is it acceptable to make another round trip to do this? I suppose it's not a huge deal with HTTP/2. What do you think @Jdlrobson?
Personally, I'd lean towards deprecating and removing the "parsedcomment" properties from other API modules as well.
Ironically, this is actually a good use case for GraphQL which supports arguments, so basically we could have a reason field which would have an argument where you could specify the type of parsing that you want (full, comment, etc.), but the default would be none.
Might be worth creating an experimental extension or something that would wrap the Action API in GraphQL just as a way to see if it resolves some of these use cases (thinking out-loud here, ha).
So what you're saying is, is that the preferred way of parsing wikitext on the client is to use the API to do so? Is it acceptable to make another round trip to do this? I suppose it's not a huge deal with HTTP/2. What do you think @Jdlrobson?
Let's follow up at T191558 (since this ticket is closed).
Ironically, this is actually a good use case for GraphQL which supports arguments, so basically we could have a reason field which would have an argument where you could specify the type of parsing that you want (full, comment, etc.), but the default would be none.
@dbarratt: This isn't really the appropriate venue for discussing ideas like this. Let's try to stay focused on the immediate problems :)