Page MenuHomePhabricator

Remember the "often used" special characters on a per user basis
Open, LowestPublic

Description

A request has been made at de.wp that the special characters panel "remembers", and shows prominently, the last chars an editor has added to articles. I think this had been requested in the past as well, possibly on the mediawiki.org related thread.

Event Timeline

Elitre raised the priority of this task from to Needs Triage.
Elitre updated the task description. (Show Details)
Elitre added a project: VisualEditor.
Elitre subscribed.
matmarex renamed this task from Remember the "often used" special characters on a per editor basis to Remember the "often used" special characters on a per user basis.Aug 29 2015, 1:06 AM
matmarex set Security to None.

Ooh la la, Epic. And we thought a plain cookie would fix this :)

I'd suggest "recently used" instead of "often used", as that's probably more common elsewhere, and you don't have to keep track how often which character is used. So the code would be something like this:

  • When the users clicks on a special character, push its definition to an array, truncate that array to a maximal length.
  • Store that array (via ve.userConfig).
  • When building the special character dialog, just include those recently used characters as well (just like you already do for the ones defined in MediaWiki:Visualeditor-quick-access-characters.json)