devinit / devinit/ddw-analyst-ui
Force option for either Basic or Advanced Query Builder
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 2
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 7
Description
Currently, under the Query Builder sidebar item we have 2 options: Basic Query Builder and Advanced Query Builder. The Basic Query Builder is soon to be deprecated (not sure when), but before that happens, we have to drive up the usage of it's replacement. Simply asking people to use the Advanced QB hasn't yielded results, so we're going to force the choice.
- [x] Remove the multiple option dropdown for the Query Builder and simply have the Query Builder item.
- [x] On clicking Query Builder, show a modal that offers the option `Basic` or `Advanced` with the Advanced selected by default.
- [x] For each option selected in the modal above, show some info about each one (to be decided later - just show a description that makes sense for now)
- [x] Naturally, depending on the selected option, you get redirected to the matching QB
To not make things difficult for our users, we're going to need to give them the option to choose a default QB i.e. a `remember my choice` kind of thing.
- [x] Add a `preference` app & in its models.py file, add a `Preference` model that inherits from `BaseEntity`
- [x] Add the field `preferences` to the `Preference` model, a `JSONField` - give it the default value (from a variable) `{"queryBuilder": "advanced"}`
- [x] Add the field `global` to the `Preference` model - a boolean field - give it a default value False - this naturally separates global preferences from user preferences. Make sure that in the Django admin, we can filter Preferences by this global field
- [x] Create an API endpoint for retrieving a user's preferences. Return both the global & user preferences (if any - default `{}`) - return object in format `{ global: {}, user: {} }`
- [x] On the same view for retrieving, add one for updating preferences - naturally takes in a JSON object of the update preferences
- [x] On the FE, fetch these preferences on user login and save them in the local storage
- [x] When user clicks on Query Builder, check user preferences for preferred query builder - if none, show them the choice modal
- [x] Add a checkbox in the choice modal for `Remember my choice` - when checked, update user preferences with the selected option i.e `basic` or `advanced`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.