Problem/Motivation
We need to deprecate \Drupal\layout_builder\QuickEditIntegration
and refactor it so that quickedit contrib provides the integration with layout builder, so it can be removed in Drupal 10.
Steps to reproduce
N/A
Proposed resolution
- Move
\Drupal\layout_builder\QuickEditIntegration
to\Drupal\quickedit\LayoutBuilderIntegration
- Deprecate \Drupal\layout_builder\QuickEditIntegration
- Move hook references to QuickEditIntegration to quickedit module
- Refactor
LayoutBuilderEntityViewDisplay::getQuickEditSectionComponent
in to quickedit module. - Provide tests to satisfy jsonapi and rest modules
Remaining tasks
- Review MR
- Contrib patch
- Update #3227033: Remove Quick Edit from core to remove new deprecations
User interface changes
None
API changes
\Drupal\layout_builder\QuickEditIntegration
is deprecated in favour of \Drupal\quickedit\LayoutBuilderIntegration
.
Data model changes
None
Release notes snippet
The Quick Edit integration for Layout Builder is now provided by the Quick Edit module. This has been backported to 9.4.2 to retain as much parity as possible with the contributed version of Quick Edit.
Issue fork drupal-3264633
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mstrelan CreditAttribution: mstrelan at PreviousNext commentedHere's a start. Haven't tried to refactor
\Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::getQuickEditSectionComponent
and haven't tested it at all.Comment #5
dwwThanks, y'all! Standing by to commit whatever's supposed to go into QE contrib into place. ;) I'll try to review the core patches as they arrive...
Comment #6
SpokjeAh, the everlasting optimism of the youth... ;)
Comment #7
mstrelan CreditAttribution: mstrelan at PreviousNext commentedThe test passed, but I don't really know what it is testing, nor what the integration provides. In manual testing before the patch I could quickedit the body field of a node that was rendered with layout builder but with the patch I couldn't.
Comment #8
mstrelan CreditAttribution: mstrelan at PreviousNext commentedUpdate on manual testing. Previously I still had the contrib module in place, so I was not actually testing the patch. I have tested again today with the steps below and the integration appears to be working:
That just leaves
LayoutBuilderEntityViewDisplay::getQuickEditSectionComponent
to be refactored in to quickedit module.Comment #9
xjmComment #10
mstrelan CreditAttribution: mstrelan at PreviousNext commentedThere are actually at least three tests that cover the layout builder / quickedit integration:
I have updated the MR to move all remaining quickedit references in layout_builder. Let's see what the testbot thinks.
Comment #11
mstrelan CreditAttribution: mstrelan at PreviousNext commentedThe latest commit 18f61cf5 should make the remaining tests pass, but they really don't provide any value. I believe #3043245: Allow marking a config schema types to be marked as "internal" (to avoid exposing them via HTTP APIs) would mean we could remove them. They also shouldn't need to exist in contrib because the test coverage tests won't be looking for them.
Comment #12
mstrelan CreditAttribution: mstrelan at PreviousNext commentedComment #13
mstrelan CreditAttribution: mstrelan at PreviousNext commentedComment #14
tim.plunkettFrom a Layout Builder perspective, this looks great. I didn't have a chance to review it from a BC perspective, but untagging for subsystem maintainer review for now.
Comment #15
mstrelan CreditAttribution: mstrelan at PreviousNext commentedDon't know why that's failing now when it was passing before and is passing locally. I merged in 9.4.x and made some minor adjustments, let's try again.
Comment #16
mstrelan CreditAttribution: mstrelan at PreviousNext commentedThis makes a lot more sense now that I see #3263654: Move all HAL tests to the module in preparation of removal in D10. So the question is should the hal tests for quickedit live in the hal module since both modules are moving to contrib?
Comment #17
catchIf we move the hal tests for quickedit to hal, then it means hal needs to get removed from core before quickedit, otherwise its tests would start to break. Since they're both very close, it shouldn't matter.
Comment #18
mstrelan CreditAttribution: mstrelan at PreviousNext commentedThe way the coverage checker test is written means the tests have to live in hal for now as per the last commit in this MR.
Comment #19
bbralaI just did a subtree split for hal (awww xD), but can always just force push a new split since there was no real work done yet.
Comment #20
mstrelan CreditAttribution: mstrelan at PreviousNext commented@bbrala I don't think hal in contrib would need to include these tests. They can possibly exist in quickedit contrib but they really only exist right now to make core tests happy.
Comment #21
bbralaHmm, ok, we'll see. Feels like i rather split the exact state it is at the point it is removed. So if there is extra tests added, i'd split with those, then remove in contrib if needed.
But that might be extra work that is not needed, IF the tests live in a separate file to other HAL tests.
Comment #23
tim.plunkettGreat, thanks! And thanks for confirming my suspicions @larowlan, good to be able to point to the actual place for that :)
Comment #24
dwwI suspect this is RTBC, but I’d like to take a look before this happens in core, not just when this is all hitting QE contrib. I botched this on help topics, and only noticed some problems late. Trying to be more proactive this time.
Comment #25
SpokjeThanks @dww, I looked at this briefly, and didn't want to postpone this on my findings, but now you have put it back on NR, I've got a few tiny nits to pick.
Comment #26
dwwThe CR looks good (reviewed it while checking links on deprecation messages), although don't we usually put the exact release something was introduced in? Should it not be 9.4.0-alpha1, not just 9.4.0?
Meanwhile, I opened about a dozen new MR threads. Mostly nits and probably-out-of-scope stuff, but a couple of points that are legit reasons this needs work before commit.
Thanks,
-Derek
Comment #27
mstrelan CreditAttribution: mstrelan at PreviousNext commentedUpdated the test groups and added the moduleExists check.
In the codebase I searched core for other deprecations and there are plenty of 9.4.0 deprecations and zero for 9.4.0-alpha1. There are also plenty of CRs for 9.4.0 and only one for 9.4.0-alpha1.
Comment #28
catchYes this is correct, we always do the next stable release.
Comment #29
dwwThanks! Looks like this is ready for re-review. Can’t respond to specifics now, but I hope to look later today...
Comment #30
quietone CreditAttribution: quietone at PreviousNext commentedChanging parent to the issue tracking the steps to deprecate quickedit.
Comment #32
catchThis is going to need a 10.x version without the HAL changes, since HAL module is already removed.
Comment #34
mstrelan CreditAttribution: mstrelan at PreviousNext commentedMerged 9.5.x in to the existing MR and cherry-picked the commits in to a new 10.0.x MR. Best to review the 9.5.x MR as it has existing comments.
Comment #35
mstrelan CreditAttribution: mstrelan at PreviousNext commentedNeeds work as per latest MR feedback
Comment #36
mstrelan CreditAttribution: mstrelan at PreviousNext commentedUpdated deprecation message in 9.x PR and removed the class in 10.x PR. Updated CR.
Comment #37
larowlanThis looks good to me, reviewed both PRs and can't find anything that's worth holding this up on.
There's a few unresolved threads in the 9x PR but I think they're technically resolved.
Comment #38
mstrelan CreditAttribution: mstrelan at PreviousNext commentedSetting back to NR since I added another commit
Comment #39
larowlan@mstrelan and I discussed whether using the layout builder class constant in quickedit was safe in the case where layout builder was disabled and decided to go with the string to be safe. Back to RTBC
Comment #41
catchCommitted/pushed the respective MRs to 10.0.x and 9.5.x, thanks!
Comment #43
catchI've backported this to 9.4.x, because not having it there is causing issues with contrib quickedit + 9.4.x
While this introduced a couple of deprecations, it's not API surface we expect anyone to be using, so I think we should treat it similar to a constructor deprecation to fix a bug. If it turns out there's a problem, there's time to revert before the next patch release of core, but we'd then need do diverge contrib quickedit further from the core version which further increases the chance of more bugs.
Comment #44
xjmComment #45
xjmComment #46
catchTagging for 9.4.2 release notes.
Comment #47
SpokjeChanged and published CR from 9.5.0 to 9.4.2.
Which raises the question: Should we update the deprecation notices in the code to mention
9.4.2
instead of9.5.0
?Comment #48
SpokjeAs discussed with catch on Slack (https://drupal.slack.com/archives/C014CT1CN1M/p1656055522793509) a follow-up to update the deprecation errors to 9.4.2 instead of 9.5.0 is needed.
Here it is: #3292413: Update deprecation error made in [#3264633] from 9.5.0 to 9.4.2
Comment #51
xjmAdding CR link to the release note. Thanks!
Comment #53
Wim LeersRelease note was already added in #51 👍