phmoraesrodrigues commented on code in PR #37210:
URL: https://github.com/apache/superset/pull/37210#discussion_r2699948830
##########
superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.jsx:
##########
@@ -262,41 +256,55 @@ const Tab = props => {
</Droppable>
)}
{shouldDisplayEmptyState && (
- <EmptyState
- title={
- editMode
- ? t('Drag and drop components to this tab')
- : t('There are no components added to this tab')
- }
- description={
- canEdit &&
- (editMode ? (
- <span>
- {t('You can')}{' '}
- <a
- href={`/chart/add?dashboard_id=${dashboardId}`}
- rel="noopener noreferrer"
- target="_blank"
- >
- {t('create a new chart')}
- </a>{' '}
- {t('or use existing ones from the panel on the right')}
- </span>
- ) : (
- <span>
- {t('You can add the components in the')}{' '}
- <span
- role="button"
- tabIndex={0}
- onClick={() => dispatch(setEditMode(true))}
- >
- {t('edit mode')}
- </span>
- </span>
- ))
- }
- image="chart.svg"
- />
+ <Droppable
+ component={tabComponent}
+ orientation="column"
+ index={editMode ? 1 : 0}
+ depth={depth}
+ onDrop={handleTopDropTargetDrop}
+ editMode={editMode}
+ dropToChild
+ >
+ {() => (
+ <div data-test="emptystate-drop-indicator">
+ <EmptyState
+ title={
+ editMode
+ ? t('Drag and drop components to this tab')
+ : t('There are no components added to this tab')
+ }
+ description={
+ canEdit &&
+ (editMode ? (
+ <span>
+ {t('You can')}{' '}
+ <a
Review Comment:
Done! Thanks for pointing!
--
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]