fix(admin_basic): 레이아웃 코드 편집 화면의 패널 폭·목록 갱신·버전 이력 도달 범위
리베이스 결과를 브라우저로 검수하다 같은 화면에서 셋을 확인했다. 셋 다 응답에도 콘솔에도 신호가 없고 화면에서만 드러나는 종류다. - 두 카드 어디에도 폭 규약이 없어 flex 가 max-content 비율로 폭을 나눴다. 모듈 파티션 레이아웃의 공백 없는 긴 파일명이 목록의 max-content 를 밀어 올려 편집기가 절반 이하로 눌렸다(실측 목록 814 / 편집기 473 → 384 / 903). 이름은 자르지 않고 접는다 — 잘라내면 어느 파티션인지 구분할 수 없다. - 저장 뒤 상세만 다시 불러서, 방금 저장한 파일의 목록 행이 저장 전 설명·크기·수정일을 그대로 달고 있었다. 목록 응답이 본문을 싣지 않게 된 뒤로 재조회가 수십 KB 라 매 저장마다 부른다. - 서버가 버전 목록에 기본 상한 100 을 도입했는데 이 화면에는 limit 도 '더 보기' 도 없어 상한 밖 버전이 도달 불가였다(실측 114건 중 14건). 페이징이 위지윅 편집기에만 들어가 상한 도입이 이 화면에서는 그대로 기능 축소가 됐다. 회귀는 레이아웃 구조(5건)와 브라우저(6건) 양쪽에서 잠근다. 브라우저 쪽은 수정을 되돌린 상태로 fail 을 먼저 확인했다.
This commit is contained in:
1 parent
b5c0ec1178
commit
4f6fced2db
11 files changed
+599
-28
No files matched your search
@@ -76,7 +76,8 @@
|
||||
"id": "layout_versions",
|
||||
"label_key": "$t:editor.data_source.layout_versions",
|
||||
"type": "api",
|
||||
"endpoint": "/api/admin/templates/{{route.identifier}}/layouts/{{_global.selectedLayoutName}}/versions",
|
||||
"comment": "limit 는 서버 기본 상한(100)과 같은 값에서 출발해 '더 보기' 마다 한 묶음씩 넓힌다. 서버가 상한 조회만 지원하므로(#518) 이 파라미터가 없으면 100건을 넘는 버전은 이 화면에서 도달할 수 없다. 상한 500 은 서버 LayoutVersionListRequest::MAX_LIMIT 과 같아야 하며, 넘기면 목록 전체가 422 가 된다.",
|
||||
"endpoint": "/api/admin/templates/{{route.identifier}}/layouts/{{_global.selectedLayoutName}}/versions?limit={{_global.layoutVersionLimit ?? 100}}",
|
||||
"method": "GET",
|
||||
"auto_fetch": false,
|
||||
"auth_required": true,
|
||||
@@ -229,7 +230,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-regular fa-eye",
|
||||
"className": "w-4 h-4"
|
||||
"className": "text-base"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -312,7 +313,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-regular fa-eye",
|
||||
"className": "w-4 h-4"
|
||||
"className": "text-base"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -330,8 +331,10 @@
|
||||
"name": "Button",
|
||||
"if": "{{_global.selectedNodeKind !== 'extension' && current_layout?.data?.abilities?.can_update !== false}}",
|
||||
"props": {
|
||||
"type": "button",
|
||||
"className": "flex-center gap-2 px-4 py-2 bg-gray-900 dark:bg-white text-white dark:text-gray-900 rounded-lg hover:bg-gray-800 dark:hover:bg-gray-100 transition-colors disabled:opacity-50",
|
||||
"disabled": "{{_global.isSaving}}"
|
||||
"disabled": "{{_global.isSaving}}",
|
||||
"data-testid": "layout-save"
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
@@ -376,6 +379,13 @@
|
||||
"params": {
|
||||
"dataSourceId": "current_layout"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "목록도 함께 다시 부른다 — 파일 목록은 저장으로 바뀌는 값(설명·크기·수정일)을 표시하므로, 상세만 갱신하면 방금 저장한 파일의 행이 저장 전 값으로 남는다. 목록 응답이 본문을 싣지 않게 된 뒤로 재조회 비용이 수십 KB 수준이라 매 저장마다 불러도 된다.",
|
||||
"handler": "refetchDataSource",
|
||||
"params": {
|
||||
"dataSourceId": "layout_files"
|
||||
}
|
||||
}
|
||||
],
|
||||
"onError": [
|
||||
@@ -405,7 +415,7 @@
|
||||
"if": "{{!_global.isSaving}}",
|
||||
"props": {
|
||||
"name": "fa-regular fa-floppy-disk",
|
||||
"className": "w-4 h-4"
|
||||
"className": "text-base"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -510,7 +520,7 @@
|
||||
"if": "{{!_global.isSaving}}",
|
||||
"props": {
|
||||
"name": "fa-regular fa-floppy-disk",
|
||||
"className": "w-4 h-4"
|
||||
"className": "text-base"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -565,7 +575,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-regular fa-folder-open",
|
||||
"className": "text-secondary w-5 h-5"
|
||||
"className": "text-secondary text-xl"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -763,8 +773,9 @@
|
||||
"id": "file_list_card",
|
||||
"type": "basic",
|
||||
"name": "Div",
|
||||
"comment": "파일 목록은 고정 폭(w-96)이다. 폭 규약이 없으면 flex 가 두 카드의 max-content 비율로 나누는데, 모듈 파티션 레이아웃의 긴 파일명(줄바꿈 지점 없는 80자 이상)이 목록의 max-content 를 900px 이상으로 밀어 올려 편집기가 절반 이하로 눌린다.",
|
||||
"props": {
|
||||
"className": "admin-card"
|
||||
"className": "admin-card w-96 shrink-0"
|
||||
},
|
||||
"responsive": {
|
||||
"portable": {
|
||||
@@ -793,7 +804,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-regular fa-folder-open",
|
||||
"className": "text-secondary w-5 h-5"
|
||||
"className": "text-secondary text-xl"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -895,7 +906,7 @@
|
||||
"type": "basic",
|
||||
"name": "Div",
|
||||
"props": {
|
||||
"className": "flex-center gap-2"
|
||||
"className": "flex-center gap-2 min-w-0"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
@@ -903,14 +914,15 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-regular fa-file-code",
|
||||
"className": "w-4 h-4 text-gray-400 dark:text-gray-500"
|
||||
"className": "text-base text-gray-400 dark:text-gray-500"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "basic",
|
||||
"name": "Span",
|
||||
"comment": "break-all — 모듈 파티션 레이아웃 이름은 공백이 없어 기본 줄바꿈 규칙으로는 끊기지 않는다. 자르지 않고 접어서 전체 이름을 보이게 한다(잘라내면 어느 파티션인지 구분 불가).",
|
||||
"props": {
|
||||
"className": "text-primary font-medium text-sm"
|
||||
"className": "text-primary font-medium text-sm break-all"
|
||||
},
|
||||
"text": "{{file.name}}.json"
|
||||
},
|
||||
@@ -928,8 +940,9 @@
|
||||
{
|
||||
"type": "basic",
|
||||
"name": "P",
|
||||
"comment": "설명이 없는 레이아웃은 이름으로 폴백하므로 파일명과 같은 줄바꿈 규칙이 필요하다. break-all 이 없으면 모듈 파티션 이름이 목록에 가로 스크롤을 만든다.",
|
||||
"props": {
|
||||
"className": "form-hint"
|
||||
"className": "form-hint break-all"
|
||||
},
|
||||
"text": "{{raw:file.description || file.name}}"
|
||||
},
|
||||
@@ -1008,7 +1021,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "{{extGroup.source_type === 'plugin' ? 'fa-solid fa-plug' : 'fa-solid fa-puzzle-piece'}}",
|
||||
"className": "w-3.5 h-3.5 text-gray-500 dark:text-gray-400"
|
||||
"className": "text-sm text-gray-500 dark:text-gray-400"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1090,7 +1103,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-solid fa-circle-plus",
|
||||
"className": "w-3.5 h-3.5 text-gray-400 dark:text-gray-500"
|
||||
"className": "text-sm text-gray-400 dark:text-gray-500"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1176,8 +1189,9 @@
|
||||
"id": "editor_card",
|
||||
"type": "basic",
|
||||
"name": "Div",
|
||||
"comment": "편집기는 남는 폭을 전부 가져간다. min-w-0 이 없으면 코드 영역의 긴 줄이 flex 아이템의 최소 폭을 밀어 올려 목록 쪽으로 폭을 되돌려준다.",
|
||||
"props": {
|
||||
"className": "admin-card"
|
||||
"className": "admin-card flex-1 min-w-0"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
@@ -1217,7 +1231,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-regular fa-file-code",
|
||||
"className": "text-secondary w-5 h-5"
|
||||
"className": "text-secondary text-xl"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1297,7 +1311,9 @@
|
||||
"type": "basic",
|
||||
"name": "Button",
|
||||
"props": {
|
||||
"className": "flex-center gap-2 px-3 py-1.5 border border-gray-300 dark:border-gray-600 text-body rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
|
||||
"type": "button",
|
||||
"className": "flex-center gap-2 px-3 py-1.5 border border-gray-300 dark:border-gray-600 text-body rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",
|
||||
"data-testid": "layout-version-history-open"
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
@@ -1321,6 +1337,14 @@
|
||||
},
|
||||
{
|
||||
"then": [
|
||||
{
|
||||
"comment": "모달을 열 때마다 조회 상한을 첫 묶음으로 되돌린다. 남겨두면 이전에 넓혀 둔 상한이 다른 레이아웃의 이력 조회에 그대로 이월된다.",
|
||||
"handler": "setState",
|
||||
"params": {
|
||||
"target": "global",
|
||||
"layoutVersionLimit": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"handler": "refetchDataSource",
|
||||
"params": {
|
||||
@@ -1342,7 +1366,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-solid fa-clock-rotate-left",
|
||||
"className": "w-4 h-4"
|
||||
"className": "text-base"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1408,7 +1432,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "fa-solid fa-circle-info",
|
||||
"className": "w-4 h-4"
|
||||
"className": "text-base"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
+67
-4
@@ -23,7 +23,8 @@
|
||||
"type": "basic",
|
||||
"name": "Div",
|
||||
"props": {
|
||||
"className": "space-y-3 max-h-96 overflow-y-auto"
|
||||
"className": "space-y-3 max-h-96 overflow-y-auto",
|
||||
"data-testid": "layout-version-history-list"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
@@ -36,7 +37,8 @@
|
||||
},
|
||||
"blur_until_loaded": "{{_global.isRestoring}}",
|
||||
"props": {
|
||||
"className": "border border-gray-200 dark:border-gray-700 rounded-lg p-4"
|
||||
"className": "border border-gray-200 dark:border-gray-700 rounded-lg p-4",
|
||||
"data-testid": "layout-version-row-{{version.version ?? idx}}"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
@@ -166,7 +168,7 @@
|
||||
"if": "{{!_global.isRestoring}}",
|
||||
"props": {
|
||||
"name": "refresh",
|
||||
"className": "w-4 h-4"
|
||||
"className": "text-base"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -232,6 +234,67 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "받은 묶음이 상한만큼 꽉 찼으면 더 오래된 버전이 남아 있다는 뜻이라 '더 보기' 를 노출한다. 서버 상한(500)에 도달하면 감춘다 — 더 넓히면 목록 전체가 422 가 되어 보고 있던 이력까지 사라진다.",
|
||||
"if": "{{(layout_versions?.data?.length ?? 0) >= (_global.layoutVersionLimit ?? 100) && (_global.layoutVersionLimit ?? 100) < 500}}",
|
||||
"type": "basic",
|
||||
"name": "Div",
|
||||
"props": {
|
||||
"className": "flex-center justify-center mt-3"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "basic",
|
||||
"name": "Button",
|
||||
"props": {
|
||||
"type": "button",
|
||||
"className": "btn-secondary w-full",
|
||||
"data-testid": "layout-version-history-load-more"
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"type": "click",
|
||||
"handler": "sequence",
|
||||
"params": {
|
||||
"actions": [
|
||||
{
|
||||
"handler": "setState",
|
||||
"params": {
|
||||
"target": "global",
|
||||
"layoutVersionLimit": "{{Math.min((_global.layoutVersionLimit ?? 100) + 100, 500)}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"handler": "refetchDataSource",
|
||||
"params": {
|
||||
"dataSourceId": "layout_versions"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"type": "basic",
|
||||
"name": "Span",
|
||||
"text": "$t:admin.templates.modals.version_history.load_more"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "서버 상한까지 넓혔는데도 묶음이 꽉 차 있으면 더 오래된 버전이 남아 있지만 이 화면에서는 도달할 수 없다. '더 보기' 만 조용히 사라지면 목록이 끝난 것으로 읽히므로 도달 한계를 명시한다.",
|
||||
"if": "{{(layout_versions?.data?.length ?? 0) >= (_global.layoutVersionLimit ?? 100) && (_global.layoutVersionLimit ?? 100) >= 500}}",
|
||||
"type": "basic",
|
||||
"name": "Div",
|
||||
"props": {
|
||||
"className": "text-xs text-secondary text-center mt-3",
|
||||
"data-testid": "layout-version-history-limit-reached"
|
||||
},
|
||||
"text": "$t:admin.templates.modals.version_history.limit_reached"
|
||||
},
|
||||
{
|
||||
"type": "basic",
|
||||
"name": "Div",
|
||||
@@ -251,7 +314,7 @@
|
||||
"name": "Icon",
|
||||
"props": {
|
||||
"name": "info-circle",
|
||||
"className": "w-4 h-4 text-blue-600 dark:text-blue-400"
|
||||
"className": "text-base text-blue-600 dark:text-blue-400"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user