-
Notifications
You must be signed in to change notification settings - Fork 170
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
Switch Event Handlers 2.0 #6469
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Switched lots of event handlers from onClick to onMouseDown, along with updating the name of props if those use that naming. - Added `onMouseDown` handler that stops propagation to the react-contextify menu, so that the mouse down doesn't pass through it and activate things underneath the menu. - Added `stopPropagation` call to the `onMouseDown` of the navigator so that the event doesn't pass through to the canvas. - Removed `stopPropagation` and `preventDefault` calls in `NavigatorRowClickableWrapper` so that the event can still trigger dragging.
seanparsons
requested review from
gbalint,
Rheeseyb,
ruggi,
balazsbajorics,
liady and
bkrmendy
October 3, 2024 16:32
#14642 Bundle Size — 57.74MiB (~+0.01%).98f637f(current) vs 916e8b9 master#14635(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #14642 |
Baseline #14635 |
|
---|---|---|
Initial JS | 40.74MiB (~+0.01% ) |
40.74MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 17.97% |
18.24% |
Chunks | 21 |
21 |
Assets | 23 |
23 |
Modules | 4113 |
4113 |
Duplicate Modules | 213 |
213 |
Duplicate Code | 27.41% |
27.41% |
Packages | 475 |
475 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
1 regression
1 improvement
Current #14642 |
Baseline #14635 |
|
---|---|---|
JS | 57.73MiB (~+0.01% ) |
57.73MiB |
HTML | 7.37KiB (-0.25% ) |
7.39KiB |
Bundle analysis report Branch performance/switch-event-handler... Project dashboard
Generated by RelativeCI Documentation Report issue
ruggi
approved these changes
Oct 8, 2024
editor/src/components/inspector/sections/layout-section/list-source-cartouche.tsx
Show resolved
Hide resolved
balazsbajorics
approved these changes
Oct 8, 2024
Rheeseyb
reviewed
Oct 8, 2024
editor/src/components/navigator/navigator-item/navigator-item.tsx
Outdated
Show resolved
Hide resolved
Rheeseyb
approved these changes
Oct 8, 2024
liady
pushed a commit
that referenced
this pull request
Dec 13, 2024
- Switched lots of event handlers from onClick to onMouseDown, along with updating the name of props if those use that naming. - Added `onMouseDown` handler that stops propagation to the react-contextify menu, so that the mouse down doesn't pass through it and activate things underneath the menu. - Added `stopPropagation` call to the `onMouseDown` of the navigator so that the event doesn't pass through to the canvas. - Removed `stopPropagation` and `preventDefault` calls in `NavigatorRowClickableWrapper` so that the event can still trigger dragging.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
Perceived performance will be improved if editor functionality is triggered from
onMouseDown
events rather thanonClick
.Fix:
Switched navigator and inspector event handlers from
onClick
toonMouseDown
.Commit Details:
onMouseDown
handler that stops propagation to the react-contextify menu, so that the mouse down doesn't pass through it and activate things underneath the menu.stopPropagation
call to theonMouseDown
of the navigator so that the event doesn't pass through to the canvas.stopPropagation
andpreventDefault
calls inNavigatorRowClickableWrapper
so that the event can still trigger dragging.Manual Tests:
I hereby swear that:
Fixes #6226