-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Support paste treepath when creating a new file or updating the file name #23209
Conversation
Separated the two events, please review again. |
web_src/js/features/repo-editor.js
Outdated
$divider.last().remove(); | ||
} | ||
|
||
joinTreePath($(this)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more last thought 😂
Could this call be moved into the if
above? This call is only needed when the path changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more last thought 😂
Could this call be moved into the
if
above? This call is only needed when the path changes.
Sure that makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, another last thought ... many $()
could be also moved to out scope? Then we do not need to spend CPU time on every keyup/input event.
eg:
const $section = $('.breadcrumb span.section');
const $divider = $('.breadcrumb div.divider');
$editFilename.on('input', ... )
$editFilename.on('keyup', ... )
Ignore me, it seems that the section
/divider
changes ....
It looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, another last thought ... many
$()
could be also moved to out scope? Then we do not need to spend CPU time on every keyup/input event.
This will cause problem. Because the events should get the lastest elements' status(like $section.length
). If they are intialized outside, the elements will have the status on created. e.g., $section.length
stays 0.
Noticed the different behavior when deleting the last letter. 2023-03-02.11.56.12.mov |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #23209 +/- ##
==========================================
+ Coverage 47.44% 47.56% +0.12%
==========================================
Files 1140 1143 +3
Lines 150804 151076 +272
==========================================
+ Hits 71549 71866 +317
+ Misses 70788 70712 -76
- Partials 8467 8498 +31
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Fixed in latest commit |
Update current deletion behavoir and paste using mouse behavior in addition to paste by keyboard: 2023-03-02.14.51.20.mov |
Close #23204
Quick Demo:
2023-03-01.13.56.16.mov