feat: Stop editor scrolling to top#26754
Merged
rusackas merged 9 commits intoapache:masterfrom Jan 25, 2024
Merged
Conversation
justinpark
reviewed
Jan 23, 2024
| const { row, column } = cursorPosition; | ||
| editor.moveCursorToPosition({ row, column }); | ||
| editor.focus(); | ||
| editor.renderer.updateFontSize(); |
Member
There was a problem hiding this comment.
This operation(updateFontSize) seems redundant.
Contributor
Author
There was a problem hiding this comment.
You're right. I already modify the code to remove that line of code.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #26754 +/- ##
=======================================
Coverage 69.48% 69.49%
=======================================
Files 1894 1894
Lines 74151 74165 +14
Branches 8243 8244 +1
=======================================
+ Hits 51527 51539 +12
- Misses 20555 20557 +2
Partials 2069 2069
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
justinpark
reviewed
Jan 24, 2024
justinpark
reviewed
Jan 24, 2024
justinpark
reviewed
Jan 24, 2024
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
….tsx Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
…m/puridach-w/superset into feat/stop-editor-scrolling-to-top # Conflicts: # superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx
justinpark
approved these changes
Jan 25, 2024
Member
justinpark
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the contribution.
eschutho
pushed a commit
to preset-io/superset
that referenced
this pull request
Jan 31, 2024
Co-authored-by: Puridach Wutthihathaithamrong <> Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
vinothkumar66
pushed a commit
to vinothkumar66/superset
that referenced
this pull request
Nov 11, 2024
Co-authored-by: Puridach Wutthihathaithamrong <> Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
This file contains hidden or 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
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.
SUMMARY
This contribution introduces a vital usability upgrade to the SQL Editor within Apache Superset. The enhancement consists of a coding modification that embeds the cursor position into the Redux state.
Traditionally, every time users switch between SQL Lab tabs, the SQL editor viewport resets, forcing them to scroll from the top to locate their last worked-on position. This scenario presents an inconvenience that disrupts workflow and decreases editing efficiency.
This update directly addresses the issue. Upon rendering the SQL editor, it now auto-focuses on the saved cursor position from the Redux state, aligning the screen with the user's last point of work. Users can now effortlessly switch tabs, and upon their return, find the SQL Editor positioned exactly where they left off.
BEFORE SCREENSHOTS OR ANIMATED GIF
Before.-.stop.editor.mov
AFTER SCREENSHOTS OR ANIMATED GIF
After.-.stop.editor.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION