bito-code-review[bot] commented on code in PR #32958:
URL: https://github.com/apache/superset/pull/32958#discussion_r3717350578
##########
superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx:
##########
@@ -46,7 +46,7 @@ const mockedIsFeatureEnabled = isFeatureEnabled as jest.Mock;
const spyColorSchemeSelect = jest.spyOn(ColorSchemeSelect, 'default');
const mockedJsonMetadata =
- '{"timed_refresh_immune_slices": [], "expanded_slices": {},
"refresh_frequency": 0, "default_filters": "{}", "color_scheme":
"supersetColors", "label_colors": {"0": "#D3B3DA", "1": "#9EE5E5", "0.
Pre-clinical": "#1FA8C9", "2. Phase II or Combined I/II": "#454E7C", "1. Phase
I": "#5AC189", "3. Phase III": "#FF7F44", "4. Authorized": "#666666", "root":
"#1FA8C9", "Protein subunit": "#454E7C", "Phase II": "#5AC189", "Pre-clinical":
"#FF7F44", "Phase III": "#666666", "Phase I": "#E04355", "Phase I/II":
"#FCC700", "Inactivated virus": "#A868B7", "Virus-like particle": "#3CCCCB",
"Replicating bacterial vector": "#A38F79", "DNA-based": "#8FD3E4", "RNA-based
vaccine": "#A1A6BD", "Authorized": "#ACE1C4", "Non-replicating viral vector":
"#FEC0A1", "Replicating viral vector": "#B2B2B2", "Unknown": "#EFA1AA", "Live
attenuated virus": "#FDE380", "COUNT(*)": "#D1C6BC"}, "filter_scopes": {"358":
{"Country_Name": {"scope": ["ROOT_ID"], "immune": []}, "Product_Category":
{"scope": ["ROOT_ID"], "im
mune": []}, "Clinical Stage": {"scope": ["ROOT_ID"], "immune": []}}}}';
+ '{"timed_refresh_immune_slices": [], "expanded_slices": {},
"expand_all_slices": "false", "refresh_frequency": 0, "default_filters": "{}",
"color_scheme": "supersetColors", "label_colors": {"0": "#D3B3DA", "1":
"#9EE5E5", "0. Pre-clinical": "#1FA8C9", "2. Phase II or Combined I/II":
"#454E7C", "1. Phase I": "#5AC189", "3. Phase III": "#FF7F44", "4. Authorized":
"#666666", "root": "#1FA8C9", "Protein subunit": "#454E7C", "Phase II":
"#5AC189", "Pre-clinical": "#FF7F44", "Phase III": "#666666", "Phase I":
"#E04355", "Phase I/II": "#FCC700", "Inactivated virus": "#A868B7", "Virus-like
particle": "#3CCCCB", "Replicating bacterial vector": "#A38F79", "DNA-based":
"#8FD3E4", "RNA-based vaccine": "#A1A6BD", "Authorized": "#ACE1C4",
"Non-replicating viral vector": "#FEC0A1", "Replicating viral vector":
"#B2B2B2", "Unknown": "#EFA1AA", "Live attenuated virus": "#FDE380",
"COUNT(*)": "#D1C6BC"}, "filter_scopes": {"358": {"Country_Name": {"scope":
["ROOT_ID"], "immune": []}, "Product_Categor
y": {"scope": ["ROOT_ID"], "immune": []}, "Clinical Stage": {"scope":
["ROOT_ID"], "immune": []}}}}';
Review Comment:
<!-- Bito Reply -->
The update correctly addresses the type mismatch by replacing the string
"false" with the boolean `false` in the test fixture, aligning it with the
expected schema definition.
**superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx**
```
- '{"timed_refresh_immune_slices": [], "expanded_slices": {},
"expand_all_slices": "false", "refresh_frequency": 0, "default_filters": "{}",
...
+ '{"timed_refresh_immune_slices": [], "expanded_slices": {},
"expand_all_slices": false, "refresh_frequency": 0, "default_filters": "{}", ...
```
##########
superset-frontend/src/dashboard/components/SaveModal.tsx:
##########
@@ -48,6 +48,7 @@ type SaveModalProps = {
dashboardTitle: string;
dashboardInfo: Record<string, any>;
expandedSlices: Record<string, any>;
+ expandAllSlices: boolean;
Review Comment:
<!-- Bito Reply -->
The removal of the unused prop is appropriate. Since the prop was not being
used within the component and was not being passed by the caller, deleting it
cleans up the interface and removes dead code.
**superset-frontend/src/dashboard/components/SaveModal.tsx**
```
48: dashboardTitle: string;
49: dashboardInfo: Record<string, any>;
50: expandedSlices: Record<string, any>;
51:- expandAllSlices: boolean;
52: layout: Record<string, any>;
53: saveType: SaveType;
54: triggerNode: JSX.Element;
```
--
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]