kgabryje commented on code in PR #20111:
URL: https://github.com/apache/superset/pull/20111#discussion_r878369665
##########
superset-frontend/src/dashboard/components/SliceHeader/index.tsx:
##########
@@ -104,9 +104,18 @@ const SliceHeader: FC<SliceHeaderProps> = ({
[crossFilterValue],
);
+ const handleClickTitle =
+ !editMode && supersetCanExplore ? onExploreChart : undefined;
+
useEffect(() => {
const headerElement = headerRef.current;
- if (
+ if (handleClickTitle) {
+ setHeaderTooltip(
+ sliceName
+ ? t('Click to edit %s in a new tab', sliceName)
+ : t('Click to edit chart in a new tab'),
Review Comment:
I think those checks are for the edge case where sliceName is an empty
string (not sure if it's possible to achieve such state)
--
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]