Skip to content

Implement in-place edition in list & details actions #6928

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

Draft
wants to merge 7 commits into
base: 4.x
Choose a base branch
from

Conversation

Pierstoval
Copy link
Contributor

@Pierstoval Pierstoval commented May 7, 2025

Current roadmap:

  • Create basic setup within the Controller's edit action
  • Create specific template for field display
  • Create JS script to handle in-place edition
  • Handle the fetch part in JS
  • Handle the fetch part in the Crud controller
  • Make sure validation is used (needs Create InvalidEntityException to replace RuntimeException in EntityUpdater #6927)
  • Add support for more complex types
  • Convert all form data to multipart, to make sure it works with files
  • Make thorough tests for all field types, including nested forms
  • Update the docs
  • Publish 🚀

@Pierstoval
Copy link
Contributor Author

@javiereguiluz I'm facing a particularly annoying structural issue.

I will have to display some forms in the index and detail pages.
But some fields, like CollectionField and others, require some Assets to be loaded.
These DTOs are configured using the onlyOnForms() method, which updates loadedOn in the final DTO, for its JS asset.

My initial idea was to update EA's index/detail page to load these assets manually when any field in the list contains an "edit in place" for this action. However, this might sound like a hack, but it would work in the end.

How would you do it?

@BenjaminBeck
Copy link

Maybe more something for the long run: Use lazy loading stimulus controller for all js

@Pierstoval
Copy link
Contributor Author

Pierstoval commented May 15, 2025

Maybe more something for the long run: Use lazy loading stimulus controller for all js

This wouldn't necessarily need Stimulus, but this would probably load unneeded JS in possibly all pages, and I want to avoid that, and prefer to load the JS code only when necessary.

@Pierstoval
Copy link
Contributor Author

Pierstoval commented May 16, 2025

So far, this is the current state on a pet project:

(Note: it works the same way on the detail page too)

ea_edit_in_place.mp4

Pierstoval added a commit to Orbitale/Conventionist that referenced this pull request May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants