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

Combination of Wrap Text and Fit numbers PRs #1526

Merged
merged 116 commits into from
Jul 31, 2024
Merged

Combination of Wrap Text and Fit numbers PRs #1526

merged 116 commits into from
Jul 31, 2024

Conversation

davidfig
Copy link
Collaborator

@davidfig davidfig commented Jul 5, 2024

This is a combination of @AyushAgrawal-A2 's Wrap Text PR and the @davidfig 's Fit Numbers PR

feat: wrap text, align text vertically and auto resize row

closes #1227
closes #1460
closes #1463

Changes:

  • Cell Label - Wrap, Clip & Overflow
  • Cell Label - Vertical Align
  • Inline Editor - Same text rendering as cell format (horizontal align, vertical align and wrapping)
  • Re-wrap text on cell width change
  • Auto row resize for wrapped text - on cell width change or content change
  • Double click on row heading to auto adjust row height
  • Fixed bugs related to neighbouring hash position and clipping
  • Update clipboard for vertical align
  • Multiplayer sync after transient / auto resize
  • Store manual / auto resize state. Disable auto resize for manually resized rows.
  • Auto resize column (on column heading dbl click) should resize to unwrapped text width.
  • Tests

Fit numbers

Change how numbers render. In Excel and Sheets, the numbers never overflow the cell. They either reduce their precision, change to scientific, or show up as ####. Fixes #1468.

  • redo how CellValue::Number.to_display() works (removing formatting)
  • keep some formatting within Rust (but outside the to_display function) so we can still search against what will likely be the displayed number
  • move all number formatting from Rust to TS :( - this is necessary b/c we don't know how to stringify the number until we are actually rendering and can compare glyph sizes to the cell width
  • move tests from Rust to TS for number rendering
  • show #### when number overflows content
  • figure out when to change the display from number to scientific to show larger numbers in a smaller space
  • fix search to use actual display value (ie, put back the rust to_display w/options for search purposes)

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1526 July 24, 2024 20:13 Inactive
@AyushAgrawal-A2
Copy link
Collaborator

AyushAgrawal-A2 commented Jul 24, 2024

@davidkircos
Fixed above bugs.

Multiple async operations were not able to run in a single transaction as the same boolean flag has_async was used to flag a async operation in transaction. First async call that finishes would remove that flag and end the transaction.

Now has_async is a counter.

@davidfig
Copy link
Collaborator Author

Can you add tests for the multiple async. Any problems with the counter?

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1526 July 25, 2024 22:37 Inactive
@AyushAgrawal-A2
Copy link
Collaborator

Can you add tests for the multiple async. Any problems with the counter?

@davidfig
done

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1526 July 30, 2024 16:19 Inactive
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.

Bolding text and reloading is not preserved

CleanShot.2024-07-30.at.10.19.47.mp4

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1526 July 30, 2024 17:24 Inactive
@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1526 July 30, 2024 17:26 Inactive
@AyushAgrawal-A2
Copy link
Collaborator

Bolding text and reloading is not preserved

@davidkircos
fixed
another bug due to change in async transaction. I was updating the transaction clone but not saving it back in aync transactions.

@davidkircos davidkircos temporarily deployed to quadratic-api-dev-pr-1526 July 30, 2024 17:44 Inactive
@davidkircos davidkircos merged commit 37d8bd3 into qa Jul 31, 2024
14 checks passed
@davidkircos davidkircos deleted the fit-numbers branch July 31, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants