Fix: tour flow and update the mock data (#15002)

This commit is contained in:
Sachin Chaurasiya 2024-02-02 14:30:56 +05:30 committed by GitHub
parent 968f146fe7
commit 0d001c31d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1463 additions and 38 deletions

View File

@ -108,7 +108,7 @@ const LineageProvider = ({ children }: LineageProviderProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const { fqn: decodedFqn } = useFqn(); const { fqn: decodedFqn } = useFqn();
const { isTourOpen } = useTourProvider(); const { isTourOpen, isTourPage } = useTourProvider();
const [reactFlowInstance, setReactFlowInstance] = const [reactFlowInstance, setReactFlowInstance] =
useState<ReactFlowInstance>(); useState<ReactFlowInstance>();
const [isDrawerOpen, setIsDrawerOpen] = useState(false); const [isDrawerOpen, setIsDrawerOpen] = useState(false);
@ -169,7 +169,7 @@ const LineageProvider = ({ children }: LineageProviderProps) => {
config?: LineageConfig config?: LineageConfig
) => { ) => {
if (isTourOpen) { if (isTourOpen) {
setEntityLineage(mockDatasetData.entityLineage); return;
} else { } else {
setLoading(true); setLoading(true);
setInit(false); setInit(false);
@ -1065,6 +1065,16 @@ const LineageProvider = ({ children }: LineageProviderProps) => {
onAddPipelineClick, onAddPipelineClick,
]); ]);
useEffect(() => {
if (isTourOpen || isTourPage) {
setInit(true);
setLoading(false);
setEntityLineage(
mockDatasetData.entityLineage as unknown as EntityLineageReponse
);
}
}, [isTourOpen, isTourPage]);
return ( return (
<LineageContext.Provider value={activityFeedContextValues}> <LineageContext.Provider value={activityFeedContextValues}>
<div <div

View File

@ -286,6 +286,6 @@ export const getTourSteps = ({
</p> </p>
), ),
stepInteraction: false, stepInteraction: false,
selector: '#lineageDetails', selector: `[data-testid="lineage-details"]`,
}, },
]; ];