-
Notifications
You must be signed in to change notification settings - Fork 148
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
fix: pressing arrow left next to = adds ref for left cell #1790
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## qa #1790 +/- ##
=======================================
Coverage 90.91% 90.91%
=======================================
Files 206 206
Lines 41911 41911
=======================================
Hits 38104 38104
Misses 3807 3807 ☔ View full report in Codecov by Sentry. |
Nice! This solves the issue in the attached PR. If it's simple we should also make left arrow work for any positon where you can reference a cell. For example if you do =[Left arrorw] + [Left arrow] |
@davidkircos
we should enable both or none for inserting cell references when cursor in middle of text. there is existing logic to decide whether a cursor position wants a cell ref or not. should be easy to just enable it, but there must be a reason why this was disabled in the first place. |
We want to match the behavior of other spreadsheets. Other sheets allow any arrow keys to select cells at any valid position for a cell reference in the Formula. |
Other spreadsheets also disable arrow key cell selection after clicking in the inline editor. Personally I find this hidden state very confusing (and inconvenient, since I like navigating text using keyboard) but we'll need to track it if we want consistency. |
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.
Implementing more of the Excel behavior makes sense in this PR. This behavior is really important for users with Formulas.
specifically:
- All arrow keys can be used to select cells in any valid cell reference position in a formula.
@davidkircos |
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.
This seems to work great! Big improvement!
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.
It is now effectively impossible to edit a formula using only the keyboard without retyping the whole thing. I find this inconvenient personally, but I think it's also an accessibility issue.
Left arrow next to the initial =
is ok because there's no reason to have your cursor to the left of =
, but now it's basically impossible to move the cursor within the inline formula editor.
Anecdotally, it feels very inconsistent: occasionally left arrow moves within the formula, other times it inserts a cell reference, and usually it just closes the formula editor entirely. I prefer requiring up/down arrows to insert cell references, because those are not used for single-line text navigation anyway so there's no conflict.
|
Excel has the behavior of this PR (or close to it) when initially creating a formula (by double-clicking a blank or non-formula cell and typing
After any of those three actions, arrow keys navigate within the inline editor and it becomes impossible to use the arrow keys to insert a cell reference. Google Sheets is even more confusing; it is similar to Excel, but it's sometimes possible to re-enter the "arrow keys to insert cell references" state. If I type Screen.Recording.2024-08-28.at.9.19.04.PM.movIMO both of these behaviors are surprising (hidden state! and why is F2 different from double-clicking?) and inconvenient (I can't insert cell references when editing an existing formula?) Personally, I like Quadratic's current behavior because it has no hidden state and is always possible to navigate within the inline editor (using left/right) and insert cells (using up/down), although inserting a reference to a left/right cell requires the counterintuitive key sequence ↑ ↓ ←. I think replicating Excel's behavior (or any hybrid between what Excel does and what we currently do) would also be acceptable. |
closes #1758