Postponed
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Dec 2019 at 14:32 UTC
Updated:
2 Jan 2020 at 11:43 UTC
Jump to comment: Most recent
Follow-up to #3103380: Allow rendering dialogs using the admin theme.
Not all admin components are rendered in a dialog. We should allow specifying which theme is used for rendering these as well. This would help Contextual Links, Quick Edit, and Toolbar.
TBD
Comments
Comment #2
wim leersBased on the title, I think this is proposing the following:
Is that correct?
Comment #3
lauriiiUnfortunately
#themeis already reserved so we need to use something else. Also, we can't allow choosing any theme because otherwise, we have a dependency from modules which would lead to a circular dependency between modules and themes #474684: Allow themes to declare dependencies on modules.Maybe something like this would work:
Comment #4
wim leersI'm confused by #3. You're saying that
#themeis already reserved. But then your example still uses it, it just adds#admin. So adding a modifier would be okay? What if some contrib code already uses#admin(or whatever other name we pick)?IOW: I'm confused by it being reserved on the one hand yet your proposal still using it on the other hand 😅
I think it'd be helpful if you could share your reasoning :)
Comment #5
lauriiiThe reserved render array properties are listed here: https://www.drupal.org/docs/8/api/render-api/render-arrays#properties.
#themeis used for connecting the render array to a theme hook / template.The example could be also:
This is something that has been documented as internal in our BC policy: https://www.drupal.org/core/d8-bc-policy#render-arrays. However, in practice, we'd probably have to give a warning to users in a form of deprecation.
Comment #6
wim leersCustom
@RenderElements tend to define their own#properties!I think https://www.drupal.org/core/d8-bc-policy#render-arrays refers to the contents of render arrays, not to
#propertiesin render arrays. 🤔