Patch #44793
openConvert inlineAutocomplete to stimulus controller and Replace jquery.autocomplete with Tribute
Description
Currently, tribute.js is imported via a script tag, but I will switch to the ES module version and use it as a Stimulus controller.
Since upstream maintenance by Zurb has stopped, I propose using v6.3.3, which is my fork with various added features. This is expected to bring the following improvements:
- Most pull requests not included in v5.1.3 have already been applied. The menu now appears even when characters are deleted using the backspace key.
- Unlike v5.1.4 released by Zurb , the menu does not disappear when scrolling the screen while the menu is displayed.
- Since menu items are generated internally as HTML elements, the sanitizeHTML function is no longer needed. The search query string typed by the key input will now be highlighted.
- The `debounce` function is already implemented internally.
- Server connection functions now support Promises, eliminating the need for callbacks.
- Events are no longer triggered by key inputs during Japanese IME composition.
- The issue where results are overwritten by responses from stale requests has also been handled internally.
- It supports CSS custom properties, allowing color settings to be changed as needed.
Additionally, since tribute also supports autocomplete, I wrote a patch to use tribute as a replacement for jQuery UI's autocomplete.
Although autocomplete is independently implemented in #44757, using Tribute significantly reduces the size of the Stimulus controller.
This patch can be applied to r25478
Files
Updated by Go MAEDA 4 days ago
Thank you for the patches.
The improvements in your fork of Tribute look valuable. However, replacing the official Tribute with a fork is a major decision for Redmine.
I would like to commit #44757 first, so that jQuery UI can be removed soon without adding a new dependency. I think it would be better to discuss these patches after that.