Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into scoring
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Sep 17, 2024
2 parents 13dffe3 + c07a888 commit cc1cf78
Show file tree
Hide file tree
Showing 12 changed files with 671 additions and 1,961 deletions.
70 changes: 0 additions & 70 deletions app/caprieval/CaprievalReport.client.css

This file was deleted.

12 changes: 6 additions & 6 deletions app/caprieval/CaprievalReport.client.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import {
ClusterTable,
StructureTable,
} from "@i-vresse/haddock3-analysis-components";
import "./CaprievalReport.client.css";
import { ClusterTable } from "@i-vresse/haddock3-ui/table/ClusterTable";
import { StructureTable } from "@i-vresse/haddock3-ui/table/StructureTable";

import { ScatterPlots } from "./ScatterPlots";
import { useSearchParams } from "@remix-run/react";
import { BoxPlots } from "./BoxPlots";
import type { CaprievalData } from "./caprieval.server";
import { useTheme } from "remix-themes";

/*
* Component has to be client only due
Expand All @@ -16,11 +14,13 @@ import type { CaprievalData } from "./caprieval.server";

export const CaprievalReport = ({ scatters, boxes, table }: CaprievalData) => {
const [searchParams, setSearchParams] = useSearchParams();
const [theme] = useTheme();
const style = { colorScheme: theme === "dark" ? "dark" : "light" };
const hasOtherCluster =
"clusters" in table &&
table.clusters.some((c) => c["cluster_id"] === "Other");
return (
<div className="caprieval-report flex flex-col gap-4">
<div className="caprieval-report flex flex-col gap-4" style={style}>
{"clusters" in table ? (
<ClusterTable {...table} />
) : (
Expand Down
6 changes: 2 additions & 4 deletions app/caprieval/caprieval.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ import {
CAPRIEVAL_SCATTERPLOT_CHOICES,
CAPRIEVAL_BOXPLOT_CHOICES,
} from "./constants";
import type {
ClusterTable,
StructureTable,
} from "@i-vresse/haddock3-analysis-components";
import type { ClusterTable } from "@i-vresse/haddock3-ui/table/ClusterTable";
import type { StructureTable } from "@i-vresse/haddock3-ui/table/StructureTable";
import { BartenderError } from "~/models/errors";
import { getDataFromHtml, getPlotFromHtml } from "~/lib/html";

Expand Down
Loading

0 comments on commit cc1cf78

Please sign in to comment.