-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sql lab): Save Dataset Modal Autocomplete should display list when overwritting #20512
Conversation
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
Outdated
Show resolved
Hide resolved
d630d76
to
40923fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Left some comments
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
Outdated
Show resolved
Hide resolved
@@ -139,7 +143,7 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({ | |||
const handleOverwriteDataset = async () => { | |||
await updateDataset( | |||
query.dbId, | |||
datasetToOverwrite.datasetId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lower camel case naming makes sense, curious about the reason for the change here is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This custom prop gets into the DOM so react throws a warning for invalid format. That's why it was changed to all lowercase.
40923fb
to
c91a92b
Compare
* Customize who the container node is. | ||
* Parent node by default. | ||
*/ | ||
getPopupContainer?: (triggerNode?: any) => any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the return should be HTMLElement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I had it like that, but SelectFilterPlugin
is also customizing such prop and I didn't want to impact other non-related component.
f92a68e
to
2be6dc1
Compare
Codecov Report
@@ Coverage Diff @@
## master #20512 +/- ##
=======================================
Coverage 66.79% 66.79%
=======================================
Files 1754 1754
Lines 65561 65557 -4
Branches 6933 6933
=======================================
- Hits 43793 43791 -2
+ Misses 20014 20011 -3
- Partials 1754 1755 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
2be6dc1
to
bfddc93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just needs a rebase, and I'll happily merge :) |
3f99091
to
82351b9
Compare
/testenv up |
@jinghua-qa Ephemeral environment spinning up at http://54.212.127.246:8080. Credentials are |
- Use our Select component as substitute of the Autocomplete one so options are loaded initially without the user having to trigger a search and we are mosre consistent with the rest of the app - Changing datasetId to lowercase so when custom props get into the DOM we don't get warning related to invalid formatting - We extracted the dropdown out of the radio because it causes invalid click handling when an option is selected - Updated tests
- Update missing test for DatasourceControl
- Remove conditional from load options function since only guest users dont have userId, and if that is the case they wont reach this part of the application
- Remove unused comment
- Add getPopupContainer as prop for Select component
- Add tests for our new getPopupContainer prop in Select component. So if passed it gets called.
- use lowercased property when calling post form data
- Update tests so there is no need to define a null returning func
82351b9
to
ada7231
Compare
- Including getPopupContainer from PickedSelectProps instead - Updating definition in SelectFilterPlugin
Ephemeral environment shutdown and build artifacts deleted. |
…list when overwritting (apache#20512)" This reverts commit 8a57a71.
…n overwritting (apache#20512) * Save Dataset Modal: - Use our Select component as substitute of the Autocomplete one so options are loaded initially without the user having to trigger a search and we are mosre consistent with the rest of the app - Changing datasetId to lowercase so when custom props get into the DOM we don't get warning related to invalid formatting - We extracted the dropdown out of the radio because it causes invalid click handling when an option is selected - Updated tests * Save Dataset Modal: - Update missing test for DatasourceControl * Save Dataset Modal: - Remove conditional from load options function since only guest users dont have userId, and if that is the case they wont reach this part of the application * Save Dataset Modal: - Remove unused comment * Save Dataset Modal: - Add getPopupContainer as prop for Select component * Save Dataset Modal: - Add tests for our new getPopupContainer prop in Select component. So if passed it gets called. * Save Dataset Modal: - use lowercased property when calling post form data * Save Dataset Modal: - Update tests so there is no need to define a null returning func * Save Dataset Modal: - Including getPopupContainer from PickedSelectProps instead - Updating definition in SelectFilterPlugin
SUMMARY
datasetId
to lowercase so when custom props get into the DOM we don't get warning related to invalid formattingBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION