Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 May 2014 at 05:32 UTC
Updated:
29 Aug 2014 at 00:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joelpittetOk this will likely fail, but I thought I'd give a direction to which I'm thinking this issue should go.
Locally the forms are loading, so at least I can run the tests in the UI:)
There may be a better way to deal with the form theme suggestion defaults because I know there was an array('form', 'form') in #theme, which isn't the end of the world but that would be nice to get as clean as possible.
I left the word _form() at the end of the forms even though I prefixed them with theme_form__, which is a bit redundant but that may be for another issue.
This isn't necessary the way I wrote the FormBuilder changes but it's explicit, opinions?
This was added but if they are still theme functions to wrap the results in a form template. It isn't needed for a twig template, just done to get the patch rolling. Twig template just extends @system/
Did a rough conversion of theme_views_ui_expose_filter_form to twig template to show it's use.
The big win is no more theme functions or templates for empty theme_*_form(), form content wrappers. And you can totally override the form template if you want to or just extend it's contents with a block(the way we would be doing @see theme_views_ui_expose_filter_form() conversion in the patch())
Comment #3
joelpittetI don't think the template suggestions are picking up, see the form__block_list.
Comment #7
joelpittetJust a re-roll.
Comment #9
sunThe basic proposal makes sense to me, but I don't understand why this issue attempts to change #theme_wrappers into #theme?
The #theme of a form renders the inner HTML of the form only, because there's not really a use-case for customizing/overriding the wrapping
<form>markup itself. Therefore, the wrapping form markup is output through a separate #theme_wrapper.I don't see a value in embedding the wrapping form markup into form templates - doing so will only make templates more complex and cause bugs IMO.
Comment #10
m1r1k commentedShould we convert theme_menu_overview_form() as well?
Comment #11
joelpittet@sun I think it was because theme_wrappers don't have suggestions, I could be wrong on this but that was the impression I was under. (also wrote that in the Issue Summary but likely in the wrong place)
@m1r1k Yes that should be on this list as well.
Comment #12
star-szrComment #13
joelpittet@andypost seemed to fix this in a much more direct way here #1987400: forum.module - Convert theme_ functions to Twig
Let's do that, closing this experiment down for now.