Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
All layout classes and interfaces were marked @internal while the API is not stable.
Proposed resolution
Remove @internal once things are stable.
Remaining tasks
#2885878: Threecol layout 33/34/33 is only 33/33/33
#2885877: Add support for per-region attributes to Layout Templates
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#19 | 2834025-layout-19.patch | 13.65 KB | Manuel Garcia |
#19 | interdiff.txt | 1.11 KB | Manuel Garcia |
#14 | 2834025-layout-14.patch | 12.54 KB | tim.plunkett |
#8 | 2834025-layout-8.patch | 12.32 KB | tim.plunkett |
#3 | 2834025-layout-3-system.patch | 23.02 KB | tim.plunkett |
Comments
Comment #3
tim.plunkettInitially I thought this should go ahead and completely merge layout_discovery into system.module where it belongs. Not sure if that's still the plan.
Only removing @internal is pointless if the service definition still lives in an experimental module. So either we make layout_discovery non-experimental, or we move everything to system.module.
Here's one of each.
Both are blocked by #2852608: Review layout CSS and markup, but might as well get the discussion rolling.
Comment #4
tim.plunkettComment #5
swentel CreditAttribution: swentel as a volunteer commentedGiven that DS and panels (and maybe others already too ?) have branches depending on layout discovery, the least disrupting way would just be to mark layout discovery as stable I think.
Also, give this:
That would need an upgrade path no ? For DS, panels, Field layout, others to change the library ? Every module should have this then which becomes a bit tedious, I think.
So, I'm +1 on simply marking layout discovery as stable (but I'm fine with either decision).
Comment #6
tim.plunkettThat change wouldn't require an upgrade path, no one else should be addressing those libraries directly.
The key thing is that the plugin IDs do not change.
I'm also leaning toward marking layout_discovery stable for at least one release.
Comment #7
swentel CreditAttribution: swentel as a volunteer commentedRegarding library: good point, my fault. We should refactor this in DS because we store it (so we can unset it) .. will file a bug report for that :)
Comment #8
tim.plunkettThe final blocker is in.
Comment #9
tim.plunkettGuessing this needs RM review since it is about moving out of experimental
Comment #10
Wim LeersInteresting, this is both:
@internal
But there are still a lot of open issues: 1 bug, 12 tasks, 3 feature requests at the moment. So that means you're confident that completing those tasks won't break any of the APIs? Things like #2834023: Discuss service ID and config schema naming for Layouts, #2846395: Increase module weight of field_layout, #2846393: [PP-1] Investigate alternative approaches to moving fields in FieldLayoutBuilder::buildView() and #2796877: Devise a mechanism for mapping old regions to new ones when moving between layouts look (at first sight) that they might cause or require BC breaks?
I'm asking this with the best intentions: I'd love to see more experimental modules become stable, but in being asked to maintain the REST module, I've seen the negative consequences of marking something as stable prematurely. Repeating those mistakes will cost us.
Comment #11
tim.plunkettOf those, only #2834023: Discuss service ID and config schema naming for Layouts would be a BC break, and I just closed it.
Most of those other issues are specifically for Field Layout module, not the API.
Comment #12
tim.plunkettThis blocks #2844302: Move Field Layout data model and API directly into \Drupal\Core\Entity\EntityDisplayBase and all subsequent work in the layout space.
Comment #13
tim.plunkettNow blocked by:
#2885878: Threecol layout 33/34/33 is only 33/33/33
#2885877: Add support for per-region attributes to Layout Templates
Comment #14
tim.plunkettReroll now that those two are in.
Comment #15
DamienMcKennaShould the HTML changes be separated from the API documentation changes?
Comment #16
xjmThanks @DamienMcKenna. In most cases, I'd say yes, but in this issue, both have to happen at the same time because both are required to mark the module stable, while neither can happen before the module is stable. :) In this case, the new templates are just copies of the templates that the module already provides (and have been reviewed already in #2852608: Review layout CSS and markup).
Comment #17
xjmIs https://www.drupal.org/node/2619128 complete and up to date? That's docs gate for this.
Comment #18
xjm@tim.plunkett pointed me to https://www.drupal.org/docs/8/api/layout-api which is the correct handbook page, so we need to update the
hook_help()
for this as well.Comment #19
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedBright future for layouts in Drupal, can't wait!
Updating the documentation link on hook_help (#18).
Comment #20
swentel CreditAttribution: swentel as a volunteer commented+1 one from me!
Comment #21
japerryLooks good to panels! +1
Comment #22
tim.plunkettFor the record, #20 is signoff from a Display Suite maintainer, and #21 is Panels/Panelizer.
Comment #23
Dries CreditAttribution: Dries commented+1 from me! Thanks everyone for all the hard work on this.
Comment #25
tim.plunkettRandom fail #2898721: Random segfault currently in FileFieldWidgetTest::testMultiValuedWidget()
Comment #27
xjmThanks @swentel and @japerry!
Considering this for stable core inclusion:
Based on all that, committed and pushed to 8.5.x and 8.4.x! Yay.
Comment #29
xjmComment #30
DamienMcKennaThank you one and all!
Comment #31
Wim Leers👏🎉
Comment #32
markusa CreditAttribution: markusa commentedThis is fantastic for the project to have this. You'll have done an excellent job. Congratulations