Wikimedia

Add a button to toggle syntax highlighting in Quarry

Problem

Sometimes people need to create/edit queries on Quarry while from mobile. It is impossible to do it normally in my Firefox for Android now. It can be more convinient when syntax highlight is turned off, so mobile treats the SQL query more as an ordinary textarea.

Proposed solution

It would be nice to have solution we have in Mediawiki for .js editing and similar: a button to toggle syntax highlight. When pressed, replace the syntax-highlighted textarea with a normal textarea. When clicked again, re-enable syntax highlighting.

Related code

The syntax highlight is done using CodeMirror at line 11 of view.js of the Quarry repository analytics/quarry/web. Please send patches to Gerrit (analytics/quarry/web) and claim this task on Phabricator.

Task tags

  • javascript

Students who completed this task

safan41

Task type

  • code Code
  • web Design
close

2019