Gin toolbar should dynamically override libraries via hook_library_info_build()

Created on 1 March 2024, 10 months ago

Problem/Motivation

At the moment, gin toolbar adds it's libraries overrides via hook_library_info_alter() which does not run in the runtime, but during the container/cache rebuilds, which creates a problem of unintentional adding claro/gin css/js files to the frontend theme when the toolbar is not active (again, because library data is being cached). In my case it was a dialog css.

The completely different question is why to do this in the first place for dialog and others .. so it's not possible to have a dialog in frontend theme and having gin toolbar at the same time?

Steps to reproduce

See the code

Proposed resolution

Rename hook_library_info_alter() to hook_library_info_build()

Remaining tasks

Review MR

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine Taran2L Lviv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024