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


##########
superset-frontend/src/dashboard/reducers/dashboardState.js:
##########
@@ -132,11 +132,7 @@ export default function dashboardStateReducer(state = {}, 
action) {
     [TOGGLE_EXPAND_SLICE]() {
       const updatedExpandedSlices = { ...state.expandedSlices };
       const { sliceId } = action;
-      if (updatedExpandedSlices[sliceId]) {
-        delete updatedExpandedSlices[sliceId];
-      } else {
-        updatedExpandedSlices[sliceId] = true;
-      }
+      updatedExpandedSlices[sliceId] = !updatedExpandedSlices[sliceId];

Review Comment:
   Without this edit expand_all_slices will trump **Hide chart description** 
since the expandedSlices key for a chart will be undefined. Not sure if this 
has any negative impact.



-- 
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