Skip to content

Commit

Permalink
Misc frontend fixes with router, phenogrid, css (#674)
Browse files Browse the repository at this point in the history
Co-authored-by: glass-ships <glass.ships@outlook.com>
  • Loading branch information
vincerubinetti and glass-ships authored Apr 18, 2024
1 parent a4a582a commit 0761949
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<router-view />
</template>

<template v-else>
<template v-else-if="route.matched.length">
<TheBanner v-if="apiName !== 'prod'">
This web app is the
<strong v-if="apiName === 'local'">LOCAL VERSION</strong>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/api/phenotype-explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ type ObjectSet = { id?: string; label?: string; phenotypes: string[] };
export const compareSetToSets = async (
subjects: string[],
objectSets: ObjectSet[],
metric: string = "jaccard_similarity",
metric?: string,
) => {
/** fill in missing object set fields */
objectSets.forEach((set, index) => {
Expand Down Expand Up @@ -231,6 +231,7 @@ export const compareSetToSets = async (
.filter(Boolean);
const min = Math.min(...scores);
const max = Math.max(...scores);

Object.values(cells).forEach(
(value) =>
(value.strength =
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/AppSelectMulti.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
:id="`option-${id}-${index}`"
:key="index"
v-tooltip="option.tooltip"
:class="['option', { highlighted: highlighted === -1 }]"
:class="['option', { highlighted: highlighted === index }]"
role="option"
:aria-selected="selected.includes(index)"
tabindex="0"
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/explore/PagePhenogridMulticompare.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ watch(
bPhenotypes.value = flatObjectSets.filter(Boolean).map((object) => ({
phenotypes: object?.split(",") || [],
}));
runAnalysis();
}
},
{ immediate: true, deep: true },
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/explore/PagePhenogridSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ watch(
) {
aPhenotypes.value = subjects.split(",");
bGroup.value = objectGroup as Group;
runAnalysis();
}
},
{ immediate: true, deep: true },
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/util/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const frame = async (): Promise<void> =>
/** try to synchronously/immutably log objects/proxies */
export const syncLog = (...args: unknown[]): void => {
try {
console.debug(...JSON.parse(JSON.stringify(args)));
console.log(...JSON.parse(JSON.stringify(args)));
} catch (error) {
console.debug("Couldn't log to console synchronously");
console.debug(...args);
console.log("Couldn't log to console synchronously");
console.log(...args);
}
};

0 comments on commit 0761949

Please sign in to comment.