Allow links passed to #theme links to support #attached

Created on 11 August 2024, 5 months ago

Problem/Motivation

Follow-up from πŸ“Œ Attach Ajax dialog library for Views Entity Operations Fixed .

Only delete links use modals in core, however the dialog library is added on views operations links for users without access to delete content, or for entities without a delete operation.

To make this conditional, we'd need to provide a way for links passed to #theme links to declare #attached themselves, then the links would be responsible for declaring the libraries they depend on, and we wouldn't need the logic in EntityListBuilder or the views EntityOperations plugin.

It might be worth looking at allowing links to be render arrays instead of a raw (mostly undefined) link array - this would currently need to happen in template_preprocess_links().

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
RenderΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

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

Comments & Activities

Production build 0.71.5 2024