Project

General

Profile

Actions

Patch #43976

open

Refactor window resize handlers into Stimulus controller and CSS

Added by Takashi Kato about 5 hours ago.

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

Description

Redmine calls several JavaScript functions on every browser window resize.

These functions are defined in application-legacy.js and responsive.js, meaning they are executed on every page.
While these calls do not significantly slow down page rendering, it is better to avoid unnecessary execution to prevent unexpected errors.

The attached patches migrate these functions into a Stimulus controller (or CSS, where applicable).
As a result, the logic is only triggered when the relevant elements are present.

Note.

relay_controller.js included in 0001 patch is copied from justin searls blog post.
https://justin.searls.co/posts/a-decoupled-approach-to-relaying-events-between-stimulus-controllers/

patches can be applied to r24592


Files

No data to display

Actions

Also available in: Atom PDF