[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

Render wikitext in Jade endorsementcomment and notes fields.
Closed, ResolvedPublic

Description

Essentially, we want to parse wikitext on page save for updating the pagelinks and categorylinks table as well as the search index. We also want to render wikitext when the page is requested so that links and other wikitext bits are visible.

Related Objects

Event Timeline

Halfak updated the task description. (Show Details)

I think that @Catrope was involved in parsing/rendering wikitext for Flow/StructuredDisucssions. I wonder if you have any pointers for us to help us do it right.

Halfak triaged this task as Medium priority.Jun 22 2020, 8:58 PM

Change 608813 had a related patch set uploaded (by Kevin Bazira; owner: Kevin Bazira):
[mediawiki/extensions/Jade@master] Integrated parsing of wikitext in Jade entity data proposal notes

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Jade/ /608813

Change 608813 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] Integrated parsing of wikitext in Jade entity data proposal notes

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Jade/ /608813

Great work on this so far @kevinbazira ! I have a couple of notes:

  • I see what you mean about the html markup being shown when users edit the notes. Maybe we can supply both the parsed and unparsed text to the frontend and then load the 'unparsed' text in the text area field when the user clicks 'Edit'.
  • Also, this is going to be tricky on the Ajax pages. One possible solution I can think of is to expose EntityBuilder::parseWikitextInProposalNotes via an API module and use an api client to handle parsing on those pages.

We can parse arbitrary wikitext with the API too. E.g. https://en.wikipedia.org/w/api.php?action=parse&text=%27%27%27boldtext%27%27%27

There would be a delay in handling that dynamically so it would be better if we could generated the parsed text in Jade's response.

Thank you @ACraze and @Halfak for the suggestions. I ended up supplying both the parsed and unparsed text to the frontend and then loaded the 'unparsed' text in the text area field when the user clicks 'Edit'.

Yes, with the Ajax pages, this is already tricky. To avoid the delay that @Halfak is referring to, I will consult @ACraze on how best we can expose
EntityBuilder::parseWikitextInProposalNotes via an API module and use an api client to handle parsing on Ajax pages.

Change 609102 had a related patch set uploaded (by Kevin Bazira; owner: Kevin Bazira):
[mediawiki/extensions/Jade@master] Integrated parsing of wikitext in Jade entity data endorsement comments

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Jade/ /609102

Change 609102 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] Integrated parsing of wikitext in Jade entity data endorsement comments

https://gerrit.wikimedia.org/r/609102

Change 609974 had a related patch set uploaded (by Kevin Bazira; owner: Kevin Bazira):
[mediawiki/extensions/Jade@master] Integrated parsing of wikitext in Jade entity data for Ajax pages

https://gerrit.wikimedia.org/r/609974

Change 609974 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] Integrated parsing of wikitext in Jade entity data for Ajax pages

https://gerrit.wikimedia.org/r/609974

nice one @kevinbazira ! I'm glad we figured out how to include the parsed output in the results without adding an additional API call.