mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Improve snapshot listing, and add compare snapshot links
Summary: - When viewing a snapshot, list all snapshots for a doc, highlighting the current one. - Include links in per-snapshot menu to compare-to-current and compare-to-previous. - Compare links include "beta" tags. - Set order of comparison to have older on the left, and newer on the right. Test Plan: Moved out DocHistory test from Snapshots, and added some test cases. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2681
This commit is contained in:
@@ -255,6 +255,10 @@ export function menuItemCmd(cmd: Command, label: string, ...args: DomElementArg[
|
||||
);
|
||||
}
|
||||
|
||||
export function menuAnnotate(text: string) {
|
||||
return cssAnnotateMenuItem('Beta');
|
||||
}
|
||||
|
||||
export const menuDivider = styled(weasel.cssMenuDivider, `
|
||||
margin: 8px 0;
|
||||
`);
|
||||
@@ -374,3 +378,17 @@ const cssCmdKey = styled('span', `
|
||||
color: ${colors.slate};
|
||||
margin-right: -12px;
|
||||
`);
|
||||
|
||||
const cssAnnotateMenuItem = styled('span', `
|
||||
color: ${colors.lightGreen};
|
||||
text-transform: uppercase;
|
||||
font-size: 8px;
|
||||
vertical-align: super;
|
||||
margin-top: -4px;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
|
||||
.${weasel.cssMenuItem.className}-sel > & {
|
||||
color: white;
|
||||
}
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user