Skip to content

Commit

Permalink
refactor: add more resizeable handle margin for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
dulapahv committed Jan 29, 2025
1 parent fecebc0 commit 6cde74d
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions apps/client/src/app/room/[roomId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { useParams, useRouter } from 'next/navigation';

import type { Monaco } from '@monaco-editor/react';
import type * as monaco from 'monaco-editor';
import { isMobile } from 'react-device-detect';

import { CodeServiceMsg, RoomServiceMsg } from '@kasca/types/message';
import type { ExecutionResult } from '@kasca/types/terminal';
Expand Down Expand Up @@ -318,7 +319,10 @@ export default function Room() {
</ResizablePanel>
<ResizableHandle
aria-label="Resize Handle"
hitAreaMargins={{ coarse: 16, fine: 8 }}
hitAreaMargins={{
coarse: isMobile ? 32 : 16,
fine: isMobile ? 16 : 8,
}}
className={cn(
'bg-muted-foreground',
(!monaco || !editor) && 'hidden',
Expand Down Expand Up @@ -355,7 +359,10 @@ export default function Room() {
</ResizablePanel>
<ResizableHandle
aria-label="Resize Handle"
hitAreaMargins={{ coarse: 16, fine: 8 }}
hitAreaMargins={{
coarse: isMobile ? 32 : 16,
fine: isMobile ? 16 : 8,
}}
className={cn(
'bg-muted-foreground',
(!monaco || !editor) && 'hidden',
Expand All @@ -380,7 +387,10 @@ export default function Room() {
</ResizablePanel>
<ResizableHandle
aria-label="Resize Handle"
hitAreaMargins={{ coarse: 16, fine: 8 }}
hitAreaMargins={{
coarse: isMobile ? 32 : 16,
fine: isMobile ? 16 : 8,
}}
className={cn(
'bg-muted-foreground',
(!monaco || !editor) && 'hidden',
Expand All @@ -405,7 +415,10 @@ export default function Room() {
</ResizablePanel>
<ResizableHandle
aria-label="Resize Handle"
hitAreaMargins={{ coarse: 16, fine: 8 }}
hitAreaMargins={{
coarse: isMobile ? 32 : 16,
fine: isMobile ? 16 : 8,
}}
className={cn(
'bg-muted-foreground',
(!monaco || !editor) && 'hidden',
Expand Down

1 comment on commit 6cde74d

@vercel
Copy link

@vercel vercel bot commented on 6cde74d Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kasca-client – ./

kasca.vercel.app
kasca-client-git-main-n0miya.vercel.app
kasca.dulapahv.dev
kasca-client-n0miya.vercel.app

Please sign in to comment.