Repository navigation
Allow editing and selecting text inside worksheet text boxes - #84
Merged
h-a-n-a-s-h-i merged 3 commits intoOct 10, 2026
Merged
Conversation
# Conflicts: # apps/gridcraft/src/native_menu.rs # crates/engine/src/tests.rs
shape.setText refuses edits on a protected sheet (drawing objects are locked; there is no edit-objects allowance yet) and text longer than 32,767 characters, like a cell. The editor doesn't open on a protected sheet and its TextEdit carries the same character limit. Tests for both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Merged into If you haven't already, please come join us on Discord: https://discord.gg/artcraft — we'd love to have you around. |
quantmind-br
added a commit
to quantmind-br/gridcraft
that referenced
this pull request
Oct 10, 2026
…rmats) Interface, formula language and regional format work as in Excel: function names, booleans, errors and format-code letters follow the formula language (the interface language by default, or en-US); separators, dates, months and currency follow the regional format. Workbooks, XLSX, the journal and programmatic params stay canonical (English names, `,` arguments, `.` decimal), so a file opens the same in every language. Local text only crosses the engine boundary as `*Local` fields. Languages: en-US, pt-BR, pt-PT, es-ES, fr-FR, de-DE, it-IT, ru-RU, ja-JP, ko-KR, zh-CN, zh-TW (Japanese, Korean and Chinese keep English function names, as Excel does). - locale (new, L0): language and region data in TOML, validated by build.rs (missing keys, duplicate local names, colliding separators, canonical en-US), CLDR-style negotiation of OS and browser tags. - formula: tokenize/parse/print per dialect; one function catalog with file prefixes replaces the four hand-kept lists (_xlfn., _xludf. for canonical names typed in a localized dialect, _xlpm. for LET/LAMBDA parameters). In ru-RU `:` separates array-constant rows: inside braces a number followed by `:` is a number, since array constants hold no references. - core, numfmt, functions, calc: regional input parsing and text-to-number coercion, localized number-format codes and display, TEXT/FIXED/DOLLAR, VALUE/DATEVALUE/NUMBERVALUE, criteria, CELL/INFO keywords, DBCS *B functions. - l10n (new, L4): Fluent messages for all 12 languages, same keys and arguments as en-US; `cargo xtask locales` reports coverage and runs in ci. - engine: locale prefs, app.setLocale / app.getInternational / app.languages, file.options (catalog: 259 / 290), inputLocal / formulaLocal / valueLocal / numberFormatLocal / refersToLocal, stable EngineError codes, regional CSV, app-created content in the interface language. - ui-egui and apps: translated UI and native menus, local formula editing with autocomplete and argument hints, Options > Language (live switch), localized shortcuts where Excel localizes them, IME, CJK font fallback (font bytes validated before egui sees them), system locale detection, localStorage prefs on the web, CLI --locale, MCP local params. Built on upstream work: - Interface languages (storytold#31, storytold#82, storytold#104): the hand-written table in crates/ui-egui/src/i18n.rs is folded into the Fluent catalog; every upstream language stays, Russian is the 12th (function names voted from Microsoft's ru-RU pages, checked against independent tables, with aliases such as УСЛОВИЯ and ЕСЛИНД). The View-tab picker runs app.language.set and shares the preference with Options > Language; ui.json language codes migrate once to prefs.json unless they are what old builds detected from the system. Text box editing (storytold#84) and key tips (storytold#43) keep working, with translated captions; key tip letters stay English in every language. - Spanish formulas (storytold#98) are folded into this design: names follow the interface language and separators the region, so FormulaLocale, UiState.language and docs/formula-input.md are superseded. Its name-precedence rule is kept and generalized: defined names, table names and LET/LAMBDA bindings win over localized function names and booleans (parse_local_with/print_local_with, Workbook::knows_name) in cell input, *Local params, display, find/replace, CF, validation, names, FORMULATEXT and INDIRECT. A built-in whose local spelling a name took is written with its file prefix (_xlfn.SUM, _xlfn.FALSE()). The journal re-reads *Local params against the workbook as the command found it. storytold#98's UI tests are ported. - Progress docs (storytold#189): localization re-measured (~10% -> ~50% ready). - storytold#57/storytold#159: compare_numbers and MIN() with no arguments use the regional coercion. storytold#148: precedents of ranges ending in a function. storytold#127: the every-line delimiter rule applies to the regional CSV sniffer, whose fallback is the region's list separator. storytold#156: legacy array braces around the localized formula. storytold#149: table.resize writes the names it chooses into the header cells and numbers repeated headers like insert.table. storytold#105: cell-picture strings in all 12 languages. - Restored upstream behaviour: imported ODS/XLSB files are titled "<name> (imported).xlsx"; the import message shows 5 warnings plus a count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quantmind-br
added a commit
to quantmind-br/gridcraft
that referenced
this pull request
Oct 11, 2026
…rmats) Interface, formula language and regional format work as in Excel: function names, booleans, errors and format-code letters follow the formula language (the interface language by default, or en-US); separators, dates, months and currency follow the regional format. Workbooks, XLSX, the journal and programmatic params stay canonical (English names, `,` arguments, `.` decimal), so a file opens the same in every language. Local text only crosses the engine boundary as `*Local` fields. Languages: en-US, pt-BR, pt-PT, es-ES, fr-FR, de-DE, it-IT, ru-RU, ja-JP, ko-KR, zh-CN, zh-TW (Japanese, Korean and Chinese keep English function names, as Excel does). - locale (new, L0): language and region data in TOML, validated by build.rs (missing keys, duplicate local names, colliding separators, canonical en-US), CLDR-style negotiation of OS and browser tags. - formula: tokenize/parse/print per dialect; one function catalog with file prefixes replaces the four hand-kept lists (_xlfn., _xludf. for canonical names typed in a localized dialect, _xlpm. for LET/LAMBDA parameters). In ru-RU `:` separates array-constant rows: inside braces a number followed by `:` is a number, since array constants hold no references. - core, numfmt, functions, calc: regional input parsing and text-to-number coercion, localized number-format codes and display, TEXT/FIXED/DOLLAR, VALUE/DATEVALUE/NUMBERVALUE, criteria, CELL/INFO keywords, DBCS *B functions. - l10n (new, L4): Fluent messages for all 12 languages, same keys and arguments as en-US; `cargo xtask locales` reports coverage and runs in ci. - engine: locale prefs, app.setLocale / app.getInternational / app.languages, file.options (catalog: 259 / 290), inputLocal / formulaLocal / valueLocal / numberFormatLocal / refersToLocal, stable EngineError codes, regional CSV, app-created content in the interface language. - ui-egui and apps: translated UI and native menus, local formula editing with autocomplete and argument hints, Options > Language (live switch), localized shortcuts where Excel localizes them, IME, CJK font fallback (font bytes validated before egui sees them), system locale detection, localStorage prefs on the web, CLI --locale, MCP local params. Built on upstream work: - Interface languages (storytold#31, storytold#82, storytold#104): the hand-written table in crates/ui-egui/src/i18n.rs is folded into the Fluent catalog; every upstream language stays, Russian is the 12th (function names voted from Microsoft's ru-RU pages, checked against independent tables, with aliases such as УСЛОВИЯ and ЕСЛИНД). The View-tab picker runs app.language.set and shares the preference with Options > Language; ui.json language codes migrate once to prefs.json unless they are what old builds detected from the system. Text box editing (storytold#84) and key tips (storytold#43) keep working, with translated captions; key tip letters stay English in every language. - Spanish formulas (storytold#98) are folded into this design: names follow the interface language and separators the region, so FormulaLocale, UiState.language and docs/formula-input.md are superseded. Its name-precedence rule is kept and generalized: defined names, table names and LET/LAMBDA bindings win over localized function names and booleans (parse_local_with/print_local_with, Workbook::knows_name) in cell input, *Local params, display, find/replace, CF, validation, names, FORMULATEXT and INDIRECT. A built-in whose local spelling a name took is written with its file prefix (_xlfn.SUM, _xlfn.FALSE()). The journal re-reads *Local params against the workbook as the command found it. storytold#98's UI tests are ported. - Progress docs (storytold#189): localization re-measured (~10% -> ~50% ready). - storytold#57/storytold#159: compare_numbers and MIN() with no arguments use the regional coercion. storytold#148: precedents of ranges ending in a function. storytold#127: the every-line delimiter rule applies to the regional CSV sniffer, whose fallback is the region's list separator. storytold#156: legacy array braces around the localized formula. storytold#149: table.resize writes the names it chooses into the header cells and numbers repeated headers like insert.table. storytold#105: cell-picture strings in all 12 languages. - Restored upstream behaviour: imported ODS/XLSB files are titled "<name> (imported).xlsx"; the import message shows 5 warnings plus a count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quantmind-br
added a commit
to quantmind-br/gridcraft
that referenced
this pull request
Oct 11, 2026
…rmats) Interface, formula language and regional format work as in Excel: function names, booleans, errors and format-code letters follow the formula language (the interface language by default, or en-US); separators, dates, months and currency follow the regional format. Workbooks, XLSX, the journal and programmatic params stay canonical (English names, `,` arguments, `.` decimal), so a file opens the same in every language. Local text only crosses the engine boundary as `*Local` fields. Languages: en-US, pt-BR, pt-PT, es-ES, fr-FR, de-DE, it-IT, ru-RU, ja-JP, ko-KR, zh-CN, zh-TW (Japanese, Korean and Chinese keep English function names, as Excel does). - locale (new, L0): language and region data in TOML, validated by build.rs (missing keys, duplicate local names, colliding separators, canonical en-US), CLDR-style negotiation of OS and browser tags. Only en-US must list every function: one another language doesn't list yet keeps its English spelling there, so adding a worksheet function needs English data only. - formula: tokenize/parse/print per dialect; one function catalog with file prefixes replaces the four hand-kept lists (_xlfn., _xludf. for canonical names typed in a localized dialect, _xlpm. for LET/LAMBDA parameters). In ru-RU `:` separates array-constant rows: inside braces a number followed by `:` is a number, since array constants hold no references. - core, numfmt, functions, calc: regional input parsing and text-to-number coercion, localized number-format codes and display, TEXT/FIXED/DOLLAR, VALUE/DATEVALUE/NUMBERVALUE, criteria, CELL/INFO keywords, DBCS *B functions. - l10n (new, L4): Fluent messages for all 12 languages, same keys and arguments as en-US (function descriptions may fall back to en-US); `cargo xtask locales` reports coverage, lists untranslated function names and descriptions as warnings, and runs in ci. - engine: locale prefs, app.setLocale / app.getInternational / app.languages, file.options (catalog: 259 / 290), inputLocal / formulaLocal / valueLocal / numberFormatLocal / refersToLocal, stable EngineError codes, regional CSV, app-created content in the interface language. - ui-egui and apps: translated UI and native menus, local formula editing with autocomplete and argument hints, Options > Language (live switch), localized shortcuts where Excel localizes them, IME, CJK font fallback (font bytes validated before egui sees them), system locale detection, localStorage prefs on the web, CLI --locale, MCP local params. Built on upstream work: - Interface languages (storytold#31, storytold#82, storytold#104): the hand-written table in crates/ui-egui/src/i18n.rs is folded into the Fluent catalog; every upstream language stays, Russian is the 12th (function names voted from Microsoft's ru-RU pages, checked against independent tables, with aliases such as УСЛОВИЯ and ЕСЛИНД). The View-tab picker runs app.language.set and shares the preference with Options > Language; ui.json language codes migrate once to prefs.json unless they are what old builds detected from the system. Text box editing (storytold#84) and key tips (storytold#43) keep working, with translated captions; key tip letters stay English in every language. - Spanish formulas (storytold#98) are folded into this design: names follow the interface language and separators the region, so FormulaLocale, UiState.language and docs/formula-input.md are superseded. Its name-precedence rule is kept and generalized: defined names, table names and LET/LAMBDA bindings win over localized function names and booleans (parse_local_with/print_local_with, Workbook::knows_name) in cell input, *Local params, display, find/replace, CF, validation, names, FORMULATEXT and INDIRECT. A built-in whose local spelling a name took is written with its file prefix (_xlfn.SUM, _xlfn.FALSE()). The journal re-reads *Local params against the workbook as the command found it. storytold#98's UI tests are ported. - Progress docs (storytold#189): localization re-measured (~10% -> ~50% ready). - storytold#57/storytold#159: compare_numbers and MIN() with no arguments use the regional coercion. storytold#148: precedents of ranges ending in a function. storytold#127: the every-line delimiter rule applies to the regional CSV sniffer, whose fallback is the region's list separator. storytold#156: legacy array braces around the localized formula. storytold#149: table.resize writes the names it chooses into the header cells and numbers repeated headers like insert.table. storytold#105: cell-picture strings in all 12 languages. - Restored upstream behaviour: imported ODS/XLSB files are titled "<name> (imported).xlsx"; the import message shows 5 warnings plus a count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #56.
Text boxes were painted and movable, but had no editor. Double-clicking a text box now opens an inline multiline editor with mouse text selection, copy/cut/paste and local text undo. Clicking outside commits one undoable
shape.setTextcommand; Escape discards the draft. Existing and XLSX-imported text boxes use the same path.Save/Save As and sheet/workbook switches commit the draft to its original text box before acting. Worksheet input stays separate, and border dragging/resizing still works. Native macOS Edit menu actions are routed to the focused text editor.
Validation:
core/date.rs:100Clippy finding. Scoped lint checks report existing findings inengine/cmd/file.rs,ui-egui/formula_bar.rsand unchanged portions ofui-egui/grid.rs; no suppressions added.Native desktop interaction could not be qualified in this session: the test window did not present reliably. The interaction and visual evidence above comes from the offscreen UI harness.