villebro commented on code in PR #20111:
URL: https://github.com/apache/superset/pull/20111#discussion_r878345295
##########
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'm kind of surprised by `sliceName` being optional:
<img width="611" alt="image"
src="https://user-images.githubusercontent.com/33317356/169573939-b6b98b97-dfb9-4f53-a726-6a82b5bb43b6.png">
Not a blocker, but would be interesting to see if it really should be
optional.
--
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]