mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
166143557a
Summary: - The card includes an image, a brief description, and a link to the tutorial. - The left panel includes a link to the tutorial, and a button to reopen card. - Card is collapsed and expanded with a little animation. - Add a seenExamples pref for whether an example has been seen. - Store the pref in localStorage for anon user. Separately, added clearing of prefs of test users between tests, to avoid tests affecting unrelated tests. Test Plan: Added a browser test. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2602
29 lines
861 B
TypeScript
29 lines
861 B
TypeScript
import {StringUnion} from 'app/common/StringUnion';
|
|
|
|
export const SortPref = StringUnion("name", "date");
|
|
export type SortPref = typeof SortPref.type;
|
|
|
|
export const ViewPref = StringUnion("list", "icons");
|
|
export type ViewPref = typeof ViewPref.type;
|
|
|
|
|
|
// A collection of preferences related to a user or org (or combination).
|
|
export interface Prefs {
|
|
// TODO replace this with real preferences.
|
|
placeholder?: string;
|
|
}
|
|
|
|
export type UserPrefs = Prefs;
|
|
|
|
export interface UserOrgPrefs extends Prefs {
|
|
docMenuSort?: SortPref;
|
|
docMenuView?: ViewPref;
|
|
|
|
// List of example docs that the user has seen and dismissed the welcome card for.
|
|
// The numbers are the `id` from IExampleInfo in app/client/ui/ExampleInfo.
|
|
// By living in UserOrgPrefs, this applies only to the examples-containing org.
|
|
seenExamples?: number[];
|
|
}
|
|
|
|
export type OrgPrefs = Prefs;
|