Page MenuHomePhabricator

Determine best practices for marking up guided tours
Open, MediumPublic

Description

Right now, there are at least four ways to mark up tours, some of which can be combined.

  1. (Extension-defined only) Use messages, and rely on jqueryMsg to parse them. The problem is this only supports certain features, notably excluding things like bold and italics. I have a patch in to support wikilinks. See https://bugzilla.wikimedia.org/show_bug.cgi?id=43498 and https://bugzilla.wikimedia.org/show_bug.cgi?id=43512 .
  1. Use raw HTML. E.g. the guidedtour-tour-test-test-description does this. As a message, it goes through jqueryMsg, but that just preserves the existing bold.

This can also be used for on-wiki tours.

  1. Use parseDescription. This does an API call to the server for each step that uses it, which is a performance hit. However, it allows on-wiki tours (which can not currently use messages) to pass in wikitext and have it parsed.
  1. Use getPageAsDescription. This also does an API call to the server, which may also require a database access. It allows embedding a separate page. However, given that each step is generally short, I don't know how useful this is.

We should consider trying to simplify this picture as part of improving the API (https://bugzilla.wikimedia.org/show_bug.cgi?id=43530)


Version: master
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=43498
https://bugzilla.wikimedia.org/show_bug.cgi?id=43512
https://bugzilla.wikimedia.org/show_bug.cgi?id=43530

Details

Reference
bz43531

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:13 AM
bzimport set Reference to bz43531.
bzimport added a subscriber: Unknown Object (MLST).

tchay wrote:

I wrote parseDescription() as more a test. I felt that editors who might be more comfortable writing a feature that might be complex (video embed, for example) would probably be more familiar with Wikitext so it'd be interesting to make it available.

I wrote getPageAsDescription() because I thought that it'd make sense to open the tours themselves (without opening the javascript hardware which needs to be locked behind a higher access control) to the community at large to allow them to be improved. This way we adopt the same security protocol that has already been put in mediawiki itself.

I believe that getPageAsDescription() while it generates a HTTP request to the server probably might be more efficient than parseDescription() in the long run since the parser cache should probably cache it avoiding the need of the parser to be triggered.

We should probably thinking of migrating the guided tour to Ori's JSON schema or something. It's awfully close. Right now it has to be javascript because we don't know what sort of auto-advance/etc. that our guided tours will actually have. Once a library of common use cases are made, we could abstract this into a javascript generator and allow the tours to be created in JSON schema without allowing arbitrary javascript injection (and thus the need to protect the tours namespace).

Deskana renamed this task from Determine best practices for marking up guided tours to VisualEditor.Aug 30 2018, 1:32 PM
Deskana renamed this task from VisualEditor to Determine best practices for marking up guided tours.Aug 30 2018, 1:45 PM