From 926ab48fde88afeed837e43c2fb8c0d4384a6b0d Mon Sep 17 00:00:00 2001 From: "Adrien Minne (adrm)" Date: Thu, 13 Nov 2025 12:43:00 +0100 Subject: [PATCH 1/5] [REF] subtotal: extract SUBTOTAL tracking to generic plugin This commit extracts the logic that tracks the occurrence of the SUBTOTAL formulas to a more generic plugin named `formula_tracker`. This will be used to track the occurrences of `PIVOT` formulas in a future commit. Task: 4552232 --- .../src/functions/module_math.ts | 5 +- .../o-spreadsheet-engine/src/helpers/misc.ts | 10 ++++ .../src/plugins/core/sheet.ts | 5 ++ .../o-spreadsheet-engine/src/plugins/index.ts | 4 +- .../plugins/ui_core_views/formula_tracker.ts | 52 +++++++++++++++++++ .../plugins/ui_feature/subtotal_evaluation.ts | 42 ++------------- .../o-spreadsheet-engine/src/types/getters.ts | 2 + 7 files changed, 77 insertions(+), 43 deletions(-) create mode 100644 packages/o-spreadsheet-engine/src/plugins/ui_core_views/formula_tracker.ts diff --git a/packages/o-spreadsheet-engine/src/functions/module_math.ts b/packages/o-spreadsheet-engine/src/functions/module_math.ts index 8251086009..d07446e013 100644 --- a/packages/o-spreadsheet-engine/src/functions/module_math.ts +++ b/packages/o-spreadsheet-engine/src/functions/module_math.ts @@ -1,6 +1,5 @@ -import { splitReference } from "../helpers"; +import { doesCellContainFormula, splitReference } from "../helpers"; import { toZone } from "../helpers/zones"; -import { isSubtotalCell } from "../plugins/ui_feature/subtotal_evaluation"; import { _t } from "../translation"; import { EvaluatedCell } from "../types/cells"; import { DivisionByZeroError, EvaluationError } from "../types/errors"; @@ -1410,7 +1409,7 @@ export const SUBTOTAL = { for (let col = left; col <= right; col++) { const cell = this.getters.getCell({ sheetId, col, row }); - if (!cell || !isSubtotalCell(cell)) { + if (!cell || !doesCellContainFormula(cell, "SUBTOTAL")) { evaluatedCellToKeep.push(this.getters.getEvaluatedCell({ sheetId, col, row })); } } diff --git a/packages/o-spreadsheet-engine/src/helpers/misc.ts b/packages/o-spreadsheet-engine/src/helpers/misc.ts index b76d27f6ee..5619528318 100644 --- a/packages/o-spreadsheet-engine/src/helpers/misc.ts +++ b/packages/o-spreadsheet-engine/src/helpers/misc.ts @@ -2,6 +2,7 @@ // Miscellaneous //------------------------------------------------------------------------------ import { FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX, NEWLINE } from "../constants"; +import { Cell } from "../types/cells"; import { ChartStyle } from "../types/chart"; import { SearchOptions } from "../types/find_and_replace"; import { Cloneable, ConsecutiveIndexes, DebouncedFunction, Lazy, Style, UID } from "../types/misc"; @@ -717,3 +718,12 @@ export function chartStyleToCellStyle(style: ChartStyle): Style { align: style.align, }; } + +export function doesCellContainFormula(cell: Cell, formula: string): boolean { + return ( + cell.isFormula && + cell.compiledFormula.tokens.some( + (t) => t.type === "SYMBOL" && t.value.toUpperCase() === formula + ) + ); +} diff --git a/packages/o-spreadsheet-engine/src/plugins/core/sheet.ts b/packages/o-spreadsheet-engine/src/plugins/core/sheet.ts index db6aad77a9..865cc61c08 100644 --- a/packages/o-spreadsheet-engine/src/plugins/core/sheet.ts +++ b/packages/o-spreadsheet-engine/src/plugins/core/sheet.ts @@ -81,6 +81,7 @@ export class SheetPlugin extends CorePlugin implements SheetState { "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders", "getDuplicateSheetName", + "tryGetCellPosition", ] as const; readonly sheetIdsMapName: Record = {}; @@ -430,6 +431,10 @@ export class SheetPlugin extends CorePlugin implements SheetState { return cell; } + tryGetCellPosition(cellId: UID): CellPosition | undefined { + return this.cellPosition[cellId]; + } + getNumberCols(sheetId: UID) { return this.getSheet(sheetId).numberOfCols; } diff --git a/packages/o-spreadsheet-engine/src/plugins/index.ts b/packages/o-spreadsheet-engine/src/plugins/index.ts index 4f94866f6e..2666675f44 100644 --- a/packages/o-spreadsheet-engine/src/plugins/index.ts +++ b/packages/o-spreadsheet-engine/src/plugins/index.ts @@ -27,6 +27,7 @@ import { DynamicTablesPlugin } from "./ui_core_views/dynamic_tables"; import { EvaluationChartPlugin } from "./ui_core_views/evaluation_chart"; import { EvaluationConditionalFormatPlugin } from "./ui_core_views/evaluation_conditional_format"; import { EvaluationDataValidationPlugin } from "./ui_core_views/evaluation_data_validation"; +import { FormulaTrackerPlugin } from "./ui_core_views/formula_tracker"; import { HeaderSizeUIPlugin } from "./ui_core_views/header_sizes_ui"; import { PivotUIPlugin } from "./ui_core_views/pivot_ui"; import { AutofillPlugin } from "./ui_feature/autofill"; @@ -122,4 +123,5 @@ export const coreViewsPluginRegistry = new Registry() .add("dynamic_tables", DynamicTablesPlugin) .add("custom_colors", CustomColorsPlugin) .add("pivot_ui", PivotUIPlugin) - .add("cell_icon", CellIconPlugin); + .add("cell_icon", CellIconPlugin) + .add("formula_tracker", FormulaTrackerPlugin); diff --git a/packages/o-spreadsheet-engine/src/plugins/ui_core_views/formula_tracker.ts b/packages/o-spreadsheet-engine/src/plugins/ui_core_views/formula_tracker.ts new file mode 100644 index 0000000000..4f58886716 --- /dev/null +++ b/packages/o-spreadsheet-engine/src/plugins/ui_core_views/formula_tracker.ts @@ -0,0 +1,52 @@ +import { doesCellContainFormula } from "../../helpers"; +import { Command } from "../../types/commands"; +import { CoreViewPlugin } from "../core_view_plugin"; + +const trackedFormulas = ["SUBTOTAL", "PIVOT"]; + +export class FormulaTrackerPlugin extends CoreViewPlugin { + static getters = ["getCellsWithTrackedFormula"] as const; + + private trackedCells: Record> = {}; + + handle(cmd: Command) { + switch (cmd.type) { + case "START": { + for (const formula of trackedFormulas) { + this.trackedCells[formula] = {}; + } + for (const sheetId of this.getters.getSheetIds()) { + const cells = this.getters.getCells(sheetId); + for (const cellId in cells) { + const cell = cells[cellId]; + for (const formula of trackedFormulas) { + if (doesCellContainFormula(cell, formula)) { + this.history.update("trackedCells", formula, cell.id, true); + } + } + } + } + break; + } + case "UPDATE_CELL": { + if (!("content" in cmd)) return; + const cell = this.getters.getCell(cmd); + if (!cell) return; + for (const formula of trackedFormulas) { + if (doesCellContainFormula(cell, formula)) { + this.history.update("trackedCells", formula, cell.id, true); + } else if (this.trackedCells[formula][cell.id]) { + this.history.update("trackedCells", formula, cell.id, undefined); + } + } + break; + } + } + } + + getCellsWithTrackedFormula(formula: string): string[] { + return Object.keys(this.trackedCells[formula] || {}).filter( + (cellId) => this.trackedCells[formula][cellId] && this.getters.tryGetCellPosition(cellId) + ); + } +} diff --git a/packages/o-spreadsheet-engine/src/plugins/ui_feature/subtotal_evaluation.ts b/packages/o-spreadsheet-engine/src/plugins/ui_feature/subtotal_evaluation.ts index dff4cc2392..01b01c0f2b 100644 --- a/packages/o-spreadsheet-engine/src/plugins/ui_feature/subtotal_evaluation.ts +++ b/packages/o-spreadsheet-engine/src/plugins/ui_feature/subtotal_evaluation.ts @@ -1,48 +1,12 @@ -import { Cell } from "../../types/cells"; import { Command, invalidSubtotalFormulasCommands } from "../../types/commands"; import { UIPlugin } from "../ui_plugin"; export class SubtotalEvaluationPlugin extends UIPlugin { - private subtotalCells: Set = new Set(); - handle(cmd: Command) { - switch (cmd.type) { - case "START": { - this.subtotalCells.clear(); - for (const sheetId of this.getters.getSheetIds()) { - const cells = this.getters.getCells(sheetId); - for (const cellId in cells) { - const cell = cells[cellId]; - if (isSubtotalCell(cell)) { - this.subtotalCells.add(cell.id); - } - } - } - break; - } - case "UPDATE_CELL": { - if (!("content" in cmd)) return; - const cell = this.getters.getCell(cmd); - if (!cell) return; - if (isSubtotalCell(cell)) { - this.subtotalCells.add(cell.id); - } else { - this.subtotalCells.delete(cell.id); - } - break; - } - } if (invalidSubtotalFormulasCommands.has(cmd.type)) { - this.dispatch("EVALUATE_CELLS", { cellIds: Array.from(this.subtotalCells) }); + this.dispatch("EVALUATE_CELLS", { + cellIds: this.getters.getCellsWithTrackedFormula("SUBTOTAL"), + }); } } } - -export function isSubtotalCell(cell: Cell): boolean { - return ( - cell.isFormula && - cell.compiledFormula.tokens.some( - (t) => t.type === "SYMBOL" && t.value.toUpperCase() === "SUBTOTAL" - ) - ); -} diff --git a/packages/o-spreadsheet-engine/src/types/getters.ts b/packages/o-spreadsheet-engine/src/types/getters.ts index dba0248937..fa515c1525 100644 --- a/packages/o-spreadsheet-engine/src/types/getters.ts +++ b/packages/o-spreadsheet-engine/src/types/getters.ts @@ -7,6 +7,7 @@ import { DynamicTablesPlugin } from "../plugins/ui_core_views/dynamic_tables"; import { EvaluationChartPlugin } from "../plugins/ui_core_views/evaluation_chart"; import { EvaluationConditionalFormatPlugin } from "../plugins/ui_core_views/evaluation_conditional_format"; import { EvaluationDataValidationPlugin } from "../plugins/ui_core_views/evaluation_data_validation"; +import { FormulaTrackerPlugin } from "../plugins/ui_core_views/formula_tracker"; import { HeaderSizeUIPlugin } from "../plugins/ui_core_views/header_sizes_ui"; import { PivotUIPlugin } from "../plugins/ui_core_views/pivot_ui"; import { AutofillPlugin } from "../plugins/ui_feature/autofill"; @@ -72,4 +73,5 @@ export type Getters = { PluginGetters & PluginGetters & PluginGetters & + PluginGetters & PluginGetters; From 04ac5432ec6ee9ce4e4a18a33810220448bb35c0 Mon Sep 17 00:00:00 2001 From: "Adrien Minne (adrm)" Date: Fri, 31 Oct 2025 10:57:22 +0100 Subject: [PATCH 2/5] [REF] table style: add `bold` to table style presets Before this commit, the table style presets contained all the style of a table, except the `bold` property, which was handled separately and applied to every total/header row or first/last column. This made the code harder to read with two sources of truth for the style, and with the introduction of pivot table styles, every header row won't be in bold anymore. This commit adds the `bold` property to the table style presets, os it is handled like every other style property. Task: 4552232 --- .../src/helpers/table_helpers.ts | 15 +--- .../src/helpers/table_presets.ts | 86 +++++++++++++------ tests/table/table_helpers.test.ts | 22 ----- tests/test_helpers/constants.ts | 4 + 4 files changed, 67 insertions(+), 60 deletions(-) diff --git a/packages/o-spreadsheet-engine/src/helpers/table_helpers.ts b/packages/o-spreadsheet-engine/src/helpers/table_helpers.ts index ef0669ab28..cde3da42bb 100644 --- a/packages/o-spreadsheet-engine/src/helpers/table_helpers.ts +++ b/packages/o-spreadsheet-engine/src/helpers/table_helpers.ts @@ -173,9 +173,8 @@ function getAllTableStyles( for (const tableElement of TABLE_ELEMENTS_BY_PRIORITY) { const tableElStyle = style[tableElement]; - const bold = isTableElementInBold(tableElement); - if (!tableElStyle && !bold) { + if (!tableElStyle) { continue; } @@ -191,9 +190,6 @@ function getAllTableStyles( ...styles[col][row], ...tableElStyle?.style, }; - if (bold) { - styles[col][row].bold = true; - } } } } @@ -202,15 +198,6 @@ function getAllTableStyles( return styles; } -function isTableElementInBold(tableElement: TableElement) { - return ( - tableElement === "firstColumn" || - tableElement === "lastColumn" || - tableElement === "headerRow" || - tableElement === "totalRow" - ); -} - function getTableElementZones( el: TableElement, tableConfig: TableConfig, diff --git a/packages/o-spreadsheet-engine/src/helpers/table_presets.ts b/packages/o-spreadsheet-engine/src/helpers/table_presets.ts index 7b0ed80279..527ec8eee4 100644 --- a/packages/o-spreadsheet-engine/src/helpers/table_presets.ts +++ b/packages/o-spreadsheet-engine/src/helpers/table_presets.ts @@ -94,9 +94,17 @@ const lightColoredText: TableStyleTemplate = (colorSet) => ({ bottom: { color: colorSet.highlight, style: "thin" }, }, }, - headerRow: { border: { bottom: { color: colorSet.highlight, style: "thin" } } }, - totalRow: { border: { top: { color: colorSet.highlight, style: "thin" } } }, + headerRow: { + border: { bottom: { color: colorSet.highlight, style: "thin" } }, + style: { bold: true }, + }, + totalRow: { + border: { top: { color: colorSet.highlight, style: "thin" } }, + style: { bold: true }, + }, firstRowStripe: { style: { fillColor: colorSet.light } }, + firstColumn: { style: { bold: true } }, + lastColumn: { style: { bold: true } }, }); const lightWithHeader: TableStyleTemplate = (colorSet) => ({ @@ -112,12 +120,17 @@ const lightWithHeader: TableStyleTemplate = (colorSet) => ({ }, }, headerRow: { - style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" }, + style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true }, border: { bottom: { color: colorSet.highlight, style: "thin" } }, }, - totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } }, // @compatibility: should be double line + totalRow: { + border: { top: { color: colorSet.highlight, style: "medium" } }, // @compatibility: should be double line + style: { bold: true }, + }, firstRowStripe: { border: { bottom: { color: colorSet.highlight, style: "thin" } } }, secondRowStripe: { border: { bottom: { color: colorSet.highlight, style: "thin" } } }, + firstColumn: { style: { bold: true } }, + lastColumn: { style: { bold: true } }, }); const lightAllBorders: TableStyleTemplate = (colorSet) => ({ @@ -134,10 +147,18 @@ const lightAllBorders: TableStyleTemplate = (colorSet) => ({ vertical: { color: colorSet.highlight, style: "thin" }, }, }, - headerRow: { border: { bottom: { color: colorSet.highlight, style: "medium" } } }, - totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } }, // @compatibility: should be double line + headerRow: { + border: { bottom: { color: colorSet.highlight, style: "medium" } }, + style: { bold: true }, + }, + totalRow: { + border: { top: { color: colorSet.highlight, style: "medium" } }, // @compatibility: should be double line + style: { bold: true }, + }, firstRowStripe: { style: { fillColor: colorSet.light } }, firstColumnStripe: { style: { fillColor: colorSet.light } }, + firstColumn: { style: { bold: true } }, + lastColumn: { style: { bold: true } }, }); const mediumBandedBorders: TableStyleTemplate = (colorSet) => ({ @@ -153,12 +174,15 @@ const mediumBandedBorders: TableStyleTemplate = (colorSet) => ({ horizontal: { color: colorSet.mediumBorder, style: "thin" }, }, }, - headerRow: { - style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" }, + headerRow: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true } }, + totalRow: { + border: { top: { color: colorSet.highlight, style: "medium" } }, // @compatibility: should be double line + style: { bold: true }, }, - totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } }, // @compatibility: should be double line firstRowStripe: { style: { fillColor: colorSet.light } }, firstColumnStripe: { style: { fillColor: colorSet.light } }, + firstColumn: { style: { bold: true } }, + lastColumn: { style: { bold: true } }, }); const mediumWhiteBorders: TableStyleTemplate = (colorSet) => ({ @@ -174,14 +198,14 @@ const mediumWhiteBorders: TableStyleTemplate = (colorSet) => ({ }, headerRow: { border: { bottom: { color: "#FFFFFF", style: "thick" } }, - style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" }, + style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true }, }, totalRow: { border: { top: { color: "#FFFFFF", style: "thick" } }, - style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" }, + style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true }, }, - firstColumn: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" } }, - lastColumn: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" } }, + firstColumn: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true } }, + lastColumn: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true } }, firstRowStripe: { style: { fillColor: colorSet.medium } }, firstColumnStripe: { style: { fillColor: colorSet.medium } }, }); @@ -196,13 +220,16 @@ const mediumMinimalBorders: TableStyleTemplate = (colorSet) => ({ bottom: { color: "#000000", style: "medium" }, }, }, - totalRow: { border: { top: { color: "#000000", style: "medium" } } }, // @compatibility: should be double line + totalRow: { + border: { top: { color: "#000000", style: "medium" } }, // @compatibility: should be double line + style: { bold: true }, + }, headerRow: { - style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" }, + style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true }, border: { bottom: { color: "#000000", style: "medium" } }, }, - firstColumn: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" } }, - lastColumn: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" } }, + firstColumn: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true } }, + lastColumn: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true } }, firstRowStripe: { style: { fillColor: COLOR_SETS.black.light } }, firstColumnStripe: { style: { fillColor: COLOR_SETS.black.light } }, }); @@ -222,9 +249,15 @@ const mediumAllBorders: TableStyleTemplate = (colorSet) => ({ }, style: { fillColor: colorSet.light }, }, - totalRow: { border: { top: { color: colorSet.highlight, style: "medium" } } }, // @compatibility: should be double line + totalRow: { + border: { top: { color: colorSet.highlight, style: "medium" } }, // @compatibility: should be double line + style: { bold: true }, + }, firstRowStripe: { style: { fillColor: colorSet.medium } }, firstColumnStripe: { style: { fillColor: colorSet.medium } }, + firstColumn: { style: { bold: true } }, + lastColumn: { style: { bold: true } }, + headerRow: { style: { bold: true } }, }); const dark: TableStyleTemplate = (colorSet) => ({ @@ -233,19 +266,19 @@ const dark: TableStyleTemplate = (colorSet) => ({ primaryColor: colorSet.highlight, wholeTable: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" } }, totalRow: { - style: { fillColor: colorSet.dark, textColor: "#FFFFFF" }, + style: { fillColor: colorSet.dark, textColor: "#FFFFFF", bold: true }, border: { top: { color: "#FFFFFF", style: "thick" } }, }, headerRow: { - style: { fillColor: "#000000" }, + style: { fillColor: "#000000", bold: true }, border: { bottom: { color: "#FFFFFF", style: "thick" } }, }, firstColumn: { - style: { fillColor: colorSet.dark }, + style: { fillColor: colorSet.dark, bold: true }, border: { right: { color: "#FFFFFF", style: "thick" } }, }, lastColumn: { - style: { fillColor: colorSet.dark }, + style: { fillColor: colorSet.dark, bold: true }, border: { left: { color: "#FFFFFF", style: "thick" } }, }, firstRowStripe: { style: { fillColor: colorSet.dark } }, @@ -257,10 +290,15 @@ const darkNoBorders: TableStyleTemplate = (colorSet) => ({ templateName: "darkNoBorders", primaryColor: colorSet.highlight, wholeTable: { style: { fillColor: colorSet.light } }, - totalRow: { border: { top: { color: "#000000", style: "medium" } } }, // @compatibility: should be double line - headerRow: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF" } }, + totalRow: { + border: { top: { color: "#000000", style: "medium" } }, // @compatibility: should be double line + style: { bold: true }, + }, + headerRow: { style: { fillColor: colorSet.highlight, textColor: "#FFFFFF", bold: true } }, firstRowStripe: { style: { fillColor: colorSet.medium } }, firstColumnStripe: { style: { fillColor: colorSet.medium } }, + firstColumn: { style: { bold: true } }, + lastColumn: { style: { bold: true } }, }); const darkTemplateInBlack = dark(COLOR_SETS.black); diff --git a/tests/table/table_helpers.test.ts b/tests/table/table_helpers.test.ts index 7a94927f9e..be77c0cca9 100644 --- a/tests/table/table_helpers.test.ts +++ b/tests/table/table_helpers.test.ts @@ -234,28 +234,6 @@ describe("Table cell style", () => { }); }); -describe("Bold highlighted cells", () => { - test("Headers are in bold", () => { - tableConfig.numberOfHeaders = 1; - const computedStyle = getComputedTableStyle(tableConfig, tableStyle, 5, 5); - expect(computedStyle.styles[0][0].bold).toBe(true); - }); - - test("Totals are in bold", () => { - tableConfig.totalRow = true; - const computedStyle = getComputedTableStyle(tableConfig, tableStyle, 5, 5); - expect(computedStyle.styles[0][4].bold).toBe(true); - }); - - test("First/last column are in bold", () => { - tableConfig.firstColumn = true; - tableConfig.lastColumn = true; - const computedStyle = getComputedTableStyle(tableConfig, tableStyle, 5, 5); - expect(computedStyle.styles[0][0].bold).toBe(true); - expect(computedStyle.styles[4][0].bold).toBe(true); - }); -}); - describe("Table cell borders", () => { const border: BorderDescr = { color: "#0f0", style: "thick" }; const allBorders = { top: border, bottom: border, left: border, right: border }; diff --git a/tests/test_helpers/constants.ts b/tests/test_helpers/constants.ts index bb21610be8..decfa7455e 100644 --- a/tests/test_helpers/constants.ts +++ b/tests/test_helpers/constants.ts @@ -577,6 +577,10 @@ export const TABLE_STYLE_ALL_RED: TableStyle = { category: "dark", displayName: "AllRed", wholeTable: { style: { fillColor: "#FF0000" }, border: { top: DEFAULT_BORDER_DESC } }, + firstColumn: { style: { bold: true } }, + lastColumn: { style: { bold: true } }, + headerRow: { style: { bold: true } }, + totalRow: { style: { bold: true } }, templateName: "dark", primaryColor: "#FF0000", }; From 880801daa39203732e2e3b0a02601d5220b2cd5c Mon Sep 17 00:00:00 2001 From: "Adrien Minne (adrm)" Date: Tue, 4 Nov 2025 14:49:28 +0100 Subject: [PATCH 3/5] [IMP] style: add `skipCellGridLines` style option This commit introducing cell animations added an option `skipCellGridLines` to the rendering boxes. The option allows to skip drawing grid lines for specific cells. This commit changes this rendering box option into a standard cell style option, so it can be used in other parts of the codebase as well. Task: 4552232 --- .../o-spreadsheet-engine/src/constants.ts | 1 + .../o-spreadsheet-engine/src/types/misc.ts | 1 + .../src/types/rendering.ts | 1 - src/registries/cell_animation_registry.ts | 12 +++------ src/stores/grid_renderer_store.ts | 2 +- tests/renderer/cell_animations.test.ts | 4 +-- tests/renderer/renderer_store.test.ts | 25 +++++++++++++++++++ 7 files changed, 34 insertions(+), 12 deletions(-) diff --git a/packages/o-spreadsheet-engine/src/constants.ts b/packages/o-spreadsheet-engine/src/constants.ts index 8b5e7b8b5c..cd8cb62b24 100644 --- a/packages/o-spreadsheet-engine/src/constants.ts +++ b/packages/o-spreadsheet-engine/src/constants.ts @@ -179,6 +179,7 @@ export const DEFAULT_STYLE = { fillColor: "", textColor: "", rotation: 0, + hideGridLines: false, } satisfies Required