Fix: Tour not moving to different steps (#3198)

This commit is contained in:
Shailesh Parmar 2022-03-07 13:39:22 +05:30 committed by GitHub
parent df5ccc1227
commit 7b4ffb4c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 155 additions and 135 deletions

View File

@ -221,7 +221,7 @@ const ActivityFeedList: FC<ActivityFeedListProp> = ({
}, []); }, []);
return ( return (
<div className={classNames(className)}> <div className={classNames(className)} id="feedData">
{feedList.length > 0 ? ( {feedList.length > 0 ? (
<Fragment> <Fragment>
{relativeDays.map((d, i) => { {relativeDays.map((d, i) => {

View File

@ -15,13 +15,30 @@
export const mockFeedData = [ export const mockFeedData = [
{ {
id: '2b133a6d-8562-4220-a997-eaaa0376cad3', id: '52d52eb1-b990-497f-bf80-47e52c106f85',
href: 'http://localhost:8585/api/v1/feed/2b133a6d-8562-4220-a997-eaaa0376cad3', href: 'http://localhost:8585/api/v1/feed/52d52eb1-b990-497f-bf80-47e52c106f85',
threadTs: 1646577496489, threadTs: 1646631348958,
about: '<#E/table/bigquery_gcp.shopify.dim_staff/description>', about:
entityId: '37e50e09-d5b6-4609-821c-1ed84d92dd57', '<#E/table/bigquery_gcp.shopify.raw_product_catalog/columns/comments/description>',
entityId: '96e80f92-b8ce-456c-8f3c-ee7855e76f43',
createdBy: 'aaron_johnson0', createdBy: 'aaron_johnson0',
updatedAt: 1646577496489, updatedAt: 1646631348959,
updatedBy: 'anonymous',
resolved: false,
message:
'This dimension table contains information about the staff accounts in the store. It contains one row per staff account. Use this table to generate a list of your staff accounts, or join it with the sales, API clients and locations tables to analyze staff performance at Shopify POS locations.',
postsCount: 0,
posts: [],
},
{
id: '60df2514-3bea-4337-a5a2-f0fe5c65237f',
href: 'http://localhost:8585/api/v1/feed/60df2514-3bea-4337-a5a2-f0fe5c65237f',
threadTs: 1646631340215,
about:
'<#E/table/bigquery_gcp.shopify.raw_product_catalog/columns/comments/description>',
entityId: '96e80f92-b8ce-456c-8f3c-ee7855e76f43',
createdBy: 'aaron_johnson0',
updatedAt: 1646631340215,
updatedBy: 'anonymous', updatedBy: 'anonymous',
resolved: false, resolved: false,
message: 'Can you add a description?', message: 'Can you add a description?',
@ -84,87 +101,87 @@ export const mockDatasetData = {
columnProfile: [ columnProfile: [
{ {
name: 'address_id', name: 'address_id',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 9, uniqueCount: 9,
uniqueProportion: 0.52805369, uniqueProportion: 0.52805369,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'shop_id', name: 'shop_id',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 29, uniqueCount: 29,
uniqueProportion: 0.2290940013, uniqueProportion: 0.2290940013,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'first_name', name: 'first_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1327792, uniqueProportion: 0.1327792,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'last_name', name: 'last_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.177126, uniqueProportion: 0.177126,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address1', name: 'address1',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 53, uniqueCount: 53,
uniqueProportion: 0.0396391, uniqueProportion: 0.0396391,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address2', name: 'address2',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 76, uniqueCount: 76,
uniqueProportion: 0.0690369, uniqueProportion: 0.0690369,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'company', name: 'company',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.1210963, uniqueProportion: 0.1210963,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'city', name: 'city',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 6, uniqueCount: 6,
uniqueProportion: 0.024072, uniqueProportion: 0.024072,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'region', name: 'region',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 3, uniqueCount: 3,
uniqueProportion: 0.1478114, uniqueProportion: 0.1478114,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'zip', name: 'zip',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 11, uniqueCount: 11,
uniqueProportion: 0.1383472, uniqueProportion: 0.1383472,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'country', name: 'country',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1601013, uniqueProportion: 0.1601013,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'phone', name: 'phone',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 8, uniqueCount: 8,
uniqueProportion: 0.1297079, uniqueProportion: 0.1297079,
nullCount: 0,
nullProportion: 0,
}, },
], ],
}, },
@ -175,87 +192,87 @@ export const mockDatasetData = {
columnProfile: [ columnProfile: [
{ {
name: 'address_id', name: 'address_id',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 9, uniqueCount: 9,
uniqueProportion: 0.15982599, uniqueProportion: 0.15982599,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'shop_id', name: 'shop_id',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 29, uniqueCount: 29,
uniqueProportion: 0.455669453, uniqueProportion: 0.455669453,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'first_name', name: 'first_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1327792, uniqueProportion: 0.1327792,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'last_name', name: 'last_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.177126, uniqueProportion: 0.177126,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address1', name: 'address1',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 41, uniqueCount: 41,
uniqueProportion: 0.0396391, uniqueProportion: 0.0396391,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address2', name: 'address2',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 15, uniqueCount: 15,
uniqueProportion: 0.0690369, uniqueProportion: 0.0690369,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'company', name: 'company',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.1210963, uniqueProportion: 0.1210963,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'city', name: 'city',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 6, uniqueCount: 6,
uniqueProportion: 0.024072, uniqueProportion: 0.024072,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'region', name: 'region',
missingPercentage: 0.1478114,
missingCount: 3,
uniqueCount: 0, uniqueCount: 0,
uniqueProportion: 0, uniqueProportion: 0,
nullCount: 3,
nullProportion: 0.1478114,
}, },
{ {
name: 'zip', name: 'zip',
missingPercentage: 0.284726178,
missingCount: 11,
uniqueCount: 0, uniqueCount: 0,
uniqueProportion: 0, uniqueProportion: 0,
nullCount: 11,
nullProportion: 0.284726178,
}, },
{ {
name: 'country', name: 'country',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1601013, uniqueProportion: 0.1601013,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'phone', name: 'phone',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 8, uniqueCount: 8,
uniqueProportion: 0.1297079, uniqueProportion: 0.1297079,
nullCount: 0,
nullProportion: 0,
}, },
], ],
}, },
@ -266,87 +283,87 @@ export const mockDatasetData = {
columnProfile: [ columnProfile: [
{ {
name: 'address_id', name: 'address_id',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 9, uniqueCount: 9,
uniqueProportion: 0.78621859, uniqueProportion: 0.78621859,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'shop_id', name: 'shop_id',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 29, uniqueCount: 29,
uniqueProportion: 0.1729116032, uniqueProportion: 0.1729116032,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'first_name', name: 'first_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1327792, uniqueProportion: 0.1327792,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'last_name', name: 'last_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.177126, uniqueProportion: 0.177126,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address1', name: 'address1',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 51, uniqueCount: 51,
uniqueProportion: 0.0396391, uniqueProportion: 0.0396391,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address2', name: 'address2',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 93, uniqueCount: 93,
uniqueProportion: 0.0690369, uniqueProportion: 0.0690369,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'company', name: 'company',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.1210963, uniqueProportion: 0.1210963,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'city', name: 'city',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 6, uniqueCount: 6,
uniqueProportion: 0.024072, uniqueProportion: 0.024072,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'region', name: 'region',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 3, uniqueCount: 3,
uniqueProportion: 0.1478114, uniqueProportion: 0.1478114,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'zip', name: 'zip',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 11, uniqueCount: 11,
uniqueProportion: 0.1383472, uniqueProportion: 0.1383472,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'country', name: 'country',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1601013, uniqueProportion: 0.1601013,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'phone', name: 'phone',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 8, uniqueCount: 8,
uniqueProportion: 0.1297079, uniqueProportion: 0.1297079,
nullCount: 0,
nullProportion: 0,
}, },
], ],
}, },
@ -357,87 +374,87 @@ export const mockDatasetData = {
columnProfile: [ columnProfile: [
{ {
name: 'address_id', name: 'address_id',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 9, uniqueCount: 9,
uniqueProportion: 0.68665925, uniqueProportion: 0.68665925,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'shop_id', name: 'shop_id',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 29, uniqueCount: 29,
uniqueProportion: 0.1079933845, uniqueProportion: 0.1079933845,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'first_name', name: 'first_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1327792, uniqueProportion: 0.1327792,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'last_name', name: 'last_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.177126, uniqueProportion: 0.177126,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address1', name: 'address1',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 35, uniqueCount: 35,
uniqueProportion: 0.0396391, uniqueProportion: 0.0396391,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address2', name: 'address2',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 94, uniqueCount: 94,
uniqueProportion: 0.0690369, uniqueProportion: 0.0690369,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'company', name: 'company',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.1210963, uniqueProportion: 0.1210963,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'city', name: 'city',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 6, uniqueCount: 6,
uniqueProportion: 0.024072, uniqueProportion: 0.024072,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'region', name: 'region',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 3, uniqueCount: 3,
uniqueProportion: 0.1478114, uniqueProportion: 0.1478114,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'zip', name: 'zip',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 11, uniqueCount: 11,
uniqueProportion: 0.1383472, uniqueProportion: 0.1383472,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'country', name: 'country',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1601013, uniqueProportion: 0.1601013,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'phone', name: 'phone',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 8, uniqueCount: 8,
uniqueProportion: 0.1297079, uniqueProportion: 0.1297079,
nullCount: 0,
nullProportion: 0,
}, },
], ],
}, },
@ -448,87 +465,87 @@ export const mockDatasetData = {
columnProfile: [ columnProfile: [
{ {
name: 'address_id', name: 'address_id',
missingPercentage: 0.80217948,
missingCount: 9,
uniqueCount: 0, uniqueCount: 0,
uniqueProportion: 0, uniqueProportion: 0,
nullCount: 9,
nullProportion: 0.80217948,
}, },
{ {
name: 'shop_id', name: 'shop_id',
missingPercentage: 0.170325111,
missingCount: 29,
uniqueCount: 0, uniqueCount: 0,
uniqueProportion: 0, uniqueProportion: 0,
nullCount: 29,
nullProportion: 0.170325111,
}, },
{ {
name: 'first_name', name: 'first_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1327792, uniqueProportion: 0.1327792,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'last_name', name: 'last_name',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.177126, uniqueProportion: 0.177126,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address1', name: 'address1',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 95, uniqueCount: 95,
uniqueProportion: 0.0396391, uniqueProportion: 0.0396391,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'address2', name: 'address2',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 10, uniqueCount: 10,
uniqueProportion: 0.0690369, uniqueProportion: 0.0690369,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'company', name: 'company',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 23, uniqueCount: 23,
uniqueProportion: 0.1210963, uniqueProportion: 0.1210963,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'city', name: 'city',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 6, uniqueCount: 6,
uniqueProportion: 0.024072, uniqueProportion: 0.024072,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'region', name: 'region',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 3, uniqueCount: 3,
uniqueProportion: 0.1478114, uniqueProportion: 0.1478114,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'zip', name: 'zip',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 11, uniqueCount: 11,
uniqueProportion: 0.1383472, uniqueProportion: 0.1383472,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'country', name: 'country',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 13, uniqueCount: 13,
uniqueProportion: 0.1601013, uniqueProportion: 0.1601013,
nullCount: 0,
nullProportion: 0,
}, },
{ {
name: 'phone', name: 'phone',
missingPercentage: 0,
missingCount: 0,
uniqueCount: 8, uniqueCount: 8,
uniqueProportion: 0.1297079, uniqueProportion: 0.1297079,
nullCount: 0,
nullProportion: 0,
}, },
], ],
}, },

View File

@ -14,6 +14,7 @@
import React from 'react'; import React from 'react';
import AppState from '../AppState'; import AppState from '../AppState';
import { CurrentTourPageType } from '../enums/tour.enum'; import { CurrentTourPageType } from '../enums/tour.enum';
import { getCurrentDatasetTab } from './DatasetDetailsUtils';
export const getSteps = (value: string, clearSearchTerm: () => void) => { export const getSteps = (value: string, clearSearchTerm: () => void) => {
return [ return [
@ -110,7 +111,7 @@ export const getSteps = (value: string, clearSearchTerm: () => void) => {
}, },
{ {
beforePrev: () => { beforePrev: () => {
AppState.activeTabforTourDatasetPage = 1; AppState.activeTabforTourDatasetPage = getCurrentDatasetTab('schema');
}, },
actionType: 'click', actionType: 'click',
content: () => ( content: () => (
@ -120,7 +121,8 @@ export const getSteps = (value: string, clearSearchTerm: () => void) => {
), ),
selector: '#sampleData', selector: '#sampleData',
beforeNext: () => { beforeNext: () => {
AppState.activeTabforTourDatasetPage = 2; AppState.activeTabforTourDatasetPage =
getCurrentDatasetTab('sample_data');
}, },
}, },
{ {
@ -134,10 +136,11 @@ export const getSteps = (value: string, clearSearchTerm: () => void) => {
}, },
{ {
beforePrev: () => { beforePrev: () => {
AppState.activeTabforTourDatasetPage = 2; AppState.activeTabforTourDatasetPage =
getCurrentDatasetTab('sample_data');
}, },
beforeNext: () => { beforeNext: () => {
AppState.activeTabforTourDatasetPage = 3; AppState.activeTabforTourDatasetPage = getCurrentDatasetTab('profiler');
}, },
actionType: 'click', actionType: 'click',
content: () => ( content: () => (
@ -160,10 +163,10 @@ export const getSteps = (value: string, clearSearchTerm: () => void) => {
}, },
{ {
beforePrev: () => { beforePrev: () => {
AppState.activeTabforTourDatasetPage = 3; AppState.activeTabforTourDatasetPage = getCurrentDatasetTab('profiler');
}, },
beforeNext: () => { beforeNext: () => {
AppState.activeTabforTourDatasetPage = 4; AppState.activeTabforTourDatasetPage = getCurrentDatasetTab('lineage');
}, },
actionType: 'click', actionType: 'click',
content: () => ( content: () => (
@ -185,7 +188,7 @@ export const getSteps = (value: string, clearSearchTerm: () => void) => {
}, },
{ {
beforeNext: () => { beforeNext: () => {
AppState.activeTabforTourDatasetPage = 6; AppState.activeTabforTourDatasetPage = getCurrentDatasetTab('manage');
}, },
actionType: 'click', actionType: 'click',
content: () => ( content: () => (
@ -197,7 +200,7 @@ export const getSteps = (value: string, clearSearchTerm: () => void) => {
}, },
{ {
beforePrev: () => { beforePrev: () => {
AppState.activeTabforTourDatasetPage = 4; AppState.activeTabforTourDatasetPage = getCurrentDatasetTab('lineage');
}, },
content: () => ( content: () => (
<p> <p>