Unverified Commit 437f0c16 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

[devtools] panel ui responsiveness (#80732)

https://github.com/user-attachments/assets/a15165f2-e340-4ec6-a3e1-a895bfac1531



Closes NEXT-4548
parent 92561090
......@@ -72,6 +72,7 @@ export function DevToolsPanel({
onClick={onCloseDevToolsPanel}
/>
<Draggable
data-nextjs-devtools-panel-draggable
padding={INDICATOR_PADDING}
onDragStart={() => {}}
position={state.devToolsPosition}
......@@ -160,6 +161,23 @@ export const DEVTOOLS_PANEL_STYLES = css`
margin: auto;
/* TODO: This is for fullscreen mode. */
/* top: 10vh; */
@media (max-width: 575px) {
left: 20px !important;
right: 20px !important;
}
@media (min-width: 576px) {
max-width: 540px;
}
@media (min-width: 768px) {
max-width: 720px;
}
@media (min-width: 992px) {
max-width: 960px;
}
}
[data-nextjs-devtools-panel-overlay-backdrop] {
......@@ -167,6 +185,11 @@ export const DEVTOOLS_PANEL_STYLES = css`
opacity: 0;
}
[data-nextjs-devtools-panel-draggable] {
/* For responsiveness */
width: 100%;
}
[data-nextjs-devtools-panel-dialog] {
-webkit-font-smoothing: antialiased;
display: flex;
......@@ -178,12 +201,9 @@ export const DEVTOOLS_PANEL_STYLES = css`
box-shadow: var(--shadow-lg);
position: relative;
overflow-y: auto;
/* TODO: Remove once the content is filled. */
min-width: 800px;
min-height: 500px;
/* This is handled from dialog/styles.ts */
max-width: var(--next-dialog-max-width);
width: 100%;
max-height: 50vh;
min-height: 450px;
}
[data-nextjs-devtools-panel-header] {
......
......@@ -17,6 +17,7 @@ export function Draggable({
position: currentCorner,
setPosition: setCurrentCorner,
onDragStart,
...props
}: {
children: React.ReactElement
position: Corners
......@@ -121,7 +122,7 @@ export function Draggable({
}
return (
<div ref={ref} {...drag} style={{ touchAction: 'none' }}>
<div {...props} ref={ref} {...drag} style={{ touchAction: 'none' }}>
{children}
</div>
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment