Remove calls to system_page_attachments()

Created on 15 March 2024, 8 months ago
Updated 5 April 2024, 8 months ago

Problem/Motivation

system_page_attachments() is a hook implementation but it's called from the theme system.

We should extract anything that's absolutely required from it, and move it to a helper method somewhere. system_page_attachements() can then call that method, and all the places that call system_page_attachments() can drop their hard-coded dependency on system module.

Steps to reproduce

Proposed resolution

Add BareHtmlRenderer::addAttachments() and call this from system_page_attachments()
Deprecate the system/base library and move it to core.libraries.yml

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

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

Merge Requests

Comments & Activities

  • Issue created by @catch
  • Merge request !7081Start factoring out system_page_attachments. β†’ (Open) created by catch
  • Status changed to Needs work 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    A few things going on here:

    - the system/base library shouldn't be in system module at all, moved to core.libraries.yml and core/misc.

    - we probably need to do the same for system.admin and system.maintenance since these are called by template_preprocess_maintenance_page(), but that might not be necessary to fix this specific issue and dependencies, potentially can happen in a follow-up.

  • First commit to issue fork.
  • Pipeline finished with Failed
    8 months ago
    Total: 651s
    #122735
  • Pipeline finished with Failed
    8 months ago
    #122824
  • Pipeline finished with Failed
    8 months ago
    Total: 566s
    #122837
  • Pipeline finished with Failed
    8 months ago
    #122842
  • Pipeline finished with Failed
    8 months ago
    Total: 644s
    #122862
  • Pipeline finished with Failed
    8 months ago
    #122883
  • Pipeline finished with Success
    8 months ago
    Total: 642s
    #123198
  • Status changed to Needs review 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    Tests are green. I implemented bc for anything declaring system/base as a library dependency but not for library overrides - personally I think a change record should be enough for those given it's essentially an alter hook.

  • Pipeline finished with Failed
    8 months ago
    #123223
  • Pipeline finished with Success
    8 months ago
    #123234
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    - the system/base library shouldn't be in system module at all, moved to core.libraries.yml and core/misc.

    I bet system/base precedes the "core extension" existing! πŸ‘΄πŸ˜„

    Ah, you specifically commented on that in #5. Well … if a release manager thinks that's okay, then I'm fine with it too β€” you're totally right that it's far less common to do library overrides. And the changes in claro.info.yml can serve as an inspiration for how to do this.

    Just one remaining question regarding BC: how can a theme be compatible with both the "before" and "after" states in a single version?

  • Status changed to Needs work 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    Looking at system/base I found a tonne of issues which are now documented in πŸ“Œ Move system/base component CSS to respective libraries where they exist Fixed and related issues. If we do those issues, there will be much less change to do here, so I think we should soft-postpone this issue to avoid moving things two or three times.

  • Status changed to Postponed 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    Postponing this on πŸ“Œ Move system/base component CSS to respective libraries where they exist Fixed πŸ“Œ Refactor system/base library Needs work , we might even be able to just drop the calls altogether if we do those without having to manually load the libraries in the installer any more, or at least, it would be a very short list.

Production build 0.71.5 2024