Skip to content

Feat/dashboard empty state config#37638

Draft
Vansh5632 wants to merge 5 commits intoapache:masterfrom
Vansh5632:feat/dashboard-empty-state-config
Draft

Feat/dashboard empty state config#37638
Vansh5632 wants to merge 5 commits intoapache:masterfrom
Vansh5632:feat/dashboard-empty-state-config

Conversation

@Vansh5632
Copy link

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

fixes: #37129

…ns, models)

- Add database migration for empty_state_config column in dashboards table
- Update Dashboard model with empty_state_config field and include in export
- Add empty_state_config to DashboardGetResponseSchema, DashboardPostSchema, and DashboardPutSchema
- Support JSON validation for empty state configuration
- Enable dashboard-level customization of empty state messages for charts
…ty states

- Add EmptyStateSection component to dashboard properties modal
  * Four input fields for no_data_message, no_data_subtitle, no_results_message, no_results_subtitle
  * Integrated between Refresh and Certification sections
  * Full state management with load/save logic

- Update ChartRenderer to consume dashboard empty_state_config
  * Pass dashboardEmptyStateConfig prop
  * Use custom messages in noResultsComponent

- Update BigNumber plugin components
  * BigNumberViz accepts customEmptyStateMessages prop
  * renderHeader and renderSubtitle use custom messages with fallback to i18n defaults
  * All three transformProps files extract and pass config (BigNumberTotal, BigNumberWithTrendline, BigNumberPeriodOverPeriod)

- Type safety
  * Added empty_state_config to DashboardInfo metadata type
  * EmptyStateConfig TypeScript interface
  * BigNumberVizProps includes customEmptyStateMessages
Backend integration tests:
- test_create_dashboard_with_empty_state_config: Verify creating dashboard with valid JSON config
- test_create_dashboard_with_invalid_empty_state_config: Validate JSON validation on POST
- test_update_dashboard_with_empty_state_config: Test updating existing dashboard
- test_get_dashboard_with_empty_state_config: Verify config retrieval via API
- test_update_dashboard_clear_empty_state_config: Test clearing/removing config

Frontend unit tests (EmptyStateSection):
- Renders all four input fields (no_data_message, no_data_subtitle, no_results_message, no_results_subtitle)
- Displays existing values from props
- Calls setEmptyStateConfig on field changes
- Preserves other config values when updating one field
- Shows placeholder text for all fields

All tests follow existing patterns in the codebase.
Add comprehensive documentation for the new customizable empty state messages feature:
- Feature overview and use cases
- Four configurable message fields
- Usage instructions for dashboard owners
- Database migration requirements
- API changes and JSON format
- i18n support details

Placed under 'Next' release section as this is a new feature.
- Enhance message priority chain: custom > chart subtitle > i18n defaults
- Only persist empty_state_config when it has actual values (avoid null)
- Fix TypeScript types for headerFormatter result
- Improve documentation on no_data vs no_results distinction
- Add detailed JSDoc comments explaining behavior
@github-actions github-actions bot added risk:db-migration PRs that require a DB migration plugins labels Feb 3, 2026
@netlify
Copy link

netlify bot commented Feb 3, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 1e5df2a
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6981bf1404b74900085392d6
😎 Deploy Preview https://deploy-preview-37638--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apache Superset 6.0.0: Big Number (Legacy) chart, how to override default “No data” empty-state messages when embedding charts

2 participants