You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/06 01:21:43 UTC
[GitHub] [superset] diegomedina248 opened a new pull request, #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
diegomedina248 opened a new pull request, #19967:
URL: https://github.com/apache/superset/pull/19967
### SUMMARY
The database connection modal fires a callback when a db is successfully connected.
The problem is, the database list cannot listen to that callback when the modal is displayed/shown outside of the container.
This PR enables that functionality via query params, so that the database list can be notified and refreshed.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
https://user-images.githubusercontent.com/17252075/167051414-66692bdf-5035-445e-bf54-bca263a71c15.mov
After:
https://user-images.githubusercontent.com/17252075/167051400-c73503c1-2306-4f44-9354-220f89a0f157.mov
### TESTING INSTRUCTIONS
Go to the dashboard list and connect a new database from the top "plus button" menu.
Ensure you can see the newly connected database without refreshing the page.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] diegomedina248 commented on a diff in pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on code in PR #19967:
URL: https://github.com/apache/superset/pull/19967#discussion_r889132238
##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -503,7 +503,6 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
setImportingModal(false);
setPasswords({});
setConfirmedOverwrite(false);
- if (onDatabaseAdd) onDatabaseAdd();
Review Comment:
Yeah, sure.
Calling `onDatabaseAdd` in the `onClose` causes the callback to be fired when it shouldn't.
The `onClose` is called, for instance, if you hit in the overlay.
That causes (in master) the following:
https://user-images.githubusercontent.com/17252075/171906617-319a39e7-647c-418d-bae6-8027a6e805fe.mov
The only places that should be called is when a change was actually made (which was done already in almost all places, causing a double fetch/rerender).
The only place that uses this function is `DatabaseList`, which only does a refresh.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] stephenLYZ merged pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
stephenLYZ merged PR #19967:
URL: https://github.com/apache/superset/pull/19967
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] diegomedina248 closed pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
diegomedina248 closed pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
URL: https://github.com/apache/superset/pull/19967
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] diegomedina248 closed pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
diegomedina248 closed pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
URL: https://github.com/apache/superset/pull/19967
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #19967:
URL: https://github.com/apache/superset/pull/19967#issuecomment-1146179331
Ephemeral environment shutdown and build artifacts deleted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] AAfghahi commented on a diff in pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
AAfghahi commented on code in PR #19967:
URL: https://github.com/apache/superset/pull/19967#discussion_r894865510
##########
superset-frontend/src/views/components/MenuRight.tsx:
##########
@@ -94,6 +96,10 @@ const RightMenu = ({
state => state.dashboardInfo?.id,
);
+ const [, setQuery] = useQueryParams({
Review Comment:
oh this is interesting, I hadn't seen this before. Does this bypass the variable and only create the function?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #19967:
URL: https://github.com/apache/superset/pull/19967#issuecomment-1143549299
@stephenLYZ Ephemeral environment spinning up at http://34.220.151.120:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] stephenLYZ commented on pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on PR #19967:
URL: https://github.com/apache/superset/pull/19967#issuecomment-1143546814
/testenv up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] diegomedina248 commented on a diff in pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on code in PR #19967:
URL: https://github.com/apache/superset/pull/19967#discussion_r894871532
##########
superset-frontend/src/views/components/MenuRight.tsx:
##########
@@ -94,6 +96,10 @@ const RightMenu = ({
state => state.dashboardInfo?.id,
);
+ const [, setQuery] = useQueryParams({
Review Comment:
no, this just ignores the value in the first position, but the function returns the whole thing.
Just a nice syntax sugar thing when destructuring
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #19967:
URL: https://github.com/apache/superset/pull/19967#issuecomment-1119200130
# [Codecov](https://codecov.io/gh/apache/superset/pull/19967?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19967](https://codecov.io/gh/apache/superset/pull/19967?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b8acb2c) into [master](https://codecov.io/gh/apache/superset/commit/fdf48c63f1220607b9390104b04ba1d9fae7bfcf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fdf48c6) will **increase** coverage by `0.00%`.
> The diff coverage is `57.14%`.
```diff
@@ Coverage Diff @@
## master #19967 +/- ##
=======================================
Coverage 66.54% 66.54%
=======================================
Files 1714 1714
Lines 65102 65101 -1
Branches 6725 6731 +6
=======================================
Hits 43321 43321
+ Misses 20069 20068 -1
Partials 1712 1712
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.26% <57.14%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/19967?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...c/views/CRUD/data/database/DatabaseModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL2luZGV4LnRzeA==) | `32.60% <ø> (+0.08%)` | :arrow_up: |
| [...tend/src/views/CRUD/data/database/DatabaseList.tsx](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZUxpc3QudHN4) | `67.70% <40.00%> (-1.53%)` | :arrow_down: |
| [...perset-frontend/src/views/components/MenuRight.tsx](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2NvbXBvbmVudHMvTWVudVJpZ2h0LnRzeA==) | `61.45% <100.00%> (+0.82%)` | :arrow_up: |
| [...tend/src/visualizations/FilterBox/controlPanel.jsx](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL0ZpbHRlckJveC9jb250cm9sUGFuZWwuanN4) | `0.00% <0.00%> (-37.50%)` | :arrow_down: |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `63.15% <0.00%> (-8.28%)` | :arrow_down: |
| [...nts/ExploreAdditionalActionsMenu/ExploreReport.tsx](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlQWRkaXRpb25hbEFjdGlvbnNNZW51L0V4cGxvcmVSZXBvcnQudHN4) | `50.00% <0.00%> (-7.90%)` | :arrow_down: |
| [superset-frontend/src/reports/actions/reports.js](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3JlcG9ydHMvYWN0aW9ucy9yZXBvcnRzLmpz) | `36.36% <0.00%> (-3.04%)` | :arrow_down: |
| [...-frontend/src/components/CopyToClipboard/index.jsx](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ29weVRvQ2xpcGJvYXJkL2luZGV4LmpzeA==) | `96.00% <0.00%> (ø)` | |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `60.92% <0.00%> (ø)` | |
| [...tend/plugins/plugin-chart-table/src/TableChart.tsx](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtdGFibGUvc3JjL1RhYmxlQ2hhcnQudHN4) | `38.57% <0.00%> (ø)` | |
| ... and [8 more](https://codecov.io/gh/apache/superset/pull/19967/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19967?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19967?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [fdf48c6...b8acb2c](https://codecov.io/gh/apache/superset/pull/19967?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] diegomedina248 closed pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
diegomedina248 closed pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
URL: https://github.com/apache/superset/pull/19967
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] stephenLYZ commented on a diff in pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on code in PR #19967:
URL: https://github.com/apache/superset/pull/19967#discussion_r887522051
##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -503,7 +503,6 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
setImportingModal(false);
setPasswords({});
setConfirmedOverwrite(false);
- if (onDatabaseAdd) onDatabaseAdd();
Review Comment:
I'm curious about the reason for the deletion here, it looks like the `close` method will be called in multiple places, not just the model closing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] AAfghahi commented on a diff in pull request #19967: fix: A newly connected database doesn't appear in the databases list if user connected database using the 'plus' button
Posted by GitBox <gi...@apache.org>.
AAfghahi commented on code in PR #19967:
URL: https://github.com/apache/superset/pull/19967#discussion_r894873100
##########
superset-frontend/src/views/components/MenuRight.tsx:
##########
@@ -94,6 +96,10 @@ const RightMenu = ({
state => state.dashboardInfo?.id,
);
+ const [, setQuery] = useQueryParams({
Review Comment:
yeah I like it too!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org