Skip to content

Commit 73144dc

Browse files
authored
refactor: Improve UI aesthetics with updated tab and card styles, and refactor RenderTree data formatting for hooks. (#89)
1 parent 2aaf3e5 commit 73144dc

File tree

31 files changed

+825
-553
lines changed

31 files changed

+825
-553
lines changed

.changeset/sunny-houses-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik.dev/devtools': patch
3+
---
4+
5+
refactor: Improve UI aesthetics with updated tab and card styles, and refactor RenderTree data formatting for hooks.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,6 @@ testem.log
6464
.DS_Store
6565
Thumbs.db
6666
.vite-inspect
67-
.pnpm-store/*
67+
.pnpm-store/*
68+
qwik/*
69+
.cursor/skills/*

packages/devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@tailwindcss/postcss": "^4.2.1",
3030
"@tailwindcss/vite": "^4.2.1",
3131
"tailwindcss": "^4.2.1",
32-
"vite": "8.0.0"
32+
"vite": ">=7.0.0 <9.0.0"
3333
},
3434
"dependencies": {
3535
"birpc": "^4.0.0",

packages/kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"superjson": "^2.2.6"
2323
},
2424
"peerDependencies": {
25-
"vite": "8.0.0"
25+
"vite": ">=7.0.0 <9.0.0"
2626
},
2727
"devDependencies": {
2828
"@types/eslint": "9.6.1",

packages/ui/src/components/DevtoolsButton/DevtoolsButton.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface DevtoolsButtonProps {
77

88
export const DevtoolsButton = component$((props: DevtoolsButtonProps) => {
99
// Signal for the button's position (distance from bottom-right corner)
10-
const position = useSignal({ x: 16, y: 16 });
10+
const position = useSignal({ x: 24, y: 24 });
1111
// Signal to track if the element is currently being dragged
1212
const isDragging = useSignal(false);
1313
// Ref for the draggable element
@@ -94,15 +94,13 @@ export const DevtoolsButton = component$((props: DevtoolsButtonProps) => {
9494
return (
9595
<div
9696
ref={elementRef}
97-
class={{
98-
'border-border bg-background fixed flex h-9 w-9 origin-center select-none items-center justify-center rounded-lg border backdrop-blur-md':
99-
true,
100-
'border-accent/50 bg-background/95 shadow-accent/35 rotate-90 shadow-lg':
101-
props.state?.isOpen && !isDragging.value,
102-
'cursor-grab': !isDragging.value,
103-
'cursor-grabbing': isDragging.value,
104-
'transition-all duration-300 ease-in-out': !isDragging.value,
105-
}}
97+
class={[
98+
'fixed flex h-14 w-14 origin-center select-none items-center justify-center rounded-full z-[9990]',
99+
props.state?.isOpen && !isDragging.value
100+
? 'glass-button shadow-accent/20 rotate-90 scale-90 opacity-0 pointer-events-none'
101+
: 'glass-button animate-pulsar hover:scale-105 hover:shadow-[0_0_20px_rgba(22,182,246,0.5)] opacity-100',
102+
!isDragging.value ? 'cursor-pointer transition-all duration-500 ease-out' : 'cursor-grabbing scale-95 opacity-80',
103+
]}
106104
style={{
107105
bottom: `${position.value.y}px`,
108106
right: `${position.value.x}px`,
@@ -113,12 +111,12 @@ export const DevtoolsButton = component$((props: DevtoolsButtonProps) => {
113111
onClick$={handleClick}
114112
>
115113
<img
116-
width={20}
117-
height={20}
114+
width={28}
115+
height={28}
118116
src="https://qwik.dev/logos/qwik-logo.svg"
119117
alt="Qwik Logo"
120118
draggable={false}
121-
class="pointer-events-none h-5 w-5 opacity-90 drop-shadow-md"
119+
class="pointer-events-none h-7 w-7 opacity-90 drop-shadow-[0_2px_4px_rgba(0,0,0,0.2)]"
122120
/>
123121
</div>
124122
);

packages/ui/src/components/DevtoolsPanel/DevtoolsPanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ export const DevtoolsPanel = component$(({ state }: DevtoolsPanelProps) => {
3030
return (
3131
<>
3232
<div
33-
class="fixed inset-0 bg-black/40 backdrop-blur-[1px]"
33+
class="fixed inset-0 bg-black/50 backdrop-blur-sm z-[9990] transition-opacity duration-300"
3434
onMouseDown$={() => {
3535
state.isOpen = false;
3636
}}
3737
/>
3838
<div
39-
class="border-border bg-background text-foreground fixed bottom-6 right-6 flex h-[calc(100vh-3rem)] w-[calc(100vw-3rem)] translate-y-0 transform overflow-hidden rounded-lg border-2 backdrop-blur-lg transition-transform duration-300 ease-in-out"
39+
class="glass-panel text-foreground fixed bottom-6 right-6 z-[9991] flex h-[calc(100vh-3rem)] w-[calc(100vw-3rem)] md:w-[90vw] lg:w-[85vw] max-w-7xl animate-slide-up-fade overflow-hidden rounded-2xl transition-transform duration-300 ease-out origin-bottom-right"
4040
>
4141
<button
4242
type="button"
4343
aria-label="Close devtools"
44-
class="border-border bg-background/90 text-muted-foreground hover:text-foreground absolute top-3 right-3 z-10 flex h-9 w-9 items-center justify-center rounded-md border shadow-sm transition-colors cursor-pointer"
44+
class="bg-card-item-bg hover:bg-card-item-hover-bg border-glass-border text-muted-foreground hover:text-foreground absolute top-4 right-4 z-20 flex h-9 w-9 items-center justify-center rounded-full border backdrop-blur-md transition-all hover:scale-105 active:scale-95 cursor-pointer shadow-sm"
4545
onClick$={() => {
4646
state.isOpen = false;
4747
}}

packages/ui/src/components/Tab/Tab.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ interface TabProps {
88
}
99

1010
export const Tab = component$<TabProps>(({ state, id, title }) => {
11+
const isActive = state.activeTab === id;
12+
1113
return (
1214
<button
1315
onClick$={() => (state.activeTab = id)}
1416
title={title}
15-
class={{
16-
'flex h-10 w-10 items-center justify-center rounded-lg p-2.5 transition-all duration-200':
17-
true,
18-
'hover:bg-foreground/5 text-muted-foreground hover:text-foreground bg-transparent':
19-
state.activeTab !== id,
20-
'shadow-accent/35 bg-accent text-white shadow-lg':
21-
state.activeTab === id,
22-
}}
17+
class={[
18+
'relative flex h-11 w-11 items-center justify-center rounded-xl transition-all duration-300 ease-out cursor-pointer select-none',
19+
isActive
20+
? 'bg-primary/15 text-primary'
21+
: 'text-muted-foreground hover:bg-foreground/5 hover:text-foreground'
22+
]}
23+
style={isActive ? { boxShadow: 'inset 3px 0 0 0 var(--color-primary)' } : {}}
2324
>
2425
<Slot />
2526
</button>

packages/ui/src/components/TabContent/TabContent.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { component$, Slot } from '@qwik.dev/core';
22

33
export const TabContent = component$(() => {
44
return (
5-
<div class="flex h-full w-full flex-col space-y-6">
6-
<div class="border-border flex items-center justify-between border-b pb-4">
5+
<div class="flex h-full w-full flex-col space-y-8 animate-slide-up-fade" style="animation-duration: 0.3s; animation-fill-mode: both; animation-delay: 0.1s;">
6+
<div class="border-glass-border flex items-center justify-between border-b pb-4 px-2">
77
<Slot name="title" />
88
</div>
99

10-
<div class="flex-1 overflow-y-auto pb-6">
10+
<div class="custom-scrollbar flex-1 overflow-y-auto px-2 pb-8">
1111
<Slot name="content" />
1212
</div>
1313
</div>

packages/ui/src/components/TabTitle/TabTitle.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ interface TabTitleProps {
55
}
66

77
export const TabTitle = component$(({ title }: TabTitleProps) => {
8-
return <h3 class="text-xl font-semibold">{title}</h3>;
8+
return (
9+
<h3 class="text-2xl font-bold tracking-tight bg-gradient-to-br from-foreground to-muted-foreground bg-clip-text text-transparent">
10+
{title}
11+
</h3>
12+
);
913
});

0 commit comments

Comments
 (0)