-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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(sql lab): enable ACE editor search in SQL editors #19328
feat(sql lab): enable ACE editor search in SQL editors #19328
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19328 +/- ##
=======================================
Coverage 66.65% 66.65%
=======================================
Files 1674 1674
Lines 64603 64603
Branches 6500 6500
=======================================
Hits 43058 43058
Misses 19862 19862
Partials 1683 1683
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@yousoph Ephemeral environment spinning up at http://34.211.6.2:8080. Credentials are |
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.
Approved, but need to confirm why find
option is previously removed from editor command.
@@ -127,8 +127,6 @@ class AceEditorWrapper extends React.PureComponent<Props, State> { | |||
} | |||
|
|||
onEditorLoad(editor: any) { | |||
editor.commands.removeCommand('find'); |
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.
Did you get a chance to look at why they removed find
command previously?
We may face side effect by adding it again?
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.
The editor originally trapped the find command, but it wasn't working.
So, we removed it to offer basic search functionality using the browser.
This re-enables search within the editor with a plugin, which is far better at searching
Ephemeral environment shutdown and build artifacts deleted. |
(cherry picked from commit eab9388)
(cherry picked from commit eab9388)
(cherry picked from commit eab9388)
(cherry picked from commit eab9388)
🏷️ preset:2022.11 |
SUMMARY
Currently, in the SQL editor inside the Lab, the search available is the native one provided by the browser.
For performance reasons, the editor only renders a subset of the entire content. So, the native search cannot find content in the editor that's not currently rendered.
This PR changes the search mechanism to use the ACE plugin one, which will enable full search inside the editor.
The search is only enabled if the editor is focused, otherwise the normal native search is used.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Screen.Recording.2022-03-23.at.09.06.22.mov
After:
Screen.Recording.2022-03-23.at.09.02.58.mov
TESTING INSTRUCTIONS
Ensure the search inside the editor can find anything inside it, including text that's not currently visible.
ADDITIONAL INFORMATION