feat(ui): add interactive spreadsheet component mo.ui.spreadsheet usi…#10008
Open
RaphJean wants to merge 8 commits into
Open
feat(ui): add interactive spreadsheet component mo.ui.spreadsheet usi…#10008RaphJean wants to merge 8 commits into
RaphJean wants to merge 8 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
e7c0e16 to
4ec416d
Compare
95a15c4 to
4cb23fa
Compare
…r and Zod parse crashes
c08d756 to
4910714
Compare
…om Python function execution inside cells
5b17c50 to
45faa84
Compare
…type patch to diagnose formula evaluation
c71e8b6 to
b671220
Compare
eec6e2b to
23ecf4f
Compare
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ng FortuneSheet
FortuneSheet (an open-source
React/TypeScript Excel-clone engine)
into the marimo notebook ecosystem
as an advanced, reactive UI widget:
mo.ui.spreadsheet.Serializes Pandas or Polars
DataFrames into memory-efficient CSV
URLs served by the kernel, along
with type metadata.
- Frontend → Backend:
Translates the edited sheet grid
into a row-oriented JSON array.
- Strict Data Integrity: Casts
cell values back to their original
dtypes (e.g., integers, floats,
dates, datetimes, booleans) on the
kernel before reconstructing the
DataFrame.
marimo/_plugins/ui/_impl/spreadsheet. pyimplementing thespreadsheetclass extending
UIElement.- Registered
spreadsheetinthe main
marimo.uipackage exports.- Frontend (
frontend/):- Installed
@fortune- sheet/react.- Created
SpreadsheetPlugin. tsxandworkbook-wrapper.tsxsupporting:
- Lazy loading the workbook to
maintain fast initial page load
speeds.
- Dynamic headers mapping
DataFrame column names to Row 0 of
the sheet.
- Freezing the column headers
row (
config.frozen.range.row_focus = 1).- Explicit
isLoadingchecksto wait for async CSV data to finish
parsing before mounting FortuneSheet
(preventing empty sheets).
- Tests & Examples:
- Added a reactive smoke test
notebook at
marimo/_smoke_tests/spreadsheet_test. py.- Added a detailed user example
notebook at
examples/ui/spreadsheet. pyshowcasing real-timerecalculations of total items and
inventory values.
changes that affect the public API:
this change was discussed or
approved through an issue, on
[Discord](https://marimo.
io/discord?ref=pr), or the community
[discussions](https://github.
com/marimo-team/marimo/discussions)
(Please provide a link if
applicable).
- [x] Any AI generated code has
been reviewed line-by-line by the
human PR author, who stands by it.
- [ ] Video or media evidence is
provided for any visual changes
(optional).
guidelines](https://github.
com/marimo-
team/marimo/blob/main/CONTRIBUTING.
md).
- [x] Documentation has been
updated where applicable, including
docstrings for API changes.
- [x] Tests have been added for
the changes made.