Skip to content
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

Inline formula #1316

Merged
merged 88 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5396bf8
playing with monaco
davidfig Apr 24, 2024
1054d99
Merge branch 'main' into inline-formula
davidfig Apr 24, 2024
733e79b
replacing CellInput with InlineEditorHandler
davidfig Apr 25, 2024
b51a52b
viewport moves if cursor is not visible
davidfig Apr 26, 2024
5a276d1
changing between formula and normal text
davidfig Apr 26, 2024
a5bb07b
Proper A1 notation, better keyboard support
davidfig Apr 26, 2024
a9d46c5
better formula UI
davidfig Apr 26, 2024
a019248
fix cell highlights for formula editing
davidfig Apr 26, 2024
77888a8
open code editor button actually opens code editor
davidfig Apr 26, 2024
3ba39ca
cleaning up
davidfig Apr 27, 2024
81c980b
Merge branch 'main' into inline-formula
davidfig Apr 27, 2024
953ed82
Selection outside of inline formula editor
davidfig Apr 27, 2024
d5ab742
add tooltip to expand formula code
davidfig Apr 27, 2024
a2138c5
keyboard movement when inline formula editing works
davidfig Apr 27, 2024
fe4e876
working through keyboard movement (next is mouse movement)
davidfig Apr 27, 2024
e5228ff
arrow keys work for regular editing
davidfig Apr 27, 2024
ad52ba5
Better keyboard handling while moving the grid cursor
davidfig Apr 28, 2024
e5f55a0
refactored inlineEditorHandler to remove editor to inlineEditorMonaco
davidfig Apr 28, 2024
791f547
marching ants
davidfig Apr 29, 2024
d1e96f7
fixed bug with highlight drawing
davidfig Apr 29, 2024
88008a2
combined CellHighlights and highlightCells
davidfig Apr 30, 2024
9c840c2
removed blinking of cellHighlight when changing cursor position
davidfig Apr 30, 2024
57de405
shrink the padding to grow the editor a bit
davidfig Apr 30, 2024
da14e5a
open code editor button properly populates any updates to the code st…
davidfig Apr 30, 2024
62a1192
can switch sheets while inline editing a formula
davidfig Apr 30, 2024
df11218
working through more edge cases with changing sheets
davidfig Apr 30, 2024
fd30910
better keyboard handling
davidfig Apr 30, 2024
7499c47
better sheet changing handling
davidfig Apr 30, 2024
eaa7f49
working through bugs
davidfig Apr 30, 2024
6e3bef4
fixed bold/italic toggling while in editor
davidfig May 1, 2024
804d9ec
multiplayer work
davidfig May 1, 2024
596dc4b
fixed bug with width of the cursor outline
davidfig May 1, 2024
46a5eda
working through sheet change bugs
davidfig May 1, 2024
71a786a
fixing bugs with closing editor by clicking on another cell (when not…
davidfig May 1, 2024
0a94bc3
fix bug with cellHighlights
davidfig May 1, 2024
9d350ba
Merge branch 'main' into inline-formula
davidfig May 1, 2024
ae01b08
fix prettier issue
davidfig May 1, 2024
7c23283
fix clippy issue
davidfig May 1, 2024
9889315
add test for getA1Notation
davidfig May 1, 2024
7c244c2
Merge branch 'main' into inline-formula
davidkircos May 1, 2024
c9de00e
pushing a change to trigger a rebuild
davidfig May 1, 2024
dd5acd0
properly handles clicking away from cell
davidfig May 3, 2024
340929b
attempt to close parenthesis
davidfig May 3, 2024
77e55ab
typing slash as the first character opens the code cell type dialog
davidfig May 3, 2024
1bdcb1d
removing console.log
davidfig May 3, 2024
263db66
PR comments
davidfig May 3, 2024
da8ad68
fix clippy
davidfig May 3, 2024
100233a
ensure we clear initialCode after closing the codeEditor
davidfig May 3, 2024
733f7f9
fix bug in closeParenthesis
davidfig May 3, 2024
28cbb52
fix another bug in isFormulaValid
davidfig May 3, 2024
50f33ae
remove console.log
davidfig May 3, 2024
a4c94fd
fix bug with editor text not properly updating
davidfig May 3, 2024
5bc4ecc
fix bug with closeParenthesis
davidfig May 3, 2024
386ad89
fix hover cell for errors (introduced a bug)
davidfig May 3, 2024
9673329
Merge branch 'main' into inline-formula
davidfig May 7, 2024
e71dd6c
Update InlineEditor.tsx
jimniels May 7, 2024
320b942
remove manual setting of height in inlineEditorHandler
davidfig May 9, 2024
4a74ad0
fix bug with moving from inline to code editor
davidfig May 9, 2024
2bd281c
remove cellsArray when inline editor is active
davidfig May 9, 2024
9d5758d
fix keepCursorVisible when div is not showing
davidfig May 9, 2024
e3f68cd
fix a bunch of bugs with moving cells; better handling of arrows when…
davidfig May 10, 2024
3737f75
fixed bug with pointer and keyboard movement within the editor
davidfig May 13, 2024
b3f7d42
formulas now require at least one argument when evaluation ...[]
davidfig May 13, 2024
09e2368
added parse_and_check_formula to check for correctness (but not run t…
davidfig May 14, 2024
ca671cd
fixed logic around pointer down while moving cells
davidfig May 14, 2024
f412a67
fix opening python cells via double clicking
davidfig May 14, 2024
7f73407
fix moving cursor back to code cell after pressing enter
davidfig May 14, 2024
4bd08f4
Merge branch 'main' into inline-formula
davidfig May 14, 2024
02b8e9b
If formula has a selection, it will be replaced by pointerDown selection
davidfig May 14, 2024
fa01c98
Merge branch 'main' into inline-formula
davidfig May 14, 2024
e60529e
improvements to CodeHint
davidfig May 14, 2024
7180443
fix undo not resetting Press / to code message
davidfig May 15, 2024
67d9447
fix a few bugs; add key to HoverCells
davidfig May 15, 2024
640e463
fix bug with width on initial open
davidfig May 15, 2024
feb9041
adding more tests
davidfig May 15, 2024
98e7c0c
fix small bug in checkFormula
davidfig May 15, 2024
8adfda3
Merge branch 'main' into inline-formula
davidkircos May 15, 2024
b713298
remove logs
davidfig May 15, 2024
56f4cc4
fix tooltip message
davidfig May 16, 2024
aa79dcc
Fix bug with inline enter + '/'
davidfig May 16, 2024
3dfdac4
Merge branch 'main' into inline-formula
davidkircos May 16, 2024
cf65275
fix bug with populating code editor with old data
davidfig May 17, 2024
6313ee5
fix tooltip warning
davidfig May 17, 2024
7354982
Merge branch 'main' into inline-formula
davidkircos May 20, 2024
391da6e
fix formula ending in ","
davidfig May 21, 2024
ee90682
keep CellsArray outline when inline editing formula
davidfig May 21, 2024
d3e5eb4
Fix bug with formula expand button visible on other sheets
davidfig May 21, 2024
10651b1
Merge branch 'main' into inline-formula
davidkircos May 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

## ![quadratic icon small](https://user-images.githubusercontent.com/3479421/162039117-02f85f2c-e382-4ed8-ac39-64efab17a144.svg) **_The infinite multiplayer spreadsheet, with Python, SQL, and AI_**

Modern multiplayer spreadsheet with Python, AI, and SQL built-in.
Modern multiplayer spreadsheet with Python, AI, and SQL built-in.

Built with Rust + WASM + WebGL to run seamlessly at 60+ FPS in the browser.
Built with Rust + WASM + WebGL to run seamlessly at 60+ FPS in the browser.

Get from data to insight more effectively as a team.
Get from data to insight more effectively as a team.

<img width="1552" alt="Quadratic in a standalone macOS window; users are working together on a spreadsheet to measure the life expectancy in Canada." src="https://github.com/quadratichq/quadratic/assets/146771258/35724976-5d2b-46f9-b9e9-3fe19468b1af">

Expand Down Expand Up @@ -48,8 +48,8 @@ _Quadratic is in Beta._
- [x] Undo / Redo (issue [#42](https://github.com/quadratichq/quadratic/issues/42))
- [x] Multiplayer Support
- [x] Charts and Graphs
- [x] Teams support
- [ ] JS support
- [x] Teams support
- [ ] JS support
- [ ] SQL Database Support
- [ ] AI Auto Complete

Expand Down
4 changes: 4 additions & 0 deletions quadratic-client/src/app/atoms/editorInteractionStateAtom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ export interface EditorInteractionState {
selectedCell: Coordinate;
selectedCellSheet: string;
mode?: CodeCellLanguage;
initialCode?: string;
follow?: string;
editorEscapePressed?: boolean;
waitingForEditorClose?: {
selectedCell: Coordinate;
selectedCellSheet: string;
mode?: CodeCellLanguage;
showCellTypeMenu: boolean;
inlineEditor?: boolean;
initialCode?: string;
};
undo: boolean;
redo: boolean;
Expand All @@ -40,6 +43,7 @@ export const editorInteractionStateDefault: EditorInteractionState = {
uuid: '', // when we call <RecoilRoot> we initialize this with the value from the server
selectedCell: { x: 0, y: 0 },
selectedCellSheet: '',
initialCode: undefined,
mode: undefined,
undo: false,
redo: false,
Expand Down
2 changes: 1 addition & 1 deletion quadratic-client/src/app/events/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface EventTypes {
setCursor: (cursor: string) => void;
cursorPosition: () => void;
generateThumbnail: () => void;
changeInput: (input: boolean) => void;
changeInput: (input: boolean, initialValue?: string) => void;
headingSize: (width: number, height: number) => void;
gridSettings: () => void;

Expand Down
5 changes: 4 additions & 1 deletion quadratic-client/src/app/grid/controller/Sheets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { events } from '@/app/events/events';
import { inlineEditorHandler } from '@/app/gridGL/HTMLGrid/inlineEditor/inlineEditorHandler';
import { SheetInfo } from '@/app/quadratic-core-types';
import { quadraticCore } from '@/app/web-workers/quadraticCore/quadraticCore';
import { pixiApp } from '../../gridGL/pixiApp/PixiApp';
Expand Down Expand Up @@ -135,7 +136,9 @@ class Sheets {
pixiApp.cursor.dirty = true;
pixiApp.multiplayerCursor.dirty = true;
pixiApp.boxCells.reset();
pixiAppSettings.changeInput(false);
if (!inlineEditorHandler.isEditingFormula()) {
pixiAppSettings.changeInput(false);
}
pixiApp.cellsSheets.show(value);
this.updateSheetBar();
pixiApp.viewport.loadViewport();
Expand Down
5 changes: 4 additions & 1 deletion quadratic-client/src/app/grid/sheet/SheetCursor.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { inlineEditorHandler } from '@/app/gridGL/HTMLGrid/inlineEditor/inlineEditorHandler';
import { multiplayer } from '@/app/web-workers/multiplayerWebWorker/multiplayer';
import { IViewportTransformState } from 'pixi-viewport';
import { Rectangle } from 'pixi.js';
Expand Down Expand Up @@ -78,7 +79,9 @@ export class SheetCursor {
this.keyboardMovePosition = options.keyboardMovePosition;
}
pixiApp.updateCursorPosition({ ensureVisible: options.ensureVisible ?? true });
multiplayer.sendSelection(this.getMultiplayerSelection());
if (!inlineEditorHandler.cursorIsMoving) {
multiplayer.sendSelection(this.getMultiplayerSelection());
}
}

// gets a stringified selection string for multiplayer
Expand Down
Loading
Loading