feat(프로젝트): 설명란 하이퍼링크 글자 크기·굵기 변경

- 링크는 한 글자처럼 잠겨(contenteditable=false) execCommand 서식이 안 들어갔다
- 고른 범위의 링크는 링크 안쪽 span style 로 크기(글자 크기 도구)·굵기(굵게 버튼·Ctrl+B)
- 링크 기본이 굵게라 보통 = font-weight: 400, 서버 desc_inline_style 이 400 만 허용
- 글자와 같이 고르면 글자에 적용된 굵기를 따름
- project.js 캐시 버전 20261030b, 브라우저·sanitize 테스트 추가

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 15:41:47 +09:00
parent 945b81ab4a
commit f904d5935c
14 changed files with 117 additions and 9 deletions
+4
View File
@@ -80,6 +80,10 @@
- **업무를 옮기면 드라이브 파일도 이동**(2026-10-20): 섹션·프로젝트·상위 업무가 바뀌면(`api_update_task`·`move-parent`·`move-project`, `_drive_path_changed`) 백그라운드 `_relocate_drive_files` 가 업무+하위 전체(`db.task_subtree_ids`)의 설명 링크 파일을 새 폴더로(`GoogleDriveFiles.move_to` — appProperties `dbxTaskId` 가 그 업무인 파일만). 제목 변경은 안 옮김, 예전 폴더는 남김.
- 그 밖의 업무 창 자리 → 예전처럼 첨부(`POST …/attachments`, `uploadTaskFiles`).
- 설명란 서식 도구에 글자 색·크기(서버는 span style 의 color·font-size 만 허용, `desc_inline_style`). 주소 붙여넣기 시 자동 링크. 설명란 링크 = 굵게·기울임·밑줄 + 한 글자처럼(2026-10-19 — `normalizeEditorLinks` 가 `contenteditable=false`, 링크 바로 뒤 Backspace·앞 Delete = 링크 통째로 `execCommand delete`(Ctrl+Z 가능), 저장 HTML 에선 `getHtml` 이 잠금 표시를 뺀다). 설명란 이미지 더블클릭 = 별도 창 이미지 보기(확대·축소·끌어 이동).
**링크 서식 = 크기·굵기만**(2026-10-30) — 잠긴 링크라 execCommand 가 안에 안 들어가, 고른 범위에 걸친 링크는 링크 안쪽 `<span style>` 하나로(`setLinkStyle`):
크기 = 글자 크기 도구 그대로, 굵기 = 굵게 버튼·Ctrl+B(`boldWithLinks` — 링크 기본이 굵게라 "보통" = `font-weight: 400`, 서버 `desc_inline_style` 은 400 만 받음).
글자와 같이 고르면 execCommand 가 글자에 만든 굵기를 따름(잠긴 링크가 끼면 queryCommandState 가 틀려 글자 노드 계산값으로). 링크 서식 변경은 Ctrl+Z 안 됨.
테스트 `tests/js/board_drive.browser.test.js` 6), `tests/test_project_icons_desc_style.py`.
- 설명란·댓글에서 @로 멤버 태그(`task_mentions`, 마이그레이션 006) → 수신함에 그 작업이 쌓임. 댓글 `@아이디` 는 아이콘+이름 칩.
- 댓글·답글 입력칸은 Enter 등록·Shift+Enter 줄바꿈(textarea).
- 댓글 답글·이모티콘 반응(마이그레이션 012 `task_comments.parent_id`·`task_comment_reactions`, 미적용 시 버튼 숨김·API 503). 반응 = 댓글 쓴 사람에게 알림(`type=reaction`).
+3
View File
@@ -973,6 +973,9 @@ def desc_inline_style(value: str) -> str:
kept.append(f"color: {val}")
elif prop == "font-size" and val in DESC_FONT_SIZES and not any(k.startswith("font-size:") for k in kept):
kept.append(f"font-size: {val}")
# 링크 굵기 "보통"(2026-10-30) — 링크 기본이 굵게라 보통으로 되돌릴 때만 쓴다(굵게는 값 없음)
elif prop == "font-weight" and val in ("400", "normal") and not any(k.startswith("font-weight:") for k in kept):
kept.append("font-weight: 400")
return "; ".join(kept)
@@ -289,5 +289,5 @@
<script src="/static/project-goal-text.js?v=20261026a" defer></script>
<script src="/static/project-meeting-cells.js?v=20261012a" defer></script>
<script src="/static/project.js?v=20261030a" defer></script>
<script src="/static/project.js?v=20261030b" defer></script>
{% endblock %}
@@ -207,5 +207,5 @@
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project-goal-text.js?v=20261026a" defer></script>
<script src="/static/project.js?v=20261030a" defer></script>
<script src="/static/project.js?v=20261030b" defer></script>
{% endblock %}
@@ -106,5 +106,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261030a" defer></script>
<script src="/static/project.js?v=20261030b" defer></script>
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20261030a" defer></script>
<script src="/static/project.js?v=20261030b" defer></script>
{% endblock %}
@@ -108,5 +108,5 @@
});
})();
</script>
<script src="/static/project.js?v=20261030a" defer></script>
<script src="/static/project.js?v=20261030b" defer></script>
{% endblock %}
@@ -476,5 +476,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261030a" defer></script>
<script src="/static/project.js?v=20261030b" defer></script>
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261030a" defer></script>
<script src="/static/project.js?v=20261030b" defer></script>
{% endblock %}