Skip to content
Sheetwrite

Releases

Sheetwrite 0.7.2

One design system for every control, redesigned dialogs and Find & Replace, skeletons and loading states for slow devices, plain-value engine helpers, and the upgrade checklist for Sheetwrite 0.7.2.

Edit on GitHubReport a problem

On this page
npm install @sheetwrite/core@0.7.2
Update each adapter and add-on you use to 0.7.2 too: all packages release together.

Sheetwrite 0.7.2 puts every control on one design system, redesigns the dialogs and the find bar, and shows something useful from the first byte to the first frame on a slow device. No API changes break existing code. Two visual changes can affect custom styles: some CSS class names changed, and the default accent colour is now Sheetwrite green. The upgrade checklist lists both. All ten packages release as 0.7.2.

Sheetwrite 0.7.2 at a glanceDialogs: 1 layout. Scrim, header and one primary button; new Keyboard shortcuts Find & Replace: Icons. Match count in the field, Find all in a table Skeletons: 94 s → 2 s. Blank time of a 1 MB XLSX import at 6× CPU slowdown CSS tokens: py · px · accent. A few inputs size and colour every controlDialogs1 layoutScrim, header and one primarybutton; new Keyboard shortcutsFind & ReplaceIconsMatch count in the field,Find all in a tableSkeletons94 s → 2 sBlank time of a 1 MB XLSXimport at 6× CPU slowdownCSS tokenspy · px · accentA few inputs size andcolour every control
Sheetwrite 0.7.2 at a glanceDialogs: 1 layout. Scrim, header and one primary button; new Keyboard shortcuts Find & Replace: Icons. Match count in the field, Find all in a table Skeletons: 94 s → 2 s. Blank time of a 1 MB XLSX import at 6× CPU slowdown CSS tokens: py · px · accent. A few inputs size and colour every controlDialogs1 layoutScrim, header and one primarybutton; new Keyboard shortcutsFind & ReplaceIconsMatch count in the field,Find all in a tableSkeletons94 s → 2 sBlank time of a 1 MB XLSXimport at 6× CPU slowdownCSS tokenspy · px · accentA few inputs size andcolour every control

Highlights

  • Dialogs on one layout. Every dialog has a scrim, a header with a close button, a body that scrolls and one primary button. Keyboard shortcuts and Format Cells are redesigned.
  • A redesigned Find & Replace bar. Icon buttons with tooltips, the match count in the search field, and Find all results in a table.
  • No blank screen on slow devices. On a 6× CPU slowdown, the React showcase shows no blank frame instead of about 5.6 s of one, and a 1 MB XLSX import shows about 2 s of blank instead of about 94 s.
  • One set of CSS tokens. A few inputs, such as the padding, the font size, the corner radius and the colours, size and colour every control. Theme has a new accent.
  • Plain-value engine helpers. Write cells and convert formulas with one string per cell or formula, without packing buffers.

Changes

Dialogs

Every dialog shares one modal layout in both themes: a scrim that dims the page, a header with the title and a close button, a body that scrolls, and a row of buttons with one primary action. Controls are 32 px tall, 44 px on touch screens. On a phone, a dialog fills the screen.

  • Keyboard shortcuts. The table fills the dialog under a sticky header. Each binding is one chip, and its remove button shows on hover or focus. On a phone, each command is stacked.
  • Format Cells. The Number tab is laid out as Excel's: the Category list beside a Sample and the category's settings. The new Special category has Zip Code, Zip Code + 4, Phone Number and Social Security Number. The tabs share one height, so switching tabs doesn't jump.
  • Merge warning. It lists the values a merge would discard, one per line, with a Merge button.
  • Data validation alert. When a rule has no message of its own, the alert shows Excel's default text, then what the rule allows, with its bounds in the cell's number format.
  • Paste Special, Data Validation, and the Insert and Delete choices use the same fields, tabs, lists and button rows.

See Keyboard shortcuts, the Format Cells dialog and the Data Validation dialog.

Find & Replace

The search field shows its match count inside it. Previous, Next, Find all, Replace, Options and Close are icon buttons with tooltips, and Replace and Options are toggles. The replace field lines up with the search field and stays hidden until you press Ctrl+H or turn on Replace. Use Ctrl+H on a Mac too, as Excel for Mac does: Cmd+H hides the browser. Find all results are a table with a sticky header, without a Formula column when no match has a formula. The new findPrevious, findNext, findAll, replace and close icons can be replaced through config.icons.

See Options and Find All in the find bar.

Skeletons and loading states

A slow device no longer shows an empty box between the engine loading and the grid painting:

  • The React, Vue and Svelte fallback stays over the host until the grid paints its first frame, then fades out (at once under prefers-reduced-motion).
  • Without a fallback, the adapters show a built-in skeleton of the column headers, row headers and grid lines at the grid's own sizes. To turn it off, pass skeleton={false} in React and Svelte, or :skeleton="false" in Vue. A page without a framework calls renderGridSkeleton(host, options) before initSheetwrite.
  • A chart shows a static chart shape until it draws, a panel that loads later shows a skeleton body, and opening a large workbook shows an "Opening workbook…" status.

Measured with the CPU slowed 6×:

Case0.7.10.7.2
React showcase, time with a blank screenabout 5.6 snone
Importing a 1 MB XLSX file, time with a blank screenabout 94 sabout 2 s

Cells that are still loading paint a static bar in the new --sheetwrite-skeleton colour instead of #LOADING! text, without animating the canvas. Screen readers read them as "Loading", and the grid and the adapter host carry aria-busy="true" while they wait. getCell, copy and export are unchanged. Dense datasource storage shows the same bars. The new loading-change event, { sheet, waiting }, tells you when the rows on screen start or stop waiting on getRows: React onLoadingChange, Vue @loading-change and Svelte onLoadingChange.

See Loading states and skeletons and Show a skeleton while it loads.

CSS tokens and Theme.accent

Every size and colour in the stylesheet now comes from a few inputs in the new styles/tokens.css: the padding (--sheetwrite-py, --sheetwrite-px), the font size, the corner radius policy, the smallest touch and mouse targets, and the base colours. Spacing, control heights, radii, focus rings, hover colours and shadows are derived from them, so one input changes every control, menu, dialog and panel it reaches. grid.css imports the new files, so your imports stay the same.

The ribbon, toolbar, formula bar, name box, sheet tabs, menus, dropdowns, pickers, dashboards, charts, notes and input messages are built on the same shared controls. Toolbars and menus use dense rows: 24 px, 44 px on touch screens.

Theme has a new accent field (CSS --sheetwrite-accent) for primary buttons, checked boxes, pressed toggles, focus rings and the active ribbon tab. It defaults to Sheetwrite green, #00744f (#3edc9b in the dark theme). Text on the accent is whichever of the theme's text and background colours contrasts more with it.

Roomier controls with a blue accent
.my-app .sheetwrite {
--sheetwrite-py: 0.65em;
--sheetwrite-px: 1em;
--sheetwrite-accent: #1f6fd1;
}

See Theming and CSS tokens.

Engine helpers

The engine and formula packages export functions that take plain values and pack the buffers the raw CellStore methods and formula functions take: setSparseCells, setBlockCells, setColumnBlockCells, formulasToXlsx, formulasFromXlsx, arrayFormulaIndices and packTexts. The raw methods stay.

Before, you joined the formulas, worked out where each one ends in UTF-16 units and passed a buffer for the results to convertXlsxFormulas. Now you pass the formulas:

Spell formulas for XLSX in one call
import { createEngine, formulasToXlsx } from "@sheetwrite/wasm";
const engine = await createEngine();
// ["=_xlfn.CONCAT(A1, B1)"]
export const saved = formulasToXlsx(engine, ["=CONCAT(A1, B1)"]);
engine.retire();

See Call the engine directly.

Docs

The sitemap dates each page by its last real change, and the docs site uses the same tokens as the grid.

Deprecations

--sheetwrite-tab-font, --sheetwrite-tab-hover-bg and --sheetwrite-tab-active-bg are deprecated and are removed in 0.8.0. They still override when you set them. The tab bar's hover and selected colours are now derived from --sheetwrite-tab-bg, --sheetwrite-tab-fg, --sheetwrite-tab-border and --sheetwrite-tab-active-fg, and its text from the widget font.

Upgrade checklist

  1. EveryoneRequired

    Update every package together

    Install 0.7.2 for each @sheetwrite/* package that you use. Packages from different versions are not supported together. No API changes break your code; if you style built-in controls by class name or set headerFg, check the next two steps.

    corewasmformulasformula-assistqueriesxlsxchartsreactvuesvelte

  2. If you style built-in controls by class nameCheck

    Check the renamed classes and attributes

    .sheetwrite-ribbon-icon and .sheetwrite-tab-icon and .sheetwrite-tab-menu-icon are now .sheetwrite-icon-slot; .sheetwrite-ribbon-label is .sheetwrite-label; .sheetwrite-ribbon-caret is .sheetwrite-chevron; .sheetwrite-command-toolbar-separator is .sheetwrite-separator. A selected chart has data-selected instead of the sheetwrite-object-selected class, and a slicer value no row has is data-empty instead of data-no-data. Formula help reads --sheetwrite-surface, --sheetwrite-ink and --sheetwrite-line instead of --sheetwrite-assist-*. The context menu hooks stay.

  3. If you set headerFg but not accentCheck

    Set accent to keep your accent colour

    Primary buttons, checked boxes and focus rings used headerFg before and are now Sheetwrite green. Set accent in your theme to keep the old colour.

  4. If you upgrade from 0.6.xAlso do

    Complete the 0.7.0 steps first

    Read the 0.7.0 upgrade guide.