Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement inline submitting elements on page/parent save #1215

Closed
9 tasks
emteknetnz opened this issue Jun 27, 2024 · 2 comments
Closed
9 tasks

Implement inline submitting elements on page/parent save #1215

emteknetnz opened this issue Jun 27, 2024 · 2 comments

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Jun 27, 2024

This card is for the implementation of "Approach one" from SPIKE Look at solutions between field validation conflicting between block level and page level

Issues this resolves

Questions:

  • Do we want green toast notifications for individual content blocks published when page is published? (e.g. you'll get three green toasts on page save if two elements are saved)
  • Do we want red toast notifications for individual content blocks published when they fail validation? (currently there are no red toasts)
  • Do we want to block saving individual elements until all elements are valid? (Would be significantly more complex, need validation endpoints)

Acceptance criteria

  • Elements with a dirty form state are inline saved when the page/parent save/publish button is clicked
  • The page/parent save/publish is blocked when there are validation errors with one or more of the elements that were inline saved
  • Solution works with
    • ElementalAreas on Pages
    • ElementalAreas on non-page DataObjects
    • Multiple ElementalAreas on one form
  • Elements are still cascade published on parent publish
  • PHP logic for handling saving elemental data on page/parent save is no longer called and formally deprecated.
  • If viable, stop submitting elemental data on page/parent save with POST request.

Note

  • We've thought about adding an opt-out for the new behaviour but decide against it under the assumption people would have had to customise the individual block save anyway.
  • Our testing team has offered to help regression test the recent elemental work prior to the beta. Follow up with them once this card is done.

Shared CI run (elemental endtoend) are the relevant jobs)

Notes:

  • The elemental endtoend job is the relevant one
  • I cannot replicate any of the other endtoend failures locally
  • The phpunit failures are unrelated

PRs

Test PRs

@GuySartorelli GuySartorelli added this to the Silverstripe CMS 5.3 milestone Jun 27, 2024
@emteknetnz emteknetnz removed their assignment Jul 9, 2024
@GuySartorelli
Copy link
Member

PRs merged.

There's a note in the issue description that says

Our testing team has offered to help regression test the recent elemental work prior to the beta. Follow up with them once this card is done.

Reassigning to Steve to do that.

@emteknetnz
Copy link
Member Author

Have contacted testing team regrading this, will close this issue now that the PRs have been merged. We'll deal with any regressions found by the testing team in a separate issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants