mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 20:51:26 +00:00
fix tour page not showing (#13902)
This commit is contained in:
parent
2adce103f4
commit
ef2a27a217
@ -69,7 +69,10 @@ const ActivityFeedListV1 = ({
|
||||
}
|
||||
|
||||
return isEmpty(entityThread) ? (
|
||||
<div className="h-full p-x-md" data-testid="no-data-placeholder-container">
|
||||
<div
|
||||
className="h-full p-x-md"
|
||||
data-testid="no-data-placeholder-container"
|
||||
id="feedData">
|
||||
<ErrorPlaceHolder
|
||||
icon={
|
||||
isTaskTab ? (
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
import { observer } from 'mobx-react';
|
||||
import React, { useEffect } from 'react';
|
||||
import React, { useEffect, useMemo } from 'react';
|
||||
import Tour from '../../components/tour/Tour';
|
||||
import { useTourProvider } from '../../components/TourProvider/TourProvider';
|
||||
import { TOUR_SEARCH_TERM } from '../../constants/constants';
|
||||
@ -39,8 +39,8 @@ const TourPage = () => {
|
||||
updateIsTourOpen(true);
|
||||
}, []);
|
||||
|
||||
const getCurrentPage = (page: CurrentTourPageType) => {
|
||||
switch (page) {
|
||||
const currentPageComponent = useMemo(() => {
|
||||
switch (currentTourPage) {
|
||||
case CurrentTourPageType.MY_DATA_PAGE:
|
||||
return <MyDataPageV1 />;
|
||||
|
||||
@ -53,7 +53,7 @@ const TourPage = () => {
|
||||
default:
|
||||
return;
|
||||
}
|
||||
};
|
||||
}, [currentTourPage]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -65,7 +65,7 @@ const TourPage = () => {
|
||||
updateTourPage,
|
||||
})}
|
||||
/>
|
||||
{getCurrentPage(currentTourPage)}
|
||||
{currentPageComponent}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
@ -24,267 +24,268 @@ interface ArgObject {
|
||||
clearSearchTerm: () => void;
|
||||
}
|
||||
|
||||
export const getTourSteps = (args: ArgObject) => {
|
||||
const { searchTerm, clearSearchTerm, updateActiveTab, updateTourPage } = args;
|
||||
|
||||
return [
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-activity-feed"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.activity-feed-plural'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: '#feedData',
|
||||
stepInteraction: false,
|
||||
export const getTourSteps = ({
|
||||
searchTerm,
|
||||
clearSearchTerm,
|
||||
updateActiveTab,
|
||||
updateTourPage,
|
||||
}: ArgObject) => [
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-activity-feed"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.activity-feed-plural'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: '#feedData',
|
||||
stepInteraction: false,
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-search-for-matching-dataset"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.search'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: '#searchBox',
|
||||
stepInteraction: false,
|
||||
beforeNext: clearSearchTerm,
|
||||
},
|
||||
{
|
||||
beforePrev: clearSearchTerm,
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-type-search-term"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: searchTerm,
|
||||
enterText: i18next.t('label.enter'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
actionType: 'enter',
|
||||
userTypeText: searchTerm,
|
||||
selector: '#searchBox',
|
||||
beforeNext: () => {
|
||||
clearSearchTerm();
|
||||
updateTourPage(CurrentTourPageType.EXPLORE_PAGE);
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-search-for-matching-dataset"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.search'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: '#searchBox',
|
||||
stepInteraction: false,
|
||||
beforeNext: clearSearchTerm,
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateTourPage(CurrentTourPageType.MY_DATA_PAGE);
|
||||
},
|
||||
{
|
||||
beforePrev: clearSearchTerm,
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-type-search-term"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: searchTerm,
|
||||
enterText: i18next.t('label.enter'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
actionType: 'enter',
|
||||
userTypeText: searchTerm,
|
||||
selector: '#searchBox',
|
||||
beforeNext: () => {
|
||||
clearSearchTerm();
|
||||
updateTourPage(CurrentTourPageType.EXPLORE_PAGE);
|
||||
},
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-explore-summary-asset"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.explore'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: '#tabledatacard0',
|
||||
stepInteraction: false,
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-click-on-link-to-view-more"
|
||||
renderElement={<strong />}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
actionType: 'click',
|
||||
selector: '[data-testid="sample_data.ecommerce_db.shopify.dim_address"]',
|
||||
beforeNext: () => {
|
||||
updateTourPage(CurrentTourPageType.DATASET_PAGE);
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateTourPage(CurrentTourPageType.MY_DATA_PAGE);
|
||||
},
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-explore-summary-asset"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.explore'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: '#tabledatacard0',
|
||||
stepInteraction: false,
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateTourPage(CurrentTourPageType.EXPLORE_PAGE);
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-click-on-link-to-view-more"
|
||||
renderElement={<strong />}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
actionType: 'click',
|
||||
selector: '[data-testid="sample_data.ecommerce_db.shopify.dim_address"]',
|
||||
beforeNext: () => {
|
||||
updateTourPage(CurrentTourPageType.DATASET_PAGE);
|
||||
},
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-high-level-assets-information-step"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.schema'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '[data-testid="entity-page-header"]',
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-owner-step"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.schema'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '[data-testid="owner-label"]',
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-follow-step"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.schema'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '[data-testid="entity-follow-button"]',
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-get-to-know-table-schema"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.schema'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '#schemaDetails',
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateActiveTab(EntityTabs.SCHEMA);
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateTourPage(CurrentTourPageType.EXPLORE_PAGE);
|
||||
},
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-high-level-assets-information-step"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.schema'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '[data-testid="entity-page-header"]',
|
||||
actionType: 'click',
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-click-on-entity-tab"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.sample-data'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: `[data-testid="${EntityTabs.SAMPLE_DATA}"]`,
|
||||
beforeNext: () => {
|
||||
updateActiveTab(EntityTabs.SAMPLE_DATA);
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-owner-step"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.schema'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '[data-testid="owner-label"]',
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-look-at-sample-data"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.sample-data'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: '[data-testid="sample-data-table"]',
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateActiveTab(EntityTabs.SAMPLE_DATA);
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-follow-step"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.schema'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '[data-testid="entity-follow-button"]',
|
||||
beforeNext: () => {
|
||||
updateActiveTab(EntityTabs.PROFILER);
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-get-to-know-table-schema"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.schema'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '#schemaDetails',
|
||||
actionType: 'click',
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-click-on-entity-tab"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.profiler'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: `[data-testid="${EntityTabs.PROFILER}"]`,
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-discover-data-assets-with-data-profile"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.data-entity', {
|
||||
entity: i18next.t('label.profiler'),
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '#profilerDetails',
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateActiveTab(EntityTabs.PROFILER);
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateActiveTab(EntityTabs.SCHEMA);
|
||||
},
|
||||
actionType: 'click',
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-click-on-entity-tab"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.sample-data'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: `[data-testid="${EntityTabs.SAMPLE_DATA}"]`,
|
||||
beforeNext: () => {
|
||||
updateActiveTab(EntityTabs.SAMPLE_DATA);
|
||||
},
|
||||
beforeNext: () => {
|
||||
updateActiveTab(EntityTabs.LINEAGE);
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-look-at-sample-data"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.sample-data'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: '[data-testid="sample-data-table"]',
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateActiveTab(EntityTabs.SAMPLE_DATA);
|
||||
},
|
||||
beforeNext: () => {
|
||||
updateActiveTab(EntityTabs.PROFILER);
|
||||
},
|
||||
actionType: 'click',
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-click-on-entity-tab"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.profiler'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: `[data-testid="${EntityTabs.PROFILER}"]`,
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-discover-data-assets-with-data-profile"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.data-entity', {
|
||||
entity: i18next.t('label.profiler'),
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '#profilerDetails',
|
||||
},
|
||||
{
|
||||
beforePrev: () => {
|
||||
updateActiveTab(EntityTabs.PROFILER);
|
||||
},
|
||||
beforeNext: () => {
|
||||
updateActiveTab(EntityTabs.LINEAGE);
|
||||
},
|
||||
actionType: 'click',
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-click-on-entity-tab"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.lineage'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: `[data-testid="${EntityTabs.LINEAGE}"]`,
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-trace-path-across-tables"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.lineage'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '#lineageDetails',
|
||||
},
|
||||
];
|
||||
};
|
||||
actionType: 'click',
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-click-on-entity-tab"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.lineage'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
selector: `[data-testid="${EntityTabs.LINEAGE}"]`,
|
||||
},
|
||||
{
|
||||
content: () => (
|
||||
<p>
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-trace-path-across-tables"
|
||||
renderElement={<strong />}
|
||||
values={{
|
||||
text: i18next.t('label.lineage'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
),
|
||||
stepInteraction: false,
|
||||
selector: '#lineageDetails',
|
||||
},
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user