mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Change 'Clear ... column' menu options to 'Reset', and make resetting columns reset type too
Summary: The renaming is to clarify that the operation is more of a schema change, than a data update. In particular, this is to reduce confusion why it is allowed to anyone having Structure permission in Access Rules. The resetting of type is a separate but related cleanup. Changing type to Any returns the column to initial state, letting it guess type from new data, and making it easy to enter a formula. It applies also to the "Clear and reset" option in the Creator Panel. Test Plan: Updated tests, added a check for type changing to Any. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3685
This commit is contained in:
@@ -19,11 +19,13 @@ export function CellContextMenu(rowOptions: IRowContextMenu, colOptions: IMultiC
|
||||
const disableForReadonlyView = dom.cls('disabled', isReadonly);
|
||||
|
||||
const numCols: number = colOptions.numColumns;
|
||||
const nameClearColumns = colOptions.isFiltered ? t("ClearEntireColumns", {count: numCols}) : t("ClearColumns", {count: numCols})
|
||||
const nameDeleteColumns = t("DeleteColumns", {count: numCols})
|
||||
const nameClearColumns = colOptions.isFiltered ?
|
||||
t("ResetEntireColumns", {count: numCols}) :
|
||||
t("ResetColumns", {count: numCols});
|
||||
const nameDeleteColumns = t("DeleteColumns", {count: numCols});
|
||||
|
||||
const numRows: number = rowOptions.numRows;
|
||||
const nameDeleteRows = t("DeleteRows", {count: numRows})
|
||||
const nameDeleteRows = t("DeleteRows", {count: numRows});
|
||||
|
||||
const nameClearCells = (numRows > 1 || numCols > 1) ? t('ClearValues') : t('ClearCell');
|
||||
|
||||
|
||||
@@ -135,8 +135,8 @@ export function MultiColumnMenu(options: IMultiColumnContextMenu) {
|
||||
const disableForReadonlyView = dom.cls('disabled', options.isReadonly);
|
||||
const num: number = options.numColumns;
|
||||
const nameClearColumns = options.isFiltered ?
|
||||
t('ClearEntireColumns', {count: num}) :
|
||||
t('ClearColumns', {count: num});
|
||||
t('ResetEntireColumns', {count: num}) :
|
||||
t('ResetColumns', {count: num});
|
||||
const nameDeleteColumns = t('DeleteColumns', {count: num});
|
||||
const nameHideColumns = t('HideColumns', {count: num});
|
||||
const frozenMenu = options.disableFrozenMenu ? null : freezeMenuItemCmd(options);
|
||||
|
||||
Reference in New Issue
Block a user