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

UI: Drag&Drop flow widgets - restrictions #13068

Closed
MikeKry opened this issue Jan 10, 2023 · 2 comments · Fixed by #17421
Closed

UI: Drag&Drop flow widgets - restrictions #13068

MikeKry opened this issue Jan 10, 2023 · 2 comments · Fixed by #17421
Labels
Milestone

Comments

@MikeKry
Copy link
Contributor

MikeKry commented Jan 10, 2023

Describe the bug

When using drag & drop in widget zone, content type restrictions are not applied.

Reproduction

Prepare:

  • Create content type C1 with flow part, that allows only widget A
  • Create widget A with flow part, that allows widget B
  • Create random widget B

Action:

  • Create content item of type C1
  • Add widget A to content item of type C1
  • Add widget B to widget A flow
  • When you drag widget B, you can drop it into flow of content type C1
  • In this phase, you can still drop it back to widget A's flow. But when you publish page, you will get message that widget has no matching content type definition and that it will be lost after publish.
  • This can be fixed by allowing widget B at content type C1's flow, but that may require admin to fix this.

Expected

If drop target (flow) is restricted, it should not be possible to drop widget of restricted type into it.

@sebastienros
Copy link
Member

Would some server side validation (and not an exception) be sufficient?

@sebastienros sebastienros added this to the 1.x milestone Jan 12, 2023
@MikeKry
Copy link
Contributor Author

MikeKry commented Jan 13, 2023

I think user has to be able to move widget back into correct place - so it should not be droppable to restricted zone or it should be visible even if it is restricted.. Because now it completely disappears from UI, when he drops it into flow with restriction and saves page.

Maybe server side before saving would be enough - info that he should move widget back before save.

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

Successfully merging a pull request may close this issue.

2 participants