Antonio-RiveroMartnez commented on code in PR #22262:
URL: https://github.com/apache/superset/pull/22262#discussion_r1040079927
##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/index.tsx:
##########
@@ -82,19 +85,25 @@ export default function Header({
return (
<HeaderComponentStyles>
- <PageHeaderWithActions
- editableTitleProps={editableTitleProps}
- showTitlePanelItems={false}
- showFaveStar={false}
- faveStarProps={{ itemId: 1, saveFaveStar: () => {} }}
- titlePanelAdditionalItems={<></>}
- rightPanelAdditionalItems={renderDisabledSaveButton()}
- additionalActionsMenu={renderOverlay()}
- menuDropdownProps={{
- disabled: true,
- }}
- tooltipProps={tooltipProps}
- />
+ {editing ? (
+ <PageHeaderWithActions
+ editableTitleProps={editableTitleProps}
+ showTitlePanelItems={false}
+ showFaveStar={false}
+ faveStarProps={{ itemId: 1, saveFaveStar: () => {} }}
+ titlePanelAdditionalItems={<></>}
+ rightPanelAdditionalItems={renderDisabledSaveButton()}
+ additionalActionsMenu={renderOverlay()}
+ menuDropdownProps={{
+ disabled: true,
+ }}
+ tooltipProps={tooltipProps}
+ />
+ ) : (
+ <StyledCreateDatasetTitle>
+ {title ?? DEFAULT_TITLE}
Review Comment:
Do we want to render empty string if passed as `title`? If not, we should
change this to be `||`
##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/DatasetPanel/DatasetPanel.tsx:
##########
@@ -248,6 +258,9 @@ const DatasetPanel = ({
const theme = useTheme();
const hasColumns = columnList?.length > 0 ?? false;
const datasetNames = datasets?.map(dataset => dataset.table_name);
+ const tablesWithDatasets = datasets?.find(
Review Comment:
should we rename this to singular? `tablesWithDatasets` ->
`tableWithDatasets` since `find` only returns one 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]