You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "msyavuz (via GitHub)" <gi...@apache.org> on 2025/06/16 17:09:09 UTC
[PR] feat(Dashboard): Row limit warning in dashboards [superset]
msyavuz opened a new pull request, #33781:
URL: https://github.com/apache/superset/pull/33781
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
Display row limit reached warning on dashboard view for charts. This functionality existed in explore view but same logic can be applied to dashboards as well.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->

### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
Create a chart with row limits and add it to the dashboard.
Warning icon with tooltip should appear.
### 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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33781:
URL: https://github.com/apache/superset/pull/33781#issuecomment-2977538712
@msyavuz Ephemeral environment spinning up at http://44.248.254.152: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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "rebecagbenevides (via GitHub)" <gi...@apache.org>.
rebecagbenevides commented on PR #33781:
URL: https://github.com/apache/superset/pull/33781#issuecomment-3032319634
Passed in QA!
--
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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on PR #33781:
URL: https://github.com/apache/superset/pull/33781#issuecomment-2977396252
Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment `/korbit-review`.
> Your admin can change your review schedule in the [Korbit Console](https://app.korbit.ai/settings)
[](7964f9e4-ecd9-4346-b23c-574e128122c6)
--
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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33781:
URL: https://github.com/apache/superset/pull/33781#issuecomment-3003877634
@EnxDev Processing your ephemeral environment request [here](https://github.com/apache/superset/actions/runs/15871418328). Action: **up**. More information on [how to use or configure ephemeral environments](https://superset.apache.org/docs/contributing/howtos/#github-ephemeral-environments)
--
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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on code in PR #33781:
URL: https://github.com/apache/superset/pull/33781#discussion_r2166325692
##########
superset-frontend/src/dashboard/components/SliceHeader/index.tsx:
##########
@@ -182,6 +183,17 @@ const SliceHeader = forwardRef<HTMLDivElement, SliceHeaderProps>(
({ dashboardInfo }) => dashboardInfo.crossFiltersEnabled,
);
+ const chart = useSelector<RootState, Chart>(
+ state => state.charts[slice.slice_id],
Review Comment:
Good catch!
--
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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "geido (via GitHub)" <gi...@apache.org>.
geido commented on code in PR #33781:
URL: https://github.com/apache/superset/pull/33781#discussion_r2151932857
##########
superset-frontend/src/dashboard/components/SliceHeader/index.tsx:
##########
@@ -176,6 +183,17 @@ const SliceHeader = forwardRef<HTMLDivElement, SliceHeaderProps>(
({ dashboardInfo }) => dashboardInfo.crossFiltersEnabled,
);
+ const chart = useSelector<RootState, Chart>(
+ state => state.charts[slice.slice_id],
+ );
+
+ const theme = useTheme();
+
+ const firstQueryResponse = chart.queriesResponse?.[0];
+
+ const rowLimit = Number(formData.row_limit || 0);
+ const sqlRowCount = Number(firstQueryResponse?.sql_rowcount || 0);
Review Comment:
Is falling back to 0 safe here? If no row limit is set and there are no results from the query, wouldn't this show the warning incorrectly?
##########
superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx:
##########
@@ -527,6 +527,9 @@ const SliceHeaderControls = (
id={`slice_${slice.slice_id}-controls`}
aria-label="More Options"
aria-haspopup="true"
+ css={theme => css`
+ padding: ${theme.gridUnit * 1.5}px;
Review Comment:
Nit: Can we avoid the 1.5 here? Maybe 2 or just gridUnit?
--
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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33781:
URL: https://github.com/apache/superset/pull/33781#issuecomment-2977518426
@msyavuz Processing your ephemeral environment request [here](https://github.com/apache/superset/actions/runs/15688177969). Action: **up**. More information on [how to use or configure ephemeral environments](https://superset.apache.org/docs/contributing/howtos/#github-ephemeral-environments)
--
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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje commented on code in PR #33781:
URL: https://github.com/apache/superset/pull/33781#discussion_r2166223109
##########
superset-frontend/src/dashboard/components/SliceHeader/index.tsx:
##########
@@ -182,6 +183,17 @@ const SliceHeader = forwardRef<HTMLDivElement, SliceHeaderProps>(
({ dashboardInfo }) => dashboardInfo.crossFiltersEnabled,
);
+ const chart = useSelector<RootState, Chart>(
+ state => state.charts[slice.slice_id],
Review Comment:
We need the chart object only for the first query response right? If so, can we change this selector to `state.charts[id].queriesResponse?.[0]`?
Selecting the whole chart object will trigger an unnecessary rerender every time any field in the chart changes, and we only care about the queries response here
--
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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "EnxDev (via GitHub)" <gi...@apache.org>.
EnxDev merged PR #33781:
URL: https://github.com/apache/superset/pull/33781
--
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
Re: [PR] feat(Dashboard): Row limit warning in dashboards [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33781:
URL: https://github.com/apache/superset/pull/33781#issuecomment-3003933394
@EnxDev Ephemeral environment spinning up at http://54.190.42.194: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