Ask Save or Don't save, and show useful status facts
Phase 5-7. - A changed tab asks Save, Don't save, or Cancel through the native dialog, instead of OK and Cancel to discard. - The conflict banner uses --rs-warn with a warning icon. Keep my edits is the primary choice and comes first. Use disk version comes last, in the error color. The banner wraps in a narrow pane. - The status bar shows the save state, the line and column, the word count, the line endings, and the view. It shows the watch mode only when it polls a network folder. - The outline and the document facts follow the active tab. A tab without a document has no outline and no document facts. - Tables: only formula cells have a hover hint, so no hint covers the next cell. The table adds no gap above its control area. The add controls show while a cell has focus. - The plugin review marks Install and enable as the primary action. The other choice is Install, keep disabled. - Read follows CommonMark soft breaks. Settings, General, Keep line breaks shows each source line break. The table preview and cell editors of Write keep their line breaks, because their editing depends on them. - Catalog rows in French, Japanese, and Simplified Chinese. - Docs: UI-053, the user guide, and plugins.md. Tests: the new layout/plainFixes, the keepLineBreaks cases in the settings unit tests, and the new install button name.
This commit is contained in:
@@ -92,7 +92,9 @@ export function tableControls(root: HTMLElement, view: EditorView, initialSource
|
||||
for (const row of table!.rows) for (const cell of row.cells) {
|
||||
const result = results[row.rowIndex]?.[cell.cellIndex];
|
||||
const address = formulas.cellAddress(row.rowIndex, cell.cellIndex);
|
||||
cell.dataset.cellHint = `${address}${result?.formula ? ` · ${result.formula}` : ""}`;
|
||||
// Only a formula cell has a hover hint. The footer shows the address of each cell, so no hint covers the next cell.
|
||||
if (result?.formula) cell.dataset.cellHint = `${address} · ${result.formula}`;
|
||||
else delete cell.dataset.cellHint;
|
||||
cell.removeAttribute("title");
|
||||
if (result && cell !== active) cell.innerHTML = formulas.tableFormulaHtml(result);
|
||||
if (cell === active) {
|
||||
@@ -453,6 +455,6 @@ export function tableControls(root: HTMLElement, view: EditorView, initialSource
|
||||
});
|
||||
refreshFormulas();
|
||||
for (const row of table.rows) for (const cell of row.cells) {
|
||||
tooltipCleanup.push(attachTooltip(cell, () => cell.dataset.cellHint || cell.getAttribute("aria-label") || ""));
|
||||
tooltipCleanup.push(attachTooltip(cell, () => cell.dataset.cellHint || ""));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user