Skip to content

refactor!(core & api): rename drag events for better consistency and clarity#10170

Merged
lucasfernog merged 6 commits intodevfrom
refactor/drag-drop-names
Jul 12, 2024
Merged

refactor!(core & api): rename drag events for better consistency and clarity#10170
lucasfernog merged 6 commits intodevfrom
refactor/drag-drop-names

Conversation

@amrbashir
Copy link
Copy Markdown
Member

No description provided.

@amrbashir amrbashir requested a review from a team as a code owner July 2, 2024 05:20
@FabianLars FabianLars changed the title refacotr!(core & api): rename drag events for better consistency and clarity refactor!(core & api): rename drag events for better consistency and clarity Jul 2, 2024
Comment thread tooling/api/src/webview.ts Outdated
const unlistenDrop = await this.listen<DragDropPayload>(
TauriEvent.DROP,
const unlistenDragOver = await this.listen<DragPayload>(
TauriEvent.DRAG_LEAVE,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This listener should be attached to TauriEvent.DRAG_OVER, no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, thanks

- `TauriEvent.DRAG` -> `TauriEvent.DRAG_ENTER`
- `TauriEvent.DROP_OVER` -> `TauriEvent.DRAG_OVER`
- `TauriEvent.DROP` -> `TauriEvent.DRAG_DROP`
- `TauriEvent.DROP_CANCELLED` -> `TauriEvent::DRAG_LEAVE`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'drag leave' makes sense on the JS world because you must define which elements receive the event; in our case 'leave' is misleading because it's not triggered when the drag operation moves out of the window

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be triggered, if not, that's a bug

Copy link
Copy Markdown
Member

@lucasfernog lucasfernog Jul 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oohhh i didn't know we changed that on wry, let me check

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't differentiate between cancelled and leave so we combined them, not sure what's the best name here

@github-actions
Copy link
Copy Markdown
Contributor

Package Changes Through 4b39f1b

There are 9 changes which include tauri-cli with prerelease, @tauri-apps/cli with prerelease, tauri with prerelease, @tauri-apps/api with prerelease, tauri-bundler with prerelease, tauri-macros with prerelease, tauri-codegen with prerelease, tauri-runtime-wry with prerelease, tauri-utils with prerelease

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.0.0-beta.14 2.0.0-beta.15
tauri-utils 2.0.0-beta.18 2.0.0-beta.19
tauri-bundler 2.0.1-beta.17 2.0.1-beta.18
tauri-runtime 2.0.0-beta.19 2.0.0-beta.20
tauri-runtime-wry 2.0.0-beta.19 2.0.0-beta.20
tauri-codegen 2.0.0-beta.18 2.0.0-beta.19
tauri-macros 2.0.0-beta.18 2.0.0-beta.19
tauri-plugin 2.0.0-beta.18 2.0.0-beta.19
tauri-build 2.0.0-beta.18 2.0.0-beta.19
tauri 2.0.0-beta.23 2.0.0-beta.24
@tauri-apps/cli 2.0.0-beta.21 2.0.0-beta.22
tauri-cli 2.0.0-beta.21 2.0.0-beta.22

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@lucasfernog lucasfernog merged commit 261c9f9 into dev Jul 12, 2024
@lucasfernog lucasfernog deleted the refactor/drag-drop-names branch July 12, 2024 13:22
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.

3 participants