Skip to content

Commit

Permalink
[ALS-7795] Tour on Discover does not apply a filter (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 authored Nov 20, 2024
1 parent 27cedd0 commit b14b016
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
3 changes: 0 additions & 3 deletions src/lib/assets/TourConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
},
{
"element": "#nav-link-help",
"onDeselected": "removeHighlightClass",
"popover": {
"title": "Help Resources",
"description": "To learn more about PIC-SURE, please consult the <a href='https://pic-sure.gitbook.io/pic-sure' class='anchor' target='_blank'>user guide</a> and <a href='https://www.youtube.com/@pic-sure446/featured' class='anchor' target='_blank'>video</a> demonstrations. You can also find these resources on the help page.",
Expand Down Expand Up @@ -148,7 +147,6 @@
},
{
"element": "#nav-link-help",
"onDeselected": "removeHighlightClass",
"popover": {
"title": "Help Resources",
"description": "To learn more about PIC-SURE, please consult the <a href='https://pic-sure.gitbook.io/nhlbi-biodata-catalyst-powered-by-pic-sure' class='anchor' target='_blank'>user guide</a> and <a href='https://www.youtube.com/playlist?list=PLJ6YccH8TEufZ5L-ctxzFF7vuZRLVacKw' class='anchor' target='_blank'>video</a> demonstrations. You can also find these resources on the help page.",
Expand Down Expand Up @@ -241,7 +239,6 @@
},
{
"element": "#nav-link-help",
"onDeselected": "removeHighlightClass",
"popover": {
"title": "Help Resources",
"description": "To learn more about PIC-SURE, please consult the <a href='https://pic-sure.gitbook.io/nhlbi-biodata-catalyst-powered-by-pic-sure' class='anchor' target='_blank'>user guide</a> and <a href='https://www.youtube.com/playlist?list=PLJ6YccH8TEufZ5L-ctxzFF7vuZRLVacKw' class='anchor' target='_blank'>video</a> demonstrations. You can also find these resources on the help page.",
Expand Down
21 changes: 13 additions & 8 deletions src/lib/components/tour/ExplorerTour.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,25 @@
const applyNumericFilter = (activeRowSelector?: string) => {
const filter = document.querySelector(
`#${activeRowSelector} [data-testid="add-filter"]`,
) as HTMLElement;
) as HTMLInputElement;
filter.click();
tourDriver.moveNext();
};
const clickFilterOption = (activeRowSelector?: string) => {
const allOptions = document.querySelector(
`${activeRowSelector} #select-all`,
`#${activeRowSelector} #select-all`,
) as HTMLInputElement;
allOptions?.click();
const addFilter = document.querySelector(
`${activeRowSelector} [data-testid="add-filter"]`,
) as HTMLElement;
addFilter.click();
tourDriver.moveNext();
setTimeout(() => {
const addFilter = document.querySelector(
`#${activeRowSelector} [data-testid="add-filter"]`,
) as HTMLInputElement;
addFilter?.click();
tourDriver.moveNext();
}, 200);
};
function openDrawer() {
Expand Down Expand Up @@ -157,6 +158,10 @@
serializedStep.onHighlightStarted = functionMap[step.onHighlightStarted];
}
if (step.removeHighlightClass) {
serializedStep.removeHighlightClass = functionMap[step.removeHighlightClass];
}
return serializedStep;
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const features: Indexable = {
variantExplorer: import.meta.env?.VITE_VARIANT_EXPLORER === 'true',
distributionExplorer: import.meta.env?.VITE_DIST_EXPLORER === 'true',
enableTour: import.meta.env?.EXPLORER_TOUR ? import.meta.env?.EXPLORE_TOUR === 'true' : true, // default to true unless set otherwise
authTour: import.meta.env?.VITE_OPEN_TOUR_NAME ?? 'NHANES-Auth',
authTour: import.meta.env?.VITE_AUTH_TOUR_NAME ?? 'NHANES-Auth',
enableHierarchy: import.meta.env?.VITE_ENABLE_HIERARCHY === 'true',
enableTerraExport: import.meta.env?.VITE_ENABLE_TERRA_EXPORT === 'true',
enableSampleIdCheckbox: import.meta.env?.VITE_ENABLE_SAMPLE_ID_CHECKBOX === 'true',
Expand Down

0 comments on commit b14b016

Please sign in to comment.