mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) hide long sequences of unchanged rows in diffs
Summary: It can be hard to find changes, even when highlighted, in a table with many rows. This diff replaces long sequences of unchanged rows with a row containing "..."s. With daff, I found that it is important to do this for sequences of unchanged columns also, but not tackling that yet. Test Plan: added test Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2666
This commit is contained in:
@@ -100,6 +100,15 @@ export class PendingValue {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A trivial placeholder for a value that won't be shown.
|
||||
*/
|
||||
export class SkipValue {
|
||||
public toString() {
|
||||
return '...';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Produces a Grist-encoded version of the value, e.g. turning a Date into ['d', timestamp].
|
||||
* Returns ['U', repr(value)] if it fails to encode otherwise.
|
||||
@@ -162,6 +171,7 @@ export function decodeObject(value: CellValue): unknown {
|
||||
case 'O': return mapValues(args[0] as {[key: string]: CellValue}, decodeObject, {sort: true});
|
||||
case 'P': return new PendingValue();
|
||||
case 'R': return new Reference(String(args[0]), args[1]);
|
||||
case 'S': return new SkipValue();
|
||||
case 'U': return new UnknownValue(args[0]);
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user