From fc7d5344557698d573e32af4e42b41b7ad4d1733 Mon Sep 17 00:00:00 2001
From: Anchel123 <110421452+Anchel123@users.noreply.github.com>
Date: Wed, 3 Apr 2024 16:32:49 +0300
Subject: [PATCH 1/6] staling the tables
---
app/graph/DataPanel.tsx | 4 ++--
app/graph/GraphView.tsx | 2 +-
app/graph/tableview.tsx | 8 ++++++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/app/graph/DataPanel.tsx b/app/graph/DataPanel.tsx
index d7ef06d5..da6cd9a8 100644
--- a/app/graph/DataPanel.tsx
+++ b/app/graph/DataPanel.tsx
@@ -5,7 +5,7 @@ export default function DataPanel({node}: {node: Node}) {
return (
-
+
Field
Value
@@ -14,7 +14,7 @@ export default function DataPanel({node}: {node: Node}) {
{
Object.entries(node).map((row, index) => (
// eslint-disable-next-line react/no-array-index-key
-
+
{
Object.values(row).map((cell, cellIndex) => (
// eslint-disable-next-line react/no-array-index-key
diff --git a/app/graph/GraphView.tsx b/app/graph/GraphView.tsx
index f2422f98..17ba0bb4 100644
--- a/app/graph/GraphView.tsx
+++ b/app/graph/GraphView.tsx
@@ -198,7 +198,7 @@ const GraphView = forwardRef(({ graph, darkmode }: GraphViewProps, ref) => {
/>
-
+
{selectedNode && }
diff --git a/app/graph/tableview.tsx b/app/graph/tableview.tsx
index c2a18e1e..c07765e3 100644
--- a/app/graph/tableview.tsx
+++ b/app/graph/tableview.tsx
@@ -1,14 +1,18 @@
import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { Graph } from "./model";
+import { useTheme } from "next-themes";
// eslint-disable-next-line import/prefer-default-export
export function TableView({ graph }: { graph: Graph }) {
+ const { theme, systemTheme} = useTheme()
+ const dark = theme === "dark" || (theme === "system" && systemTheme === "dark")
+
return (
A list of results
-
+
{
graph.Columns.map((column, index) => (
// eslint-disable-next-line react/no-array-index-key
@@ -21,7 +25,7 @@ export function TableView({ graph }: { graph: Graph }) {
{
graph.Data.map((row, index) => (
// eslint-disable-next-line react/no-array-index-key
-
+
{
Object.values(row).map((cell, cellIndex) => (
// eslint-disable-next-line react/no-array-index-key
From e3c42ce98757ddec82c474cb9c2ff21f116f7660 Mon Sep 17 00:00:00 2001
From: Anchel123 <110421452+Anchel123@users.noreply.github.com>
Date: Thu, 4 Apr 2024 10:21:18 +0300
Subject: [PATCH 2/6] build
---
app/graph/tableview.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/graph/tableview.tsx b/app/graph/tableview.tsx
index c07765e3..c38e5ca8 100644
--- a/app/graph/tableview.tsx
+++ b/app/graph/tableview.tsx
@@ -1,7 +1,7 @@
import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
-import { Graph } from "./model";
import { useTheme } from "next-themes";
+import { Graph } from "./model";
// eslint-disable-next-line import/prefer-default-export
export function TableView({ graph }: { graph: Graph }) {
From 218f0d615d3e753d3ccd70f3c27e2700b8a2afd3 Mon Sep 17 00:00:00 2001
From: Anchel123 <110421452+Anchel123@users.noreply.github.com>
Date: Thu, 4 Apr 2024 10:54:02 +0300
Subject: [PATCH 3/6] instead of given every row class name creating class name
and give it to every class row
---
app/graph/DataPanel.tsx | 5 +++--
app/graph/tableview.tsx | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/app/graph/DataPanel.tsx b/app/graph/DataPanel.tsx
index da6cd9a8..24129aa7 100644
--- a/app/graph/DataPanel.tsx
+++ b/app/graph/DataPanel.tsx
@@ -2,10 +2,11 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
export default function DataPanel({node}: {node: Node}) {
+ const rowClass = "dark:hover:bg-slate-700 hover:bg-gray-400 border-y-[1px] border-y-gray-700"
return (
-
+
Field
Value
@@ -14,7 +15,7 @@ export default function DataPanel({node}: {node: Node}) {
{
Object.entries(node).map((row, index) => (
// eslint-disable-next-line react/no-array-index-key
-
+
{
Object.values(row).map((cell, cellIndex) => (
// eslint-disable-next-line react/no-array-index-key
diff --git a/app/graph/tableview.tsx b/app/graph/tableview.tsx
index c38e5ca8..256a5eeb 100644
--- a/app/graph/tableview.tsx
+++ b/app/graph/tableview.tsx
@@ -7,12 +7,12 @@ import { Graph } from "./model";
export function TableView({ graph }: { graph: Graph }) {
const { theme, systemTheme} = useTheme()
const dark = theme === "dark" || (theme === "system" && systemTheme === "dark")
-
+ const rowClass = !dark ? "hover:bg-gray-400" : undefined
return (
A list of results
-
+
{
graph.Columns.map((column, index) => (
// eslint-disable-next-line react/no-array-index-key
@@ -25,7 +25,7 @@ export function TableView({ graph }: { graph: Graph }) {
{
graph.Data.map((row, index) => (
// eslint-disable-next-line react/no-array-index-key
-
+
{
Object.values(row).map((cell, cellIndex) => (
// eslint-disable-next-line react/no-array-index-key
From b61f900e012e15270e63301b948098de4b63ca27 Mon Sep 17 00:00:00 2001
From: Avi Avni
Date: Thu, 4 Apr 2024 12:53:01 +0300
Subject: [PATCH 4/6] fix import
---
app/graph/tableview.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/graph/tableview.tsx b/app/graph/tableview.tsx
index 1acbfdc4..ee72030c 100644
--- a/app/graph/tableview.tsx
+++ b/app/graph/tableview.tsx
@@ -5,6 +5,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/comp
import { JSONTree } from "react-json-tree"
import { transparent } from "tailwindcss/colors";
import { Graph } from "./model";
+import { useTheme } from "next-themes";
// eslint-disable-next-line import/prefer-default-export
export function TableView({ graph }: { graph: Graph }) {
From 0379cde5be4009f260ba8abb0a54f411e0feca41 Mon Sep 17 00:00:00 2001
From: Anchel123 <110421452+Anchel123@users.noreply.github.com>
Date: Thu, 4 Apr 2024 12:54:34 +0300
Subject: [PATCH 5/6] add import to useTheme
---
app/graph/tableview.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/graph/tableview.tsx b/app/graph/tableview.tsx
index 1acbfdc4..ee72030c 100644
--- a/app/graph/tableview.tsx
+++ b/app/graph/tableview.tsx
@@ -5,6 +5,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/comp
import { JSONTree } from "react-json-tree"
import { transparent } from "tailwindcss/colors";
import { Graph } from "./model";
+import { useTheme } from "next-themes";
// eslint-disable-next-line import/prefer-default-export
export function TableView({ graph }: { graph: Graph }) {
From 51b53cff029a46ccb7a075662e67a6767ad31414 Mon Sep 17 00:00:00 2001
From: Anchel123 <110421452+Anchel123@users.noreply.github.com>
Date: Thu, 4 Apr 2024 12:59:02 +0300
Subject: [PATCH 6/6] next-themes import before ./model
---
app/graph/tableview.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/graph/tableview.tsx b/app/graph/tableview.tsx
index ee72030c..6aac60f6 100644
--- a/app/graph/tableview.tsx
+++ b/app/graph/tableview.tsx
@@ -4,8 +4,8 @@ import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, Tabl
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { JSONTree } from "react-json-tree"
import { transparent } from "tailwindcss/colors";
-import { Graph } from "./model";
import { useTheme } from "next-themes";
+import { Graph } from "./model";
// eslint-disable-next-line import/prefer-default-export
export function TableView({ graph }: { graph: Graph }) {