You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "kokhlo (via GitHub)" <gi...@apache.org> on 2026/08/29 13:16:49 UTC
[PR] fix(dashboard): show loading state on + Dashboard during the create navigation [superset]
kokhlo opened a new pull request, #43683:
URL: https://github.com/apache/superset/pull/43683
### Summary
Fixes the UX half of #43385: with ~1000 dashboards, clicking **+ Dashboard** shows no loading indicator and the editor only appears after a long delay, so the click looks dead.
Root cause: the **+ Dashboard** button (Dashboards list `DashboardList/index.tsx` and home table `DashboardTable.tsx`) fires a hard `window.location.assign('/dashboard/new/')`. That GET creates the dashboard server-side (`Dashboard.new()` in `superset/views/dashboard/views.py`: subject lookups, INSERT, commit) before redirecting to the SSR editor page, and the click handler set no pending state — the `SubMenu` button already supports `loading`, it was simply never used.
Fix: flip the button into its loading state before the navigation, on both call sites. The state lives until the page unloads, giving immediate feedback for the whole round-trip. No routing or backend behavior changes.
For the record, the backend slowness in that issue is mostly addressed on master already: the list-payload perf PRs (#29121, #28609, #38567, #36246) are all merged, and `PUT /api/v1/dashboard/<pk>` is O(1) per dashboard. The reporter is on 6.1.0 without those. What remains reproducibly wrong on master is the missing pending state, which this PR fixes.
### Testing
RED first: with the source changes stashed, the two new loading-state assertions fail (`2 failed, 13 passed`); with the fix:
```
cd superset-frontend
npx jest src/pages/DashboardList/ src/features/home/DashboardTable.test.tsx src/features/home/Menu.test.tsx src/features/home/RightMenu.test.tsx --silent
Test Suites: 8 passed, 8 total
Tests: 119 passed, 119 total
Snapshots: 3 passed, 3 total
```
- `DashboardList.behavior.test.tsx` — new test: clicking + Dashboard calls `window.location.assign('/dashboard/new/')` and the button gains `ant-btn-loading` (was absent before the click).
- `DashboardTable.test.tsx` — the existing create-button test now also asserts the loading class appears after the click (and is absent before).
`npx oxlint --config oxlint.json` on the four touched files: no new findings (warning count identical to master). `npm run _format -- --check`: clean.
### Additional context
The existing duplicate-navigation suppression in `navigateTo` (PR #40833) is what makes the loading state safe to leave on: a double-click fires only one `assign`, and the button stays in loading state through the unload.
Fixes #43385
--
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] fix(dashboard): show loading state on + Dashboard during the create navigation [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43683:
URL: https://github.com/apache/superset/pull/43683#issuecomment-5462629142
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large 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
Re: [PR] fix(dashboard): show loading state on + Dashboard during the create navigation [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43683:
URL: https://github.com/apache/superset/pull/43683#issuecomment-5462740435
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43683?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 79.22%. Comparing base ([`3d91ba3`](https://app.codecov.io/gh/apache/superset/commit/3d91ba3fded56186ac539a41206b94d4cbd629a0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`6a6a729`](https://app.codecov.io/gh/apache/superset/commit/6a6a72985b22bdb36886b8dbaefe287e656f052a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #43683 +/- ##
=======================================
Coverage 79.22% 79.22%
=======================================
Files 2879 2879
Lines 166087 166091 +4
Branches 38420 38420
=======================================
+ Hits 131581 131588 +7
+ Misses 32023 32020 -3
Partials 2483 2483
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/43683/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/43683/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `74.69% <100.00%> (+<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=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/43683?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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] fix(dashboard): show loading state on + Dashboard during the create navigation [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #43683:
URL: https://github.com/apache/superset/pull/43683
--
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