Skip to content

Commit

Permalink
Merge pull request #1316 from quadratichq/inline-formula
Browse files Browse the repository at this point in the history
Inline formula
  • Loading branch information
davidkircos authored May 21, 2024
2 parents eb54932 + 10651b1 commit b222638
Show file tree
Hide file tree
Showing 57 changed files with 2,037 additions and 695 deletions.
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

0 comments on commit b222638

Please sign in to comment.