feat(sdk): ability to enforce the destination collection to save to and hide...
feat(sdk): ability to enforce the destination collection to save to and hide the collection picker (#49251) * add ability to hide the collection picker * add save options * make sure collectionId is fresh * update sdk question form component * make collectionId accept null * apply saveOptions to sdk components * revert to use initialCollectionId as context name * target the correct collection id * add e2e tests * update e2e tests * move into within * update test * remove collectionId from default args * revert e2e of hide columns * make e2e helper more generic * use saveToCollectionId prop to save to a specific collection * update e2e tests * update comment formatting Co-authored-by:Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev> * clean up leftover changes from an earlier version * readme update * indicate that saveToCollectionId is only applicable to static questions * revert QuestionEditor.isSaveEnabled defaults * update comment format * remove unused initialCollectionId prop * experiment: try to fix failing custom-columns e2e --------- Co-authored-by:
Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Showing
- docs/embedding/sdk/questions.md 13 additions, 12 deletionsdocs/embedding/sdk/questions.md
- e2e/test/scenarios/embedding-sdk/helpers/save-interactive-question-e2e-helpers.ts 79 additions, 0 deletions...ding-sdk/helpers/save-interactive-question-e2e-helpers.ts
- e2e/test/scenarios/embedding-sdk/interactive-question.cy.spec.ts 42 additions, 36 deletions...t/scenarios/embedding-sdk/interactive-question.cy.spec.ts
- enterprise/frontend/src/embedding-sdk/components/private/InteractiveQuestion/components/SdkSaveQuestionForm.tsx 2 additions, 2 deletions...te/InteractiveQuestion/components/SdkSaveQuestionForm.tsx
- enterprise/frontend/src/embedding-sdk/components/private/InteractiveQuestion/context/InteractiveQuestionProvider.tsx 3 additions, 1 deletion...teractiveQuestion/context/InteractiveQuestionProvider.tsx
- enterprise/frontend/src/embedding-sdk/components/private/InteractiveQuestion/context/types.ts 11 additions, 4 deletions...k/components/private/InteractiveQuestion/context/types.ts
- enterprise/frontend/src/embedding-sdk/components/private/InteractiveQuestionResult/InteractiveQuestionResult.tsx 5 additions, 2 deletions...e/InteractiveQuestionResult/InteractiveQuestionResult.tsx
- enterprise/frontend/src/embedding-sdk/components/private/QuestionEditor/QuestionEditor.tsx 3 additions, 1 deletion...-sdk/components/private/QuestionEditor/QuestionEditor.tsx
- enterprise/frontend/src/embedding-sdk/components/public/CreateQuestion/CreateQuestion.tsx 4 additions, 2 deletions...g-sdk/components/public/CreateQuestion/CreateQuestion.tsx
- enterprise/frontend/src/embedding-sdk/components/public/InteractiveQuestion/InteractiveQuestion.stories.tsx 1 addition, 0 deletions...ublic/InteractiveQuestion/InteractiveQuestion.stories.tsx
- enterprise/frontend/src/embedding-sdk/components/public/InteractiveQuestion/InteractiveQuestion.tsx 9 additions, 3 deletions...onents/public/InteractiveQuestion/InteractiveQuestion.tsx
- enterprise/frontend/src/embedding-sdk/components/public/ModifyQuestion/ModifyQuestion.tsx 4 additions, 2 deletions...g-sdk/components/public/ModifyQuestion/ModifyQuestion.tsx
- frontend/src/metabase/components/SaveQuestionForm/SaveQuestionForm.tsx 17 additions, 7 deletions...metabase/components/SaveQuestionForm/SaveQuestionForm.tsx
- frontend/src/metabase/components/SaveQuestionForm/context.tsx 13 additions, 2 deletions...tend/src/metabase/components/SaveQuestionForm/context.tsx
- frontend/src/metabase/components/SaveQuestionForm/types.ts 27 additions, 1 deletionfrontend/src/metabase/components/SaveQuestionForm/types.ts
- frontend/src/metabase/components/SaveQuestionForm/util.ts 42 additions, 21 deletionsfrontend/src/metabase/components/SaveQuestionForm/util.ts
- frontend/src/metabase/containers/SaveQuestionModal/SaveQuestionModal.tsx 2 additions, 0 deletions...tabase/containers/SaveQuestionModal/SaveQuestionModal.tsx
Loading