From 8de93871d76b2d10a0f11ba86c8b7ccbaacb9e4c Mon Sep 17 00:00:00 2001
From: Geido <60598000+geido@users.noreply.github.com>
Date: Fri, 10 Dec 2021 18:25:40 +0200
Subject: [PATCH] Fix flacky header (#17690)
---
.../src/components/EditableTitle/index.tsx | 19 ++++++++++++++++++-
.../src/dashboard/components/Header/index.jsx | 11 ++---------
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/superset-frontend/src/components/EditableTitle/index.tsx b/superset-frontend/src/components/EditableTitle/index.tsx
index 8cb41fdf81142..c5350416ca9f6 100644
--- a/superset-frontend/src/components/EditableTitle/index.tsx
+++ b/superset-frontend/src/components/EditableTitle/index.tsx
@@ -18,8 +18,9 @@
*/
import React, { useEffect, useState, useRef } from 'react';
import cx from 'classnames';
-import { t } from '@superset-ui/core';
+import { styled, t } from '@superset-ui/core';
import { Tooltip } from 'src/components/Tooltip';
+import CertifiedIcon from '../CertifiedIcon';
export interface EditableTitleProps {
canEdit?: boolean;
@@ -34,8 +35,14 @@ export interface EditableTitleProps {
title?: string;
defaultTitle?: string;
placeholder?: string;
+ certifiedBy?: string;
+ certificationDetails?: string;
}
+const StyledCertifiedIcon = styled(CertifiedIcon)`
+ vertical-align: middle;
+`;
+
export default function EditableTitle({
canEdit = false,
editing = false,
@@ -48,6 +55,8 @@ export default function EditableTitle({
title = '',
defaultTitle = '',
placeholder = '',
+ certifiedBy,
+ certificationDetails,
}: EditableTitleProps) {
const [isEditing, setIsEditing] = useState(editing);
const [currentTitle, setCurrentTitle] = useState(title);
@@ -222,6 +231,14 @@ export default function EditableTitle({
)}
style={style}
>
+ {certifiedBy && (
+ <>
+