Patch #34122

Store inline autocomplete data sources in a JS variable

Added by Marius BALTEANU 10 days ago. Updated 1 day ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:4.2.0

Description

When I've implemented first the inline autocomplete feature (4.1.0) I chose to store the autocomplete data source path in a data attribute (data-issue-url) of each textarea field that support this feature. The solution touched 9 views files (r18444).

Since then, new requests came to support inline autocomplete for other sources like macros or wiki pages (#33425, #33820) and if we keep the current solution, we need to touch again the same files and add two new attributes. On a long term, the solution doesn't seem very efficient.

My proposal is to change the current implement and store all the paths in a JS variable, attached an working version.

Any feedback on this is really appreciated.

0001-Store-autocomplete-data-sources-in-a-JS.patch Magnifier (11.7 KB) Marius BALTEANU, 2020-10-16 08:23

Associated revisions

Revision 20191
Added by Go MAEDA 1 day ago

Store inline autocomplete data sources in a JS variable (#34122).

Patch by Marius BALTEANU.

History

#1 Updated by Go MAEDA 4 days ago

+1
The change makes views clearner.

#2 Updated by Go MAEDA 1 day ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you.

Also available in: Atom PDF