Closed (fixed)
Project:
Experience Builder
Version:
0.x-dev
Component:
Page builder
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Dec 2024 at 03:05 UTC
Updated:
31 Jan 2025 at 11:49 UTC
Jump to comment: Most recent
Comments
Comment #2
larowlanComment #4
larowlanComment #6
larowlan#3493941: Maintain a per-component set of prop expressions/sources and #3493943: SDC+JS Component Sources: split default values into `resolved` and `source` also block this as they prevent removing the hard-coded tree item used by preview controller.
Without removing that, we can't see changes to dynamic fields based off the node/entity fields in the preview.
I'll start on those next
Comment #7
larowlanComment #8
larowlan#3487484: Save page data form values in application state with support for undo/redo is in.
@effulgentsia indicated we can do this without seeing updates to dynamic components in the preview, so this no-longer depends on #3493941: Maintain a per-component set of prop expressions/sources and #3493943: SDC+JS Component Sources: split default values into `resolved` and `source`
I've moved the new e2e test to #3493941: Maintain a per-component set of prop expressions/sources for that.
That now means this is ready for review 🙌
Comment #9
tedbowThis looks good but when I try to manually test it I get errors. Investigating
Comment #10
tedbowCreated related #3498219: Missing E2E test for Publish button hides bugs
Comment #11
tedbowworking this
Comment #12
tedbowI have fixed the bugs I found in manual tests. Now in manual testing change update the page data fields(at least have tried title and body) the "Publish" button works, and when I view the node outside of experience builder I see both the XB and other field changes.🎉
Assigning back to @wim leers since @larowlan assigned to him but I will continue to review.
Comment #13
tedbowI have idea why the test is failing. Will work on it
Comment #14
tedbowPHPUnit tests are passing now, the e2e contextual-panel.cy.js test failed, Hoping was just a fluke so retestingUPDATE: yep green now
Comment #15
tedbowI think this is good now, I started this and @larowlan did a lot of the work too, so I can't approve
Comment #16
effulgentsia commentedComment #17
wim leersI didn't get to this today, between tying up the many loose ends that #3486203: Integrate saving sections with the backend: (de)normalize Pattern config entities using the client-side data model revealed, which I finished up just now in #3484678: Simplify ComponentSourceInterface::getClientSideInfo(), introduce ClientSideRepresentation value object, and leverage it (thanks, @longwave!).
I had deprioritized reviewing this issue in favor of other issues: because I need to see the big picture to be able to properly review this, and pretty much all of this infrastructure landed while I was on paternity leave with no involvement from me. That's why I've been asking @tedbow to update https://www.drupal.org/project/experience_builder/issues/3455753#save-dr..., which he has been doing! 👏
I promise a thorough review tomorrow.
Meanwhile, this seems to have conflicted with #3499774: Cannot save Page in XB when content_moderation is installed, so a rebase would be appreciated 🙏😊
Comment #18
larowlanThis is ready for review again @Wim
Comment #19
wim leersThanks!
(Also thanks to @tedbow for getting https://www.drupal.org/project/experience_builder/issues/3455753#save-dr... in good shape!)
Posthumously reviewed the predecessor
Reviewed the #3487484: Save page data form values in application state with support for undo/redo MR to be able to review this one. High-level observations from there:
\Drupal\experience_builder\Controller\ApiLayoutController::getEntityDatablew my mind.docs/would've been nice 😇🙏 A lot of the React code is beyond me, especially because comments are sparse.undo-redo-timeline.cy.jsand all the things it proves! Undoing across both the edited content entity object's fields and the XB component tree ("layout+model") is crucial, and it now works!Review
Can you please create a follow-up issue for those 2? 🙏
Given how important this is for https://www.drupal.org/project/experience_builder/issues/3455753#save-dr..., and that this definitely gets us to a better place than HEAD: merging :)
Comment #21
wim leersComment #22
larowlanOpened
#3500384: Harden check for boolean fields in ClientDataToEntityConverter
#3500385: Display validation errors in "page data" (content entity form)
FWIW I found the qs npm package after this and have started using it in #3499554: Move client-side assumptions about prop form data shape into a series of prop-specific transforms which eventually will allow us to remove the hacky \parse_str \http_build_query dance.
Comment #23
wim leersThanks for those! 🙏
I quite liked/was impressed with that "hacky dance" 😅🙈 IDK what that says about me 🤣