Page MenuHomePhabricator

Add the ability to return the parsed block reason to API:Userinfo
Closed, DeclinedPublic

Description

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

Event Timeline

dbarratt created this task.May 11 2018, 7:23 PM
dbarratt triaged this task as Normal priority.
dbarratt removed dbarratt as the assignee of this task.May 12 2018, 4:58 AM
MER-C added a subscriber: MER-C.May 12 2018, 9:14 AM

Should be both, really. See T191558 for list=blocks.

Should be both, really. See T191558 for list=blocks.

Agree. Alternatively, we should probably just replace the usage in MinervaNeue with something like T194585 anyways.

dbarratt updated the task description. (Show Details)May 13 2018, 4:32 AM
dbarratt updated the task description. (Show Details)
dbarratt updated the task description. (Show Details)
dbarratt renamed this task from Add the ability to return the parsed block reason to API:Userinfo or API:Blocks to Add the ability to return the parsed block reason to API:Userinfo.
Anomie closed this task as Declined.May 14 2018, 1:57 PM
Anomie added a subscriber: Anomie.

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.

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).

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 :)

@dbarratt: This isn't really the appropriate venue for discussing ideas like this. Let's try to stay focused on the immediate problems :)

ha! you got it. I should probably stop thinking out-loud. :)

MER-C removed a subscriber: MER-C.May 16 2018, 1:40 PM
Vvjjkkii renamed this task from Add the ability to return the parsed block reason to API:Userinfo to p3caaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot lowered the priority of this task from High to Normal.
CommunityTechBot closed this task as Declined.
CommunityTechBot renamed this task from p3caaaaaaa to Add the ability to return the parsed block reason to API:Userinfo.
CommunityTechBot added a subscriber: Aklapper.