mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
215bb90e68
Summary: - WelcomeQuestions implements the new popup. - Popup shows up on any doc-list page, the first time the user visits one after signing up and setting their name. - Submits responses to the same "New User Questions" doc, which has been changed to accept two new columns (ChoiceList of use_cases, and Text for use_other). - Improve modals on mobile along the way. Test Plan: Added browser tests and tested manually Reviewers: alexmojaki Reviewed By: alexmojaki Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3213
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
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 {
|
|
// A dummy field used only in tests.
|
|
placeholder?: string;
|
|
}
|
|
|
|
// A collection of preferences related to a user or org (or combination).
|
|
export interface UserPrefs extends Prefs {
|
|
// Whether to ask the user to fill out a form about their use-case, on opening the DocMenu page.
|
|
// Set to true on first login, then reset when the form is closed, so that it only shows once.
|
|
showNewUserQuestions?: boolean;
|
|
}
|
|
|
|
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[];
|
|
|
|
// Whether the user should see the onboarding tour of Grist. False by default, since existing
|
|
// users should not see it. New users get this set to true when the user is created. This
|
|
// applies to the personal org only; the tour is currently only shown there.
|
|
showGristTour?: boolean;
|
|
|
|
// List of document IDs where the user has seen and dismissed the document tour.
|
|
seenDocTours?: string[];
|
|
}
|
|
|
|
export type OrgPrefs = Prefs;
|