Project

General

Profile

Actions

Patch #43259

open

Convert jstoolbar to ES modules and class syntax.

Added by Takashi Kato 5 months ago. Updated 3 days ago.

Status:
New
Priority:
Normal
Category:
Code cleanup/refactoring
Target version:

Description

This patch is based on a branch from #43165, with minor modifications.

  • Converting the entire library to ES modules eliminates the risk of variable name collisions.
  • Refactored jstoolbar from the old prototype-based syntax to a more readable class syntax.
  • Switched DOM element creation from JavaScript to ERB, which makes preparing and cloning DOM elements easier by using the <template> element.
  • Moved all jstoolbar locales to config/locales to simplify i18n. * Added the missing tasklist locale for both ja and en.
  • Integrated the list-autofill controller into jstoolbar as both controllers are used in the same places.

Applying this patch along with #42521 enables the implementation of #40310.

This patch can be applied to r24014


Files

0001-Convert-jstoolbar-to-ES-Module.patch (227 KB) 0001-Convert-jstoolbar-to-ES-Module.patch Takashi Kato, 2025-09-28 06:01
0001-wip.patch (44.8 KB) 0001-wip.patch Marius BĂLTEANU, 2026-02-21 19:43

Related issues

Related to Redmine - Patch #37559: Use meta element instead of javascript objectNewMarius BĂLTEANUActions
Actions #1

Updated by Marius BĂLTEANU 5 months ago

  • Assignee set to Marius BĂLTEANU
  • Target version set to 7.0.0

I'm assigning this 7.0.0 in order to review the changes.

Actions #2

Updated by Marius BĂLTEANU 3 days ago

  • File 0001-wip.patch added

Takashi Kato, I started to work on rewriting the toolbar in order to render most of the elements on the backend and connect to Stimulus JS for the actions. Here is a prof of concept only for testing purposes, it still need some work.

Any feedback is welcome!

Actions #3

Updated by Marius BĂLTEANU 3 days ago

  • File deleted (0001-wip.patch)
Actions #5

Updated by Marius BĂLTEANU 2 days ago

  • Related to Patch #37559: Use meta element instead of javascript object added
Actions

Also available in: Atom PDF