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

View File

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