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/05 19:15:07 UTC
[GitHub] [superset] prosdev0107 opened a new pull request, #19960: fix(dashboard): make to refresh all tab content charts
prosdev0107 opened a new pull request, #19960:
URL: https://github.com/apache/superset/pull/19960
### SUMMARY
"Refresh Dashboard" only refreshes active tab
**Description**
On a tabbed dashboard, “refresh dashboard” only refreshes the active tab
**Expected results**
all tabs should refresh
**Actual results**
only the active tab is refreshed
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE:
https://user-images.githubusercontent.com/47900232/167009037-d346720f-b8e4-4bfe-8e24-e9125ec55526.mov
AFTER:
https://user-images.githubusercontent.com/47900232/167009029-f2d4101a-7012-46a8-946f-f10e8ac79f92.mov
### TESTING INSTRUCTIONS
**How to reproduce the bug**
1. Go to a tabbed dashboard
2. Change the underlying dataset of some charts do the visualization changes
3. Click on 'refresh dashboard'
4. Only the active tab is refreshed, other tabs are not
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] 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] prosdev0107 commented on a diff in pull request #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
prosdev0107 commented on code in PR #19960:
URL: https://github.com/apache/superset/pull/19960#discussion_r866275411
##########
superset-frontend/src/dashboard/components/gridComponents/Chart.jsx:
##########
@@ -154,6 +157,10 @@ export default class Chart extends React.Component {
return true;
}
+ if (!isEqual(nextProps.chart, this.props.chart)) {
Review Comment:
@diegomedina248
I think that `isEqual` works similar to `areObjectsEqual` and `areObjectsEqual` maybe more strict in this case.
And then, when click `refresh dashboard` after change the dataset, all chart components should update whether if it is now visible or not. Thus, I define the filtering by chart props outside of `isComponentVisible` props filtering and so `chart` prop doesn't need to reach the `areObjectEquals` in `SHOULD_UPDATE_ON_PROP_CHANGES `.
--
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 #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1127220205
@stephenLYZ Ephemeral environment spinning up at http://54.70.72.39: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] diegomedina248 commented on a diff in pull request #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on code in PR #19960:
URL: https://github.com/apache/superset/pull/19960#discussion_r866266988
##########
superset-frontend/src/dashboard/components/gridComponents/Chart.jsx:
##########
@@ -154,6 +157,10 @@ export default class Chart extends React.Component {
return true;
}
+ if (!isEqual(nextProps.chart, this.props.chart)) {
Review Comment:
is this different than `if (!areObjectsEqual(nextProps[prop], this.props[prop]))`?
If you don't filter the chart prop to `SHOULD_UPDATE_ON_PROP_CHANGES`, shouldn't the code reach the `areObjectEquals`?
--
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 #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1151319544
@stephenLYZ Ephemeral environment spinning up at http://52.10.136.224: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 #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1127219271
/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] stephenLYZ commented on pull request #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1151311492
/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] codecov[bot] commented on pull request #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1118998539
# [Codecov](https://codecov.io/gh/apache/superset/pull/19960?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 [#19960](https://codecov.io/gh/apache/superset/pull/19960?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d9dbdcf) into [master](https://codecov.io/gh/apache/superset/commit/2e2053f72fef9f88b43a08f4cb4de8988e169171?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2e2053f) will **decrease** coverage by `0.00%`.
> The diff coverage is `33.33%`.
> :exclamation: Current head d9dbdcf differs from pull request most recent head 16c0356. Consider uploading reports for the commit 16c0356 to get more accurate results
```diff
@@ Coverage Diff @@
## master #19960 +/- ##
==========================================
- Coverage 66.28% 66.27% -0.01%
==========================================
Files 1712 1712
Lines 63964 63966 +2
Branches 6726 6727 +1
==========================================
Hits 42396 42396
- Misses 19856 19857 +1
- Partials 1712 1713 +1
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.25% <33.33%> (-0.01%)` | :arrow_down: |
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/19960?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../src/dashboard/components/gridComponents/Chart.jsx](https://codecov.io/gh/apache/superset/pull/19960/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0LmpzeA==) | `59.40% <33.33%> (-1.21%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19960?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/19960?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 [2e2053f...16c0356](https://codecov.io/gh/apache/superset/pull/19960?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] rusackas commented on pull request #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
rusackas commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1137466438
This might be a good excuse to bring this component up to modern standards. We could convert this to a functional component to avoid the lifecycle method complexities, and then migrate it to typescript and add proper test coverage.
--
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 #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on code in PR #19960:
URL: https://github.com/apache/superset/pull/19960#discussion_r880117491
##########
superset-frontend/src/dashboard/components/gridComponents/Chart.jsx:
##########
@@ -154,6 +157,10 @@ export default class Chart extends React.Component {
return true;
}
+ if (!isEqual(nextProps.chart, this.props.chart)) {
Review Comment:
It makes sense to not render the chart when it is not visible, which improves performance. The same is true for fine-grained control of chart updates via SHOULD_UPDATE_ON_PROP_CHANGES.
In this issue, in the case of a chart that is not updated, I suggest finding a prop that is not updated case by case and add it to SHOULD_UPDATE_ON_PROP_CHANGES.
##########
superset-frontend/src/dashboard/components/gridComponents/Chart.jsx:
##########
@@ -175,6 +180,11 @@ export default class Chart extends React.Component {
this.resizeTimeout = setTimeout(this.resize, RESIZE_TIMEOUT);
}
+ if (nextState.isUpdated) {
+ this.setState({ isUpdated: false });
Review Comment:
It is not recommended to call `setState` in SCU, it is rather hacky. If you want to change state when a prop change, please consider using [static getDerivedStateFromProps](https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops).
--
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 #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on code in PR #19960:
URL: https://github.com/apache/superset/pull/19960#discussion_r866277210
##########
superset-frontend/src/dashboard/components/gridComponents/Chart.jsx:
##########
@@ -154,6 +157,10 @@ export default class Chart extends React.Component {
return true;
}
+ if (!isEqual(nextProps.chart, this.props.chart)) {
Review Comment:
mm, but I think `isComponentVisible` might be broader, and put in place for a reason.
If we add this condition here, we might be triggering more rerenders than expected.
@rusackas what do you think?
--
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] rusackas commented on pull request #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
rusackas commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1180861008
We'll take another stab at this in a new PR
--
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 #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1180861357
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] rusackas closed pull request #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
rusackas closed pull request #19960: fix(dashboard): make to refresh all tab content charts
URL: https://github.com/apache/superset/pull/19960
--
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] mistercrunch commented on pull request #19960: fix(dashboard): make to refresh all tab content charts
Posted by GitBox <gi...@apache.org>.
mistercrunch commented on PR #19960:
URL: https://github.com/apache/superset/pull/19960#issuecomment-1179239611
Hey it's hard to review the PR since you probably `mv` the file instead of `git mv`. If you `git mv` we'll be able to diff the file in the PR as opposed to seeing the old file deleted and the new file show as new.
--
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