feat(sdk): revamp CreateQuestion and create question behaviour (#50088)
* revamp the create question component * docs updates * add stories and update styles * prevent switching to visualization when it is not ready * ensure CreateQuestion works in flex parents * add basic e2e tests for CreateQuestion * ensure that switching between editor and visualization works * use the save button for the disabled state * update the question title when the question is saved * implement updating questions in place * rename replaceQuestion * make CreateQuestion props all optional * add background color to modal header * hide the save button if question is dirty * hide save button instead of disabling per design feedback * update e2e tests * revert e2e helpers * add title update assertions * whitespace changes
Showing
- docs/embedding/sdk/questions.md 5 additions, 1 deletiondocs/embedding/sdk/questions.md
- e2e/test/scenarios/embedding-sdk/create-question.cy.spec.ts 77 additions, 0 deletionse2e/test/scenarios/embedding-sdk/create-question.cy.spec.ts
- enterprise/frontend/src/embedding-sdk/components/private/InteractiveQuestion/components/SaveButton.tsx 5 additions, 5 deletions...nts/private/InteractiveQuestion/components/SaveButton.tsx
- enterprise/frontend/src/embedding-sdk/components/private/InteractiveQuestion/context/InteractiveQuestionProvider.tsx 8 additions, 3 deletions...teractiveQuestion/context/InteractiveQuestionProvider.tsx
- enterprise/frontend/src/embedding-sdk/components/private/QuestionEditor/QuestionEditor.tsx 1 addition, 0 deletions...-sdk/components/private/QuestionEditor/QuestionEditor.tsx
- enterprise/frontend/src/embedding-sdk/components/public/CreateQuestion/CreateQuestion.stories.tsx 30 additions, 0 deletions...mponents/public/CreateQuestion/CreateQuestion.stories.tsx
- enterprise/frontend/src/embedding-sdk/components/public/CreateQuestion/CreateQuestion.tsx 110 additions, 18 deletions...g-sdk/components/public/CreateQuestion/CreateQuestion.tsx
- enterprise/frontend/src/embedding-sdk/hooks/private/use-load-question.ts 11 additions, 3 deletions...tend/src/embedding-sdk/hooks/private/use-load-question.ts
- enterprise/frontend/src/embedding-sdk/types/question.ts 1 addition, 0 deletionsenterprise/frontend/src/embedding-sdk/types/question.ts
- frontend/src/metabase/query_builder/containers/use-create-question.ts 2 additions, 0 deletions.../metabase/query_builder/containers/use-create-question.ts
- frontend/src/metabase/ui/components/overlays/Modal/Modal.styled.tsx 3 additions, 0 deletions...rc/metabase/ui/components/overlays/Modal/Modal.styled.tsx
Loading