(core) Replace questionnaire for new users with a popup asking for just their primary use-case.

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
This commit is contained in:
Dmitry S
2022-01-13 21:55:55 -05:00
parent ba6ecc5e9e
commit 215bb90e68
19 changed files with 335 additions and 47 deletions

View File

@@ -6,14 +6,18 @@ 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.
// A dummy field used only in tests.
placeholder?: string;
}
export type UserPrefs = Prefs;
// 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;