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

[Task]: Trigger Modal layout highlights when moving on the header and footer as well #33318

Closed
marks0351 opened this issue May 9, 2024 · 0 comments · Fixed by #33580
Closed
Assignees
Labels
Anvil Pod Issue related to Anvil project High This issue blocks a user from building or impacts a lot of users Task A simple Todo
Milestone

Comments

@marks0351
Copy link
Contributor

No description provided.

@marks0351 marks0351 added the Anvil Pod Issue related to Anvil project label May 9, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added the Task A simple Todo label May 9, 2024
@marks0351 marks0351 self-assigned this May 9, 2024
@ramsaptami ramsaptami added the High This issue blocks a user from building or impacts a lot of users label May 13, 2024
@somangshu somangshu added this to the R1 - Polish milestone May 14, 2024
marks0351 added a commit that referenced this issue May 21, 2024
#33580)

[![workerB](https://img.shields.io/endpoint?url=https%3A%2F%2Fworkerb.linearb.io%2Fv2%2Fbadge%2Fprivate%2FU2FsdGVkX19Ze0CWc0MPiDhT4RTyUsPUbCSPCyn6Lc%2Fcollaboration.svg%3FcacheSeconds%3D60)](https://workerb.linearb.io/v2/badge/collaboration-page?magicLinkId=DEipBn-)
## Description
In this PR, we are adding an enhancement to DnD of modal widgets.
DnD was implemented only for layouts so in the case of modal, the header
and footer are not layouts and DnD is not triggered when a widget is
being dragged on top of these components of a modal.

However for the user to be able to efficiently use the DnD of modal,
mouse events of the modal are also needed to be processed.

To enable this we have a new hook that wraps all detached widgets in
editor mode only, `useAnvilDetachedWidgetsDnD`
It makes sure mouse move events on the widget are dispatched to the dnd
listeners via custom event `DETACHED_WIDGET_MOUSE_MOVE_EVENT`

we aslo had to special handle mouse leave and enter utilities to
activate a canvas for DnD,
- for all widgets except modals these are handled on the
`useAnvilDnDEventCallbacks`
- for modal widgets these events are handled on the
`useAnvilDetachedWidgetsDnD`


Fixes #33318
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Anvil"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9171877023>
> Commit: 5392578
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9171877023&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->






## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
@marks0351 marks0351 reopened this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Anvil Pod Issue related to Anvil project High This issue blocks a user from building or impacts a lot of users Task A simple Todo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants