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

feat: Improved nodes events states #859

Merged
merged 6 commits into from
Sep 10, 2024
Merged

Conversation

marc2332
Copy link
Owner

@marc2332 marc2332 commented Sep 9, 2024

Closes #849

Click events will only be emitted to elements that were previously pressed down (no need to register a mousedown event). Mouse leave events wont need a mouseenter or mouseevents to be registered in the nodes. Added a new mouseup event that behaves like the old onclick

This also cleans up a bit the internals.

I also made an exception for freya-testing so it can emit click events without the need of sending mousedown events before.

@marc2332 marc2332 added the enhancement 🔥 New feature or request label Sep 9, 2024
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 88.97638% with 14 lines in your changes missing coverage. Please review.

Project coverage is 75.98%. Comparing base (394774b) to head (b51302b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/core/src/events/nodes_state.rs 87.50% 10 Missing ⚠️
crates/native-core/src/events.rs 78.57% 3 Missing ⚠️
crates/renderer/src/app.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #859      +/-   ##
==========================================
+ Coverage   75.95%   75.98%   +0.03%     
==========================================
  Files         205      205              
  Lines       22974    23051      +77     
==========================================
+ Hits        17450    17516      +66     
- Misses       5524     5535      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marc2332
Copy link
Owner Author

This will break the drag and drop

@marc2332 marc2332 marked this pull request as draft September 10, 2024 15:09
@marc2332 marc2332 marked this pull request as ready for review September 10, 2024 19:54
@marc2332 marc2332 merged commit 788b3f6 into main Sep 10, 2024
7 checks passed
@marc2332 marc2332 deleted the feat/improved-nodes-events-states branch September 10, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: onclick should only be emitted to the element it was started on and not where it finished
1 participant