feat(dashboard): Add metadata bar to the header
SUMMARY
As the dashboard currently lacks metadata information such as owners and last modified time, users have to navigate to edit mode and click "edit properties" to access this information. Unfortunately, there is no way to check the last modified time at all. To address this issue, this commit integrates the metadata bar UI from the chart header into the dashboard header and updates the API properties accordingly. This enhancement will provide users with convenient access to the metadata information they need.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
https://github.com/apache/superset/assets/1392866/2956ea12-1e23-42ee-bd6c-cec8cead739e
TESTING INSTRUCTIONS
Go to a dashboard and then check the header
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] 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
- [x] Introduces new feature or API
- [ ] Removes existing feature or API
Do we / should we hide this in print mode (standalone=true) or in an embedded context? I'm not sure what the behavior should be or what the options settings should be and generally think the more information the better, but I'm unclear if everyone would agree.
+1 on the more the merrier. Knowing how fresh the dashboard is (the edit timestamp) is valuable even in an embedded context. The owners might not be something you want to see in an embedded context, but if anyone barks about that, I think that's also addressable — probably by means of a new config option (prop?) in the embedded component, just like you'd tweak other features (filter bar collapsing, etc)
/testenv up
@michael-s-molina Ephemeral environment spinning up at http://34.208.49.238:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
Codecov Report
Attention: Patch coverage is 66.66667% with 3 lines in your changes are missing coverage. Please review.
Project coverage is 60.80%. Comparing base (
76d897e) to head (65d2640). Report is 70 commits behind head on master.
| Files | Patch % | Lines |
|---|---|---|
| ...frontend/src/dashboard/components/Header/index.jsx | 57.14% | 0 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #27857 +/- ##
==========================================
+ Coverage 60.48% 60.80% +0.31%
==========================================
Files 1931 1937 +6
Lines 76236 76924 +688
Branches 8568 8606 +38
==========================================
+ Hits 46114 46774 +660
- Misses 28017 28048 +31
+ Partials 2105 2102 -3
| Flag | Coverage Δ | |
|---|---|---|
| hive | 49.08% <100.00%> (-0.09%) |
:arrow_down: |
| presto | 53.67% <100.00%> (-0.14%) |
:arrow_down: |
| python | 64.14% <100.00%> (+0.65%) |
:arrow_up: |
| unit | 58.35% <100.00%> (+0.73%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Do we / should we hide this in print mode (standalone=true) or in an embedded context? I'm not sure what the behavior should be or what the options settings should be and generally think the more information the better, but I'm unclear if everyone would agree.
Since we currently do not hide any items in the header in standalone mode, let's keep the metadata bar as it is for the time being.
Ephemeral environment shutdown and build artifacts deleted.