-
- Downloads
[metabase-lib] Refactor SaveQuestionModal and friends to Question
These previously passed around `Card`s, now they use `Question`. The main changes are in `QueryBuilder`'s `handleSave`/`handleCreate`, and `SaveQuestionModal`. This also pulls a bunch of logic from `queries/utils/description` that depends on the internals on `Question.datasetQuery().query` (ie. the MBQL) into (mostly private) methods on `Question`. The tests for `description` were moved into `Question.unit.spec.js`.
Showing
- e2e/test/scenarios/models/create.cy.spec.js 0 additions, 2 deletionse2e/test/scenarios/models/create.cy.spec.js
- frontend/src/metabase-lib/Mode/utils.ts 1 addition, 1 deletionfrontend/src/metabase-lib/Mode/utils.ts
- frontend/src/metabase-lib/Question.ts 224 additions, 0 deletionsfrontend/src/metabase-lib/Question.ts
- frontend/src/metabase-lib/queries/utils/description.js 2 additions, 217 deletionsfrontend/src/metabase-lib/queries/utils/description.js
- frontend/src/metabase/containers/SaveQuestionModal.jsx 40 additions, 53 deletionsfrontend/src/metabase/containers/SaveQuestionModal.jsx
- frontend/src/metabase/query_builder/actions/core/core.js 5 additions, 4 deletionsfrontend/src/metabase/query_builder/actions/core/core.js
- frontend/src/metabase/query_builder/actions/core/initializeQB.ts 1 addition, 1 deletion...d/src/metabase/query_builder/actions/core/initializeQB.ts
- frontend/src/metabase/query_builder/actions/navigation.js 4 additions, 11 deletionsfrontend/src/metabase/query_builder/actions/navigation.js
- frontend/src/metabase/query_builder/actions/querying.js 1 addition, 3 deletionsfrontend/src/metabase/query_builder/actions/querying.js
- frontend/src/metabase/query_builder/components/AlertModals.jsx 2 additions, 2 deletions...end/src/metabase/query_builder/components/AlertModals.jsx
- frontend/src/metabase/query_builder/components/DatasetEditor/DatasetEditor.jsx 1 addition, 1 deletion.../query_builder/components/DatasetEditor/DatasetEditor.jsx
- frontend/src/metabase/query_builder/components/QueryModals.jsx 30 additions, 29 deletions...end/src/metabase/query_builder/components/QueryModals.jsx
- frontend/src/metabase/query_builder/components/view/View.jsx 3 additions, 4 deletionsfrontend/src/metabase/query_builder/components/view/View.jsx
- frontend/src/metabase/query_builder/components/view/ViewHeader.jsx 1 addition, 1 deletion...src/metabase/query_builder/components/view/ViewHeader.jsx
- frontend/src/metabase/query_builder/components/view/sidebars/QuestionInfoSidebar.tsx 3 additions, 5 deletions..._builder/components/view/sidebars/QuestionInfoSidebar.tsx
- frontend/src/metabase/query_builder/containers/QueryBuilder.jsx 8 additions, 21 deletions...nd/src/metabase/query_builder/containers/QueryBuilder.jsx
- frontend/test/metabase-lib/lib/Dimension.unit.spec.js 5 additions, 4 deletionsfrontend/test/metabase-lib/lib/Dimension.unit.spec.js
- frontend/test/metabase-lib/lib/Question.unit.spec.js 78 additions, 0 deletionsfrontend/test/metabase-lib/lib/Question.unit.spec.js
- frontend/test/metabase-lib/lib/queries/StructuredQuery-nesting.unit.spec.js 1 addition, 3 deletions...base-lib/lib/queries/StructuredQuery-nesting.unit.spec.js
- frontend/test/metabase/containers/SaveQuestionModal.unit.spec.js 89 additions, 60 deletions...d/test/metabase/containers/SaveQuestionModal.unit.spec.js
Loading
Please register or sign in to comment