mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Making cells colors effective also in Card and Card List views
Summary: . Makes cell color work well in comparison mode . Do not apply cell color to the add new row . Allow to change color for all widget (including changing color for the checkbox and the switch widget) . Fix an issue that was setting color to black when opening the picker . Do not apply color to invalid cell Test Plan: . Added nbrowser/CellColor Reviewers: paulfitz, dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2720
This commit is contained in:
@@ -2,6 +2,7 @@ import { DataRowModel } from 'app/client/models/DataRowModel';
|
||||
import { NewAbstractWidget } from 'app/client/widgets/NewAbstractWidget';
|
||||
import { CellValue } from 'app/common/DocActions';
|
||||
import { isVersions } from 'app/common/gristTypes';
|
||||
import { inlineStyle } from 'app/common/gutil';
|
||||
import { BaseFormatter } from 'app/common/ValueFormatter';
|
||||
import { Diff, DIFF_DELETE, DIFF_INSERT, diff_match_patch as DiffMatchPatch, DIFF_EQUAL } from 'diff-match-patch';
|
||||
import { Computed, dom } from 'grainjs';
|
||||
@@ -37,6 +38,8 @@ export class DiffBox extends NewAbstractWidget {
|
||||
dom.autoDispose(formattedValue),
|
||||
dom.style('text-align', this.options.prop('alignment')),
|
||||
dom.cls('text_wrapping', (use) => Boolean(use(this.options.prop('wrap')))),
|
||||
inlineStyle('--grist-diff-color', '#000000'),
|
||||
inlineStyle('--grist-diff-background-color', '#00000000'),
|
||||
dom.forEach(formattedValue, ([code, txt]) => {
|
||||
if (code === DIFF_DELETE) {
|
||||
return dom("span.diff-parent", txt);
|
||||
|
||||
Reference in New Issue
Block a user