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

Support for deleting subform-layoutset #13482

Closed
1 task
framitdavid opened this issue Sep 4, 2024 · 2 comments · Fixed by #13680
Closed
1 task

Support for deleting subform-layoutset #13482

framitdavid opened this issue Sep 4, 2024 · 2 comments · Fixed by #13680
Labels
area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. backend frontend

Comments

@framitdavid
Copy link
Collaborator

framitdavid commented Sep 4, 2024

We need to support deleting layout sets in general, but in this task, we must specifically address deleting layout sets for subforms. How should we approach this?

Suggestion:
We notify the user that all subforms using the layout-set that is being deleted will also be removed. Then, we send a delete request to the backend, which will update all necessary locations. After that, the backend will provide us with information via web sockets about the files that have been changed, allowing us to invalidate queries on the frontend accordingly. (We do already have web-sockets and invalidaiton setup ready for use).

  • When can delete a sub-form layout-sets (type: "sub-form")
@framitdavid framitdavid added status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. labels Sep 4, 2024
@framitdavid framitdavid added backend frontend and removed status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. labels Sep 24, 2024
@Jondyr Jondyr self-assigned this Oct 1, 2024
@Jondyr Jondyr linked a pull request Oct 2, 2024 that will close this issue
6 tasks
@Jondyr Jondyr removed their assignment Oct 2, 2024
@mlqn mlqn assigned mlqn and Jondyr and unassigned mlqn Oct 3, 2024
@Jondyr
Copy link
Member

Jondyr commented Oct 7, 2024

Nice work! 🚀 It looks like the deletion of the layoutsets isn't fully implemented yet, as neither the applicationmetadata file nor the BPMN file are being updated when using the FileUpload and FileUploadWithTag components. So we might want to keep the issue linked to this PR open for now. 🤔

Originally posted by @mlqn in #13680 (review)

As @mlqn pointed out, deletion of layoutsets does not sync applicationmetadata or bpmn references, where fileupload might be relevant for subforms if they are allowed within the layout.

Update:
It seems fileupload components are restricted from being added to subform layouts (ref. #13475 ), so I believe this issue is complete without additional sync.

@Jondyr Jondyr removed their assignment Oct 7, 2024
@nkylstad nkylstad self-assigned this Oct 9, 2024
@nkylstad
Copy link
Member

nkylstad commented Oct 9, 2024

Tested OK:

  • Added a subform layoutset
  • Added a subform component
  • Configured subform component to point at subform layoutset
  • Deleted subform layoutset
  • Confirmed "YES" in the dialog
    Result was that the subform layoutset, and the associated subform component in the main layoutset, were deleted as expected.

Also verified that the "Delete subform" button is only available when a subform layoutset is selected.

A few observations that probably go a little beyond this issue:

  • The text in the dialog does not inform the user that the associated subForm component will be deleted.
  • Deleting the subForm component does not delete the layoutset.

Since we are still working on the UX of how the user should experience managing subforms, I suggest we don't to anything about this for now, since we might be changing things anyways.
/cc: @Annikenkbrathen

The actual functionality of this issue (deleting the subform layout-set) seems to be working as expected 🥳

@nkylstad nkylstad removed their assignment Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. backend frontend
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants