위임 관리자(부관리자)가 권한·역할·표현식·비밀 콘텐츠 경계를 우회하던 결함군을 계층 대칭성 원칙으로 전건 차단한다. 약한 경로가 정상 응답을 내보내는 것이 유일한 증상이라, 게이트를 생산 지점 한 곳(SSoT)에 두고 같은 데이터를 내보내는 소비 경로 전부가 그 게이트를 경유하도록 맞췄다. - 등급 상한(rank ceiling): 슈퍼관리자 보호·역할/사용자 역할 배정(추가·제거 대칭)·일괄 상태변경·순서변경을 상세 경로와 동일 강도로 재적용. 가드는 DB 쓰기에 선행하여 거부 시 상태 불변. - 레이아웃 표현식: new Function/with 실행을 AST 화이트리스트 평가기로 교체. 비-문자열 computed 키 정규화(normalizeKey)·Object facade(리플렉션 static 제거)·legacy 접근자 차단. 저장측 검증·정적 검사와 3계층 동형. - secret 게이트: 비밀글의 댓글·첨부·문의 독립 경로 재적용, hash 파일서빙 소유권·비밀·발행 상태 검사 통일. - 신뢰 스크립트 호스트: 확장 선언 기반 + same-origin 브라우저 정규화를 런타임·저장측·정적검사 3층 동형화. - 회귀 감지: 단위·Feature·E2E·시나리오 매니페스트 전축 + audit 룰 4종 신설.
99 lines
7.9 KiB
YAML
99 lines
7.9 KiB
YAML
feature: 레이아웃 편집기 chrome 컨트롤 (디바이스 custom width / 툴바 나가기·코드편집·저장 스피너·hover / 오버레이 겹침 회피 / 팔레트 태그)
|
||
phase: 3
|
||
session: S5b-pre
|
||
issue: 383
|
||
# axis 의미:
|
||
# 본 매니페스트가 묶는 것은 "편집기 chrome" 이라는 화면 영역이지 하나의 상호작용
|
||
# 흐름이 아니다. 디바이스 미리보기 / 툴바 / 코드편집기 진입 / 오버레이 배치 / 팔레트는
|
||
# 서로 곱해지지 않는다 (툴바 버튼 상태가 오버레이 배치 판정을 바꾸지 않는다).
|
||
# 그래서 상호작용이 실재하는 축만 axes 에 두고, 나머지는 sub_flows 로 분리한다.
|
||
#
|
||
# axes 로 남긴 것: 미리보기 디바이스 × custom 폭 입력.
|
||
# custom 폭은 device=custom 일 때만 반영되고 그 외 디바이스에서는 무시되어야 하므로
|
||
# 두 축이 실제로 교차한다 (무시 여부가 조합으로 갈린다).
|
||
axes:
|
||
preview_device: [desktop, tablet, mobile, custom]
|
||
custom_width_input: [below_min_320, in_range, above_max_1920]
|
||
exclusions:
|
||
- { preview_device: desktop, custom_width_input: below_min_320,
|
||
reason: "custom 이 아닌 디바이스는 custom 폭을 무시 — 대표로 in_range 1건만 검증" }
|
||
- { preview_device: desktop, custom_width_input: above_max_1920, reason: "동일" }
|
||
- { preview_device: tablet, custom_width_input: below_min_320, reason: "동일" }
|
||
- { preview_device: tablet, custom_width_input: above_max_1920, reason: "동일" }
|
||
- { preview_device: mobile, custom_width_input: below_min_320, reason: "동일" }
|
||
- { preview_device: mobile, custom_width_input: above_max_1920, reason: "동일" }
|
||
|
||
sub_flows:
|
||
- id: toolbar_actions
|
||
description: |
|
||
툴바 버튼(나가기 / 코드편집 / 저장)의 동작과 시각 상태. 미리보기 디바이스와
|
||
곱해지지 않는다 — 어느 디바이스에서 보든 툴바 동작은 같다.
|
||
축: toolbar_action(exit_clean·edit_code_navigate·save_in_progress·save_done) ×
|
||
toolbar_button_state(enabled_hover·disabled_no_hover·focused_after_click) ×
|
||
edited_template_type(user·admin — 나가기 목적지 분기)
|
||
effects:
|
||
- toolbar_exit_navigates_to_template_list_by_type
|
||
- toolbar_edit_code_opens_text_layout_editor_in_new_window_with_route
|
||
- toolbar_save_shows_spinner_while_pending_then_restores
|
||
- toolbar_buttons_hover_transition_when_enabled_not_when_disabled
|
||
- toolbar_buttons_no_residual_focus_outline_after_click
|
||
- id: code_editor_route_sync
|
||
description: |
|
||
코드편집기(텍스트 화면)의 `?route=` 쿼리 동기화. 진입 경로별로 쿼리를 싣거나 비운다.
|
||
축: code_editor_entry(from_wysiwyg_with_route·direct_route_query·file_select_in_editor·extension_select_in_editor)
|
||
effects:
|
||
- code_editor_restores_layout_from_route_query
|
||
- code_editor_file_select_syncs_route_query
|
||
- code_editor_extension_select_clears_route_query
|
||
- id: overlay_affordance_placement
|
||
description: |
|
||
선택 박스 크기에 따른 오버레이 버튼 배치. 툴바·팔레트와 무관한 기하 판정이다.
|
||
축: selected_box_size(normal_ge_44·small_lt_44_width·small_lt_44_height·scaled_small) ×
|
||
affordance_kind(info_menu·base_lock·extension_lock·nav_route_in_tree·nav_unreachable·insertion_cross)
|
||
effects:
|
||
- overlay_affordances_inside_when_box_ge_44
|
||
- overlay_affordances_outside_when_box_lt_44_no_overlap
|
||
- insertion_affordances_cross_layout_when_box_lt_44_no_overlap_no_clip
|
||
- id: palette_entry_badge
|
||
description: |
|
||
팔레트 카드의 React 컴포넌트 태그 배지. 축: palette_entry_type(basic·composite·layout)
|
||
effects:
|
||
- palette_card_shows_react_component_tag_badge
|
||
|
||
effects:
|
||
- preview_custom_device_uses_clamped_input_width_as_override
|
||
- preview_custom_width_clamped_320_to_1920
|
||
- preview_non_custom_ignores_custom_width
|
||
- toolbar_exit_navigates_to_template_list_by_type
|
||
- toolbar_edit_code_opens_text_layout_editor_in_new_window_with_route
|
||
- code_editor_restores_layout_from_route_query
|
||
- code_editor_file_select_syncs_route_query
|
||
- code_editor_extension_select_clears_route_query
|
||
- toolbar_save_shows_spinner_while_pending_then_restores
|
||
- toolbar_buttons_hover_transition_when_enabled_not_when_disabled
|
||
- toolbar_buttons_no_residual_focus_outline_after_click
|
||
- overlay_affordances_inside_when_box_ge_44
|
||
- overlay_affordances_outside_when_box_lt_44_no_overlap
|
||
- insertion_affordances_cross_layout_when_box_lt_44_no_overlap_no_clip
|
||
- palette_card_shows_react_component_tag_badge
|
||
test_files:
|
||
- resources/js/core/template-engine/layout-editor/__tests__/hooks/useDevicePreview.test.ts
|
||
- resources/js/core/template-engine/layout-editor/__tests__/utils/overlayGeometry.affordancePlacement.test.ts
|
||
- resources/js/core/template-engine/layout-editor/__tests__/components/EditorToolbar.test.tsx
|
||
- resources/js/core/template-engine/layout-editor/__tests__/components/ComponentPalette.test.tsx
|
||
- templates/_bundled/sirsoft-basic/src/components/composite/__tests__/Footer.responsive.test.tsx
|
||
- templates/_bundled/sirsoft-admin_basic/__tests__/layouts/admin-template-layout-edit.test.tsx
|
||
- tests/Feature/Services/TemplateServiceRoutesMergeTest.php
|
||
- tests/Feature/Api/Admin/LayoutControllerTest.php
|
||
- tests/Playwright/specs/layout-editor/chrome-controls.spec.ts
|
||
- templates/_bundled/sirsoft-admin_basic/tests/Playwright/specs/admin/code-editor-route-sync.spec.ts
|
||
notes:
|
||
- Footer.responsive.test.tsx 는 편집 가능 템플릿의 G7 표준 responsive 의무(viewport 미디어쿼리 금지) 회귀 가드 — preview_device 축의 디바이스 전환이 CSS 미디어쿼리가 아닌 useResponsive 로 반영됨을 컴포넌트 레벨에서 검증.
|
||
- overlayGeometry.affordancePlacement.test.ts 가 selected_box_size × affordance_kind cross 의 핵심 판정(resolveAffordancePlacement)을 단위로 커버. affordance_kind=insertion_cross 는 resolveInsertionCrossOffsets(박스 중심 십자 배치) 단위 + 2×2 극단 대각 비겹침을 검증.
|
||
- insertion_cross 결함 7 재조사: info/lock/nav 는 박스 우측 바깥 세로 분산(ElementOverlay), 4방향 삽입(+)은 박스 중심 십자(InsertionAffordances). 작은 박스가 캔버스 가장자리에 있을 때 박스 밖 버튼 잘림은 오버레이를 frame(overflow:hidden) 형제 레이어(g7le-overlay-layer, overflow:visible)로 분리해 해결 — chrome-controls.spec.ts 가 비겹침·비잘림·십자 대칭을 브라우저로 가드.
|
||
- chrome-controls.spec.ts(코어) 는 위지윅 chrome 책임만 — toolbar_action(exit/edit_code/save) + preview_device(custom width) + code_editor_entry=from_wysiwyg_with_route(handleEditCode 가 ?route= 를 실어 이탈). 코드편집기(텍스트 화면) 자체 동작은 템플릿 소유이므로 분리.
|
||
- code-editor-route-sync.spec.ts(sirsoft-admin_basic 템플릿) 는 code_editor_entry=direct_route_query(?route= 직접 진입 복원) + 무쿼리 기본 선택 보존을 커버. 코드편집기 레이아웃(admin_template_layout_edit.json)이 템플릿 소유이므로 템플릿 자체 E2E 디렉토리에 위치.
|
||
- edited_template_type 축: 나가기 목적지가 /admin/templates/{type} 로 분기됨. LayoutEditorChrome 이 /api/admin/templates/{id} 로 type 조회(미확정 시 user fallback). E2E 는 user(sirsoft-basic) 경로를 커버하고, admin 분기 단위 가드는 추후 보강.
|
||
- code_editor_entry × route_path: 코드편집기 ?route= ↔ 레이아웃 매핑은 백엔드 TemplateService.getLayoutRoutePathMap 가 SSoT(layouts API route_path). file_select/extension_select 의 replaceUrl 동기화는 admin-template-layout-edit.test.tsx 가 JSON 구조로, direct_route_query 복원은 chrome-controls.spec.ts 가 브라우저로 커버.
|
||
- toolbar_button_state=focused_after_click: 클릭 후 브라우저 기본 focus outline 잔류(검정 테두리) 회귀 가드 — EditorToolbar.test.tsx 가 outline:none 적용을 단위로 검증.
|