Skip to content

Conversation

@MarvinKlein1508
Copy link
Collaborator

@MarvinKlein1508 MarvinKlein1508 commented Jul 30, 2025

Pull Request

📖 Description

This PR adds stopPropagation to the FluentDropZone component. This allows the component to be used in nested FluentDragContainer components.

@ondrop:stopPropagation
@ondragenter:stopPropagation
@ondragend:stopPropagation
@ondragover:stopPropagation
@ondragleave:stopPropagation
@ondragstart:stopPropagation

🎫 Issues

This PR fixes #3925

👩‍💻 Reviewer Notes

@dvoituron I'm not sure if I can always set stopPropagation. I've seen that you do this for preventDeafult based on Droppable. But I couldn't find any downside in adding this attribute.

📑 Test Plan

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

I've got a working demo with three nested FluentDragContainers which I prepare for PR as well. Still optimizing styling. Here is a sneak peak:
https://github.com/user-attachments/assets/5c5eefe0-1eb7-4e37-93f0-7ce5f9775cb6

@dvoituron
Copy link
Collaborator

@MarvinKlein1508

Why not add a parameter like we did in FluentButton? That way, the developer can decide when to use it.
I should use a single parameter for all these attributes.

/// <summary>
/// Gets or sets a way to prevent further propagation of the current event in the capturing and bubbling phases.
/// </summary>
[Parameter]
public bool StopPropagation { get; set; } = false;

@MarvinKlein1508
Copy link
Collaborator Author

Why not add a parameter like we did in FluentButton? That way, the developer can decide when to use it. I should use a single parameter for all these attributes.

Good call! I will adjust the PR early tomorrow.

@MarvinKlein1508
Copy link
Collaborator Author

Done. I've also added a test for the new parameter.

@vnbaaij vnbaaij enabled auto-merge (squash) July 31, 2025 04:49
@vnbaaij vnbaaij merged commit ead66fc into microsoft:dev Jul 31, 2025
4 checks passed
@MarvinKlein1508 MarvinKlein1508 deleted the stopPropagation branch July 31, 2025 07:53
@vnbaaij vnbaaij added this to the v4.12.2 milestone Sep 5, 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.

fix: Data instance is wrong in FluentDragEvents

3 participants