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

Inline formula #1316

merged 88 commits into from May 21, 2024

Conversation

davidfig
Copy link
Collaborator

@davidfig davidfig commented Apr 25, 2024

  • replace CellInput with InputEditor
  • width should adjust automatically based on the width of the content
  • div should never scroll or move from its anchor position
  • formula should be activated with = as the first character w/proper syntax highlighting and hinting
  • cell highlighting for formulas
  • keyboard movement to input cell location
  • mouse movement to input cell location
  • bold and italic support
  • multiplayer
  • improve keep cursor visible logic

Limitations

  • there's no way (I've found) to turn off the wheel event capture. This stops the grid from being able to mouse scroll when hovering over an open input box. This likely would require a hack/PR to monaco editor to add an option to remove the wheel handler

@cla-bot cla-bot bot added the cla-signed label Apr 25, 2024
Copy link

vercel bot commented Apr 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quadratic ✅ Ready (Inspect) Visit Preview May 21, 2024 5:10pm

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

Attention: Patch coverage is 98.58156% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 89.34%. Comparing base (eb54932) to head (10651b1).

Files Patch % Lines
quadratic-core/src/formulas/ast.rs 85.71% 1 Missing ⚠️
quadratic-core/src/formulas/functions/macros.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1316      +/-   ##
==========================================
+ Coverage   89.24%   89.34%   +0.10%     
==========================================
  Files         160      160              
  Lines       26318    26425     +107     
==========================================
+ Hits        23488    23610     +122     
+ Misses       2830     2815      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@davidkircos davidkircos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug:
Start an inline formula, type something, expand to full editor.
While the inline editor is still open, press / on a different cell. Select Python
The content from the inline formula will appear in the python formula

@davidkircos davidkircos linked an issue May 16, 2024 that may be closed by this pull request
@jimniels
Copy link
Collaborator

When using Google Sheets or Excel, you can select multiple cells at once is done by holding the CMD key and then clicking on individual cells

CleanShot.2024-05-20.at.11.56.14.mp4

Quadratic does not do this. Holding down CMD and clicking doesn't make multiple selections. It only moves the selection.

CleanShot.2024-05-20.at.11.56.36.mp4

Seems like we should match the functionality of excel/sheets.

@jimniels
Copy link
Collaborator

When you delete the last closing parenthesis, then try to make a selection with the cursor, it seems to cancel your entire selection and breaks you out of interactive editing mode — presumably because it inserts the cell reference at the beginning of the cell

CleanShot.2024-05-20.at.12.04.55.mp4

Google docs doesn't do this.

CleanShot.2024-05-20.at.12.06.10.mp4

@jimniels
Copy link
Collaborator

jimniels commented May 20, 2024

Code cell outlines disappear before I've changed anything in my formula. They shouldn't redraw until I run the formula anew

CleanShot.2024-05-20.at.12.33.26.mp4

We don't do that with other cell types (like python). Seems like the outlines should stay until the formula re-runs.

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1316 May 21, 2024 13:51 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1316 May 21, 2024 14:02 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1316 May 21, 2024 16:58 Inactive
Copy link
Collaborator

@jimniels jimniels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 👍 on the functionality of this

@davidkircos davidkircos merged commit b222638 into main May 21, 2024
13 checks passed
@davidkircos davidkircos deleted the inline-formula branch May 21, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants