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

Handle empty Jade pages
Closed, ResolvedPublic

Description

We need to render the UI for all empty pages under the Jade namespace. It should display the "Propose New Label" button for the top facet.

One possible approach is to use the TitleIsAlwaysKnown hook and then render a Jade Entity with an empty 'editquality' facet on the front-end.

Here's a good example of how to use the hook:
https://github.com/wikimedia/mediawiki-extensions-GlobalUserPage/commit/78bbe09e013ab2ca4f3acc67cbbff0047828ac2d

Event Timeline

After some initial research, it seems that the TitleIsAlwaysKnown hook is not what we need.

Maybe we can reverse engineer https://www.mediawiki.org/wiki/Extension:Special404 to get something similar?

Change 577013 had a related patch set uploaded (by Accraze; owner: Accraze):
[mediawiki/extensions/Jade@master] Handle empty EntityContent object

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

Just added a patchset that contains a shortcut for us to create an empty entity page on the fly by creating a page with an empty object: {}

Here's a gif showing the process:

empty-page-hack.gif (937×1 px, 2 MB)

The above patchset doesn't get us 100% to our goal, but it's a step in the right direction.

Currently looking at using parser hooks to auto-create pages within the Jade namespace, similar to this extension: https://www.mediawiki.org/wiki/Extension:AutoCreatePage

https://github.com/mkroetzsch/AutoCreatePage

Change 577013 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] Handle empty EntityContent object

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

Change 579116 had a related patch set uploaded (by Accraze; owner: Accraze):
[mediawiki/extensions/Jade@master] Show empty facet on non-existing entity pages

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

Ok, so I finally got this working using the ShowMissingArticle hook and submitted the above patchset.
Basically, we check if the missing article in question is in the Jade namespace and if it is, then we load all the JS resources and hide the noarticletext div on page load.

Change 579116 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] Show empty facet on non-existing entity pages

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

Change 579447 had a related patch set uploaded (by Accraze; owner: Accraze):
[mediawiki/extensions/Jade@master] Render header and diff on empty Jade page

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

Change 579447 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] Render header and diff on empty Jade page

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

Change 579661 had a related patch set uploaded (by Accraze; owner: Accraze):
[mediawiki/extensions/Jade@master] view split on empty entity page

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

Change 579661 merged by jenkins-bot:
[mediawiki/extensions/Jade@master] view split on empty entity page

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