Jump to content

User:Dantman/Page output branch

From mediawiki.org

Goals

[edit]
  • Implementation of Requests for comment/Drop actions in favour of page views and special pages
  • The creation of a new PageView system.
    • Instead of an Article instance a PageView instance controls what is output into a page including &oldid= handling
    • SpecialPages become PageView implementations
  • Removal of the Action system
    • Implementation of actions as special pages
    • Implementation of a layer that lets us use &action= urls for title (and maybe user?) targeted special pages like history, edit, whatlinkshere, and maybe block.
  • Removal of functional logic from SkinTemplate
    • Generation of page tabs becomes the job of PageView instead of code hardcoded into SkinTemplate.
    • Likewise for links such as contribs links from a userpage.

Plans

[edit]
  • Start implementing PageView by migrating things piece by piece from Article. - Partially done
  • Implement a new SpecialPage interface for action like special pages
    • SpecialPage name autodetection from class name. - Done (@todo Perhaps we should add a test to ensure that 'SpecialPage' doesn't make it think the name is 'Page')
    • Targetable special pages - Partially done
      • target() and executeWithTarget() - Done
      • Type sensitive target() - Done
      • Default executeWithoutTarget() form.
    • A way to mark special pages as ones that should use &action= urls
  • Implement actions as special pages
    • Actions within Article
      • Delete
      • Protect
      • Unprotect
      • Render
        • Should we implement Special:Render in a way such that Special:Render/Special:Version works?
        • Don't create Special:Render. Instead deprecate &action=render, create &useskin=none to replace it, and leave back-compat in place.
    • Actions with their own custom class
      • Raw
      • Edit
        • Find some way to deal with &action=submit
      • History - Partially done
    • Action class based actions
  • Implement SpecialPage as a PageView.
  • Implement tab handling inside PageView
  • Implement canonical url handling inside PageView
  • $wgSpecialPageAliases
  • ...
  • Look over what extensions do with Article and other things that are broken, implement compatibility layers for that functionality and find a way to allow extensions to transition to the new patterns.

Other thoughts

[edit]
  • Should we come up with a better special page interface? Something to completely replace the way we write them that works better? (With a fully functional compat layer we don't need to get rid of)
    • Maybe ditch the idea of action -> Special:... and instead transition to a third new interface. Perhaps something cleaner based a little more around some form of routing or query pattern routing different from our &action=, &title=, and Special: patterns.
  • Another thing not to implement right now but to think about while writing this. My other idea is that components like delete, block, protect, etc... should be written with a different system. One that handles components smaller than the whole page. We can then automatically create pages that access the components. While at the same time also providing ajax interfaces to the components.