rusackas commented on code in PR #32958:
URL: https://github.com/apache/superset/pull/32958#discussion_r3717343602


##########
superset-frontend/src/dashboard/actions/hydrate.ts:
##########
@@ -375,6 +375,7 @@ export const hydrateDashboard =
           directPathLastUpdated: Date.now(),
           focusedFilterField: null,
           expandedSlices: metadata?.expanded_slices || {},
+          expandAllSlices: metadata?.expand_all_slices || false,

Review Comment:
   This is how every boolean field in DashboardJSONMetadataSchema behaves 
today, validate_json_metadata only calls .validate() on the incoming JSON and 
never uses the coerced result, so nothing actually normalizes the type before 
it's stored. Not something new to this field, so I'd rather not special-case it 
here. Worth a follow-up across the whole schema though.



##########
superset/daos/dashboard.py:
##########
@@ -341,6 +341,7 @@ def set_dash_metadata(
             md["color_namespace"] = data.get("color_namespace")
 
         md["expanded_slices"] = data.get("expanded_slices", {})
+        md["expand_all_slices"] = data.get("expand_all_slices", False)

Review Comment:
   Same as the other boolean fields in this metadata blob, we validate but 
don't coerce on save. Pre-existing pattern, not introduced by this PR, so I'll 
leave it as is 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to