Skip to content

Commit 7e324b5

Browse files
committed
Merge branch 'master' into DX-2190
2 parents 77b8f64 + 2ae2b8b commit 7e324b5

32 files changed

+996
-156
lines changed

bun.lockb

3.82 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"zustand": "5.0.0"
5959
},
6060
"devDependencies": {
61-
"@playwright/test": "^1.53.1",
61+
"@playwright/test": "^1.56.1",
6262
"@types/node": "^22.8.4",
6363
"@types/react": "^18.3.12",
6464
"@types/react-dom": "^18.3.1",

src/components/databrowser/components/databrowser-tabs.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import { restrictToHorizontalAxis } from "@dnd-kit/modifiers"
1515
import { horizontalListSortingStrategy, SortableContext, useSortable } from "@dnd-kit/sortable"
1616
import { CSS } from "@dnd-kit/utilities"
17-
import { IconChevronDown, IconPlus } from "@tabler/icons-react"
17+
import { IconChevronDown, IconMaximize, IconPlus } from "@tabler/icons-react"
1818

1919
import { Button } from "@/components/ui/button"
2020
import {
@@ -122,7 +122,7 @@ const SortableTab = ({ id }: { id: TabId }) => {
122122
)
123123
}
124124

125-
export const DatabrowserTabs = () => {
125+
export const DatabrowserTabs = ({ onFullScreenClick }: { onFullScreenClick?: () => void }) => {
126126
const { tabs, reorderTabs, selectedTab, selectTab } = useDatabrowserStore()
127127

128128
// Sort tabs with pinned tabs first
@@ -262,6 +262,17 @@ export const DatabrowserTabs = () => {
262262
<div className="flex items-center gap-1 pl-1">
263263
{isOverflow && <AddTabButton />}
264264
{tabs.length > 1 && <TabsListButton tabs={tabs} onSelectTab={selectTab} />}
265+
{onFullScreenClick && (
266+
<Button
267+
aria-label="Toggle fullscreen"
268+
variant="secondary"
269+
size="icon-sm"
270+
onClick={onFullScreenClick}
271+
className="flex-shrink-0 bg-blue-100 hover:bg-blue-600 hover:text-white"
272+
>
273+
<IconMaximize size={16} />
274+
</Button>
275+
)}
265276
</div>
266277
</div>
267278
</div>

src/components/databrowser/components/display/delete-alert-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function DeleteAlertDialog({
4242
<AlertDialogFooter>
4343
<AlertDialogCancel type="button">Cancel</AlertDialogCancel>
4444
<AlertDialogAction
45-
className="bg-red-500 text-gray-50 hover:bg-red-600"
45+
className="bg-red-500 text-zinc-50 hover:bg-red-600"
4646
onClick={onDeleteConfirm}
4747
>
4848
Yes, Delete

src/components/databrowser/components/display/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const DataDisplay = () => {
1818
) : !type ? (
1919
query.isLoading ? (
2020
<div className="flex h-full items-center justify-center">
21-
<span className="text-gray-500">Loading...</span>
21+
<span className="text-zinc-500">Loading...</span>
2222
</div>
2323
) : (
2424
<div />

src/components/databrowser/components/display/input/custom-editor.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useEffect, useRef } from "react"
2+
import { useTheme } from "@/dark-mode-context"
23
import { useTab } from "@/tab-provider"
34
import { Editor, useMonaco } from "@monaco-editor/react"
45

@@ -23,6 +24,7 @@ export const CustomEditor = ({
2324
const { active } = useTab()
2425
const monaco = useMonaco()
2526
const editorRef = useRef()
27+
const theme = useTheme()
2628

2729
useEffect(() => {
2830
if (!active || !monaco || !editorRef.current) {
@@ -35,6 +37,7 @@ export const CustomEditor = ({
3537

3638
const editor = (
3739
<Editor
40+
theme={theme === "dark" ? "vs-dark" : "light"}
3841
loading={undefined}
3942
onMount={(editor) => {
4043
// @ts-expect-error not typing the editor type
@@ -68,7 +71,9 @@ export const CustomEditor = ({
6871
scrollBeyondLastLine: false,
6972
renderLineHighlight: "none",
7073
unusualLineTerminators: "auto",
74+
padding: { top: 0, bottom: 0 },
7175
}}
76+
className="[&_.monaco-editor-background]:!bg-transparent [&_.monaco-editor]:!bg-transparent"
7277
/>
7378
)
7479

src/components/databrowser/components/sidebar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function Sidebar() {
2828
<div className="flex gap-1">
2929
<Button
3030
aria-label="Refresh"
31-
className="h-7 w-7 px-0"
31+
className="h-7 w-7 px-0 text-zinc-500"
3232
onClick={() => {
3333
queryClient.invalidateQueries({
3434
queryKey: [FETCH_KEYS_QUERY_KEY],

src/components/databrowser/components/sidebar/keys-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { useTab } from "@/tab-provider"
12
import type { DataType, RedisKey } from "@/types"
23

34
import { cn } from "@/lib/utils"
@@ -6,7 +7,6 @@ import { TypeTag } from "@/components/databrowser/components/type-tag"
67

78
import { useKeys } from "../../hooks/use-keys"
89
import { SidebarContextMenu } from "../sidebar-context-menu"
9-
import { useTab } from "@/tab-provider"
1010

1111
export const KeysList = () => {
1212
const { keys } = useKeys()

src/components/databrowser/components/sidebar/search-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export const SearchInput = () => {
134134
type="button"
135135
variant="link"
136136
size="icon"
137-
className="absolute right-1 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100"
137+
className="absolute right-1 top-1/2 h-5 w-5 -translate-y-1/2 text-zinc-500 hover:text-zinc-900"
138138
onClick={() => {
139139
setSearchKey("")
140140
setState("")

src/components/databrowser/components/type-tag.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import { cva, type VariantProps } from "class-variance-authority"
1313
import { cn } from "@/lib/utils"
1414

1515
const iconsMap = {
16-
string: <IconQuote size={15} stroke={1.3} />,
17-
set: <IconLayersIntersect size={15} stroke={1.3} />,
18-
hash: <IconHash size={15} stroke={1.3} />,
19-
json: <IconCodeDots size={15} stroke={1.3} />,
20-
zset: <IconArrowsSort size={15} stroke={1.3} />,
21-
list: <IconList size={15} stroke={1.3} />,
22-
stream: <IconList size={15} stroke={1.3} />,
16+
string: <IconQuote size={15} stroke={1.2} />,
17+
set: <IconLayersIntersect size={15} stroke={1.2} />,
18+
hash: <IconHash size={15} stroke={1.2} />,
19+
json: <IconCodeDots size={15} stroke={1.2} />,
20+
zset: <IconArrowsSort size={15} stroke={1.2} />,
21+
list: <IconList size={15} stroke={1.2} />,
22+
stream: <IconList size={15} stroke={1.2} />,
2323
} as const
2424

2525
const tagVariants = cva("inline-flex shrink-0 items-center rounded-md justify-center", {

0 commit comments

Comments
 (0)