Gin toolbar should dynamically override libraries via hook_library_info_build()

Created on 1 March 2024, 4 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.

see πŸ› Why do I see dialog.css in my theme? Closed: works as designed

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.69.0 2024