Feat/dashboard empty state config#37638
Draft
Vansh5632 wants to merge 5 commits intoapache:masterfrom
Draft
Conversation
…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
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
fixes: #37129