From 47c2879a76ee108426292739d589e995b87d8220 Mon Sep 17 00:00:00 2001 From: opficdev Date: Mon, 23 Nov 2026 16:50:28 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20Todo=20=EC=9E=91=EC=84=B1=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20Markdown=20=EC=95=88=EB=82=B4=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=EB=A5=BC=20=EB=B3=B8=EB=AC=B8=20=EC=B9=B8=20=EC=95=84?= =?UTF-8?q?=EB=9E=98=EC=97=90=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Todo/Editor/TodoEditorView.swift | 87 ++++++++++--------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/Application/Presentation/PresentationShared/Sources/Todo/Editor/TodoEditorView.swift b/Application/Presentation/PresentationShared/Sources/Todo/Editor/TodoEditorView.swift index 138702de..c41ae57e 100644 --- a/Application/Presentation/PresentationShared/Sources/Todo/Editor/TodoEditorView.swift +++ b/Application/Presentation/PresentationShared/Sources/Todo/Editor/TodoEditorView.swift @@ -181,6 +181,20 @@ private struct EditorForm: View { } .contentMargins(.vertical, isiOSAppOnMac ? 12 * AdaptiveSize.boardScale : 16, for: .scrollContent) } + // 안내 문구는 본문 길이와 상관없이 본문 칸 아래에 고정 + .safeAreaInset(edge: .bottom, spacing: 0) { + if store.tabViewTag == .editor { + Text(String(localized: "todo_editor_markdown_hint", bundle: PresentationResources.bundle)) + .font(.adaptive(.caption)) + .foregroundStyle(Color.secondaryLabel) + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.horizontal, isiOSAppOnMac ? 14 * AdaptiveSize.boardScale : 16) + .frame(maxWidth: readableContentWidth) + .padding(.vertical, isiOSAppOnMac ? 8 * AdaptiveSize.boardScale : 8) + .frame(maxWidth: .infinity) + .background(Color.background) + } + } } } @@ -405,42 +419,39 @@ private struct ContentView: View { let isContentFocused = field == .content Group { if store.tabViewTag == .editor { - // 안내 문구를 본문 바로 아래에 표시하고 빈 영역은 바깥 최소 높이로 누를 수 있게 둠 - TextEditorContentLayout(minimumHeight: 0, placesHintBelow: true) { - markdownHint - UIKitTextEditor - .composable( - update: { textEditor in - // Markdown 본문은 고정폭 글꼴로 표시 - // 같은 글꼴을 다시 넣어 긴 본문을 갱신마다 다시 배치하지 않도록 다를 때만 지정 - let font = UIFont.monospacedSystemFont( - ofSize: isiOSAppOnMac ? 12 * AdaptiveSize.boardScale : 13.5, - weight: .regular - ) - if textEditor.font != font { - textEditor.font = font - } - textEditor.updateInput( - text: $store.content, - isFocused: isContentFocused, - onFocusChange: { isFocused in - if isFocused { - field = .content - } else if field == .content { - field = nil - } - }, - placeholder: String( - localized: "todo_editor_description_optional", - bundle: PresentationResources.bundle - ) + // 빈 영역은 바깥 최소 높이로 누를 수 있게 둠 + UIKitTextEditor + .composable( + update: { textEditor in + // Markdown 본문은 고정폭 글꼴로 표시 + // 같은 글꼴을 다시 넣어 긴 본문을 갱신마다 다시 배치하지 않도록 다를 때만 지정 + let font = UIFont.monospacedSystemFont( + ofSize: isiOSAppOnMac ? 12 * AdaptiveSize.boardScale : 13.5, + weight: .regular + ) + if textEditor.font != font { + textEditor.font = font + } + textEditor.updateInput( + text: $store.content, + isFocused: isContentFocused, + onFocusChange: { isFocused in + if isFocused { + field = .content + } else if field == .content { + field = nil + } + }, + placeholder: String( + localized: "todo_editor_description_optional", + bundle: PresentationResources.bundle ) - }, - sizeThatFits: { UIKitTextEditor.fittingSize(proposal: $0, textEditor: $1) } - ) - // SwiftUI 포커싱 시스템에 등록하기 위해 사용 - .focused($field, equals: .content) - } + ) + }, + sizeThatFits: { UIKitTextEditor.fittingSize(proposal: $0, textEditor: $1) } + ) + // SwiftUI 포커싱 시스템에 등록하기 위해 사용 + .focused($field, equals: .content) } else { if store.content.isEmpty { previewPlaceholder @@ -470,12 +481,6 @@ private struct ContentView: View { .contentShape(.rect) } - private var markdownHint: some View { - Text(String(localized: "todo_editor_markdown_hint", bundle: PresentationResources.bundle)) - .font(.adaptive(.caption)) - .foregroundStyle(Color.secondaryLabel) - } - private var previewPlaceholder: some View { VStack(spacing: 8) { Text(String(localized: "todo_editor_markdown_preview_title", bundle: PresentationResources.bundle)) From 4c8b48e14fa9abe6425226aa0aeb153e2b684c42 Mon Sep 17 00:00:00 2001 From: opficdev Date: Mon, 23 Nov 2026 16:50:28 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20Markdown=20=EC=95=88=EB=82=B4=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=EC=9D=98=20=EC=A4=91=EA=B0=84=EC=A0=90?= =?UTF-8?q?=EC=9D=84=20=EA=B4=84=ED=98=B8=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PresentationShared/Resources/Localizable.xcstrings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Presentation/PresentationShared/Resources/Localizable.xcstrings b/Application/Presentation/PresentationShared/Resources/Localizable.xcstrings index 12391d66..9fb80296 100644 --- a/Application/Presentation/PresentationShared/Resources/Localizable.xcstrings +++ b/Application/Presentation/PresentationShared/Resources/Localizable.xcstrings @@ -5272,7 +5272,7 @@ "ko" : { "stringUnit" : { "state" : "translated", - "value" : "Markdown 지원 · 예: # 제목, - 목록, **굵게**, - refs #번호" + "value" : "Markdown 지원 (예: # 제목, - 목록, **굵게**, - refs #번호)" } } } From 79eb5c15242b87eee28588b769f358f4423a1457 Mon Sep 17 00:00:00 2001 From: opficdev Date: Mon, 23 Nov 2026 17:52:17 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20Todo=20=EC=9E=91=EC=84=B1=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20Markdown=20=EC=95=88=EB=82=B4=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=EB=A5=BC=20=EB=B3=B8=EB=AC=B8=20=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=EC=B9=B8=20=EC=9C=84=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Todo/Editor/TodoEditorView.swift | 87 +++++++++---------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/Application/Presentation/PresentationShared/Sources/Todo/Editor/TodoEditorView.swift b/Application/Presentation/PresentationShared/Sources/Todo/Editor/TodoEditorView.swift index c41ae57e..e51cfb16 100644 --- a/Application/Presentation/PresentationShared/Sources/Todo/Editor/TodoEditorView.swift +++ b/Application/Presentation/PresentationShared/Sources/Todo/Editor/TodoEditorView.swift @@ -181,20 +181,6 @@ private struct EditorForm: View { } .contentMargins(.vertical, isiOSAppOnMac ? 12 * AdaptiveSize.boardScale : 16, for: .scrollContent) } - // 안내 문구는 본문 길이와 상관없이 본문 칸 아래에 고정 - .safeAreaInset(edge: .bottom, spacing: 0) { - if store.tabViewTag == .editor { - Text(String(localized: "todo_editor_markdown_hint", bundle: PresentationResources.bundle)) - .font(.adaptive(.caption)) - .foregroundStyle(Color.secondaryLabel) - .frame(maxWidth: .infinity, alignment: .leading) - .padding(.horizontal, isiOSAppOnMac ? 14 * AdaptiveSize.boardScale : 16) - .frame(maxWidth: readableContentWidth) - .padding(.vertical, isiOSAppOnMac ? 8 * AdaptiveSize.boardScale : 8) - .frame(maxWidth: .infinity) - .background(Color.background) - } - } } } @@ -419,39 +405,42 @@ private struct ContentView: View { let isContentFocused = field == .content Group { if store.tabViewTag == .editor { - // 빈 영역은 바깥 최소 높이로 누를 수 있게 둠 - UIKitTextEditor - .composable( - update: { textEditor in - // Markdown 본문은 고정폭 글꼴로 표시 - // 같은 글꼴을 다시 넣어 긴 본문을 갱신마다 다시 배치하지 않도록 다를 때만 지정 - let font = UIFont.monospacedSystemFont( - ofSize: isiOSAppOnMac ? 12 * AdaptiveSize.boardScale : 13.5, - weight: .regular - ) - if textEditor.font != font { - textEditor.font = font - } - textEditor.updateInput( - text: $store.content, - isFocused: isContentFocused, - onFocusChange: { isFocused in - if isFocused { - field = .content - } else if field == .content { - field = nil - } - }, - placeholder: String( - localized: "todo_editor_description_optional", - bundle: PresentationResources.bundle + // 안내 문구를 본문 입력칸 위에 두어 본문과 함께 스크롤하고 빈 영역은 바깥 최소 높이로 누를 수 있게 둠 + TextEditorContentLayout(minimumHeight: 0) { + markdownHint + UIKitTextEditor + .composable( + update: { textEditor in + // Markdown 본문은 고정폭 글꼴로 표시 + // 같은 글꼴을 다시 넣어 긴 본문을 갱신마다 다시 배치하지 않도록 다를 때만 지정 + let font = UIFont.monospacedSystemFont( + ofSize: isiOSAppOnMac ? 12 * AdaptiveSize.boardScale : 13.5, + weight: .regular ) - ) - }, - sizeThatFits: { UIKitTextEditor.fittingSize(proposal: $0, textEditor: $1) } - ) - // SwiftUI 포커싱 시스템에 등록하기 위해 사용 - .focused($field, equals: .content) + if textEditor.font != font { + textEditor.font = font + } + textEditor.updateInput( + text: $store.content, + isFocused: isContentFocused, + onFocusChange: { isFocused in + if isFocused { + field = .content + } else if field == .content { + field = nil + } + }, + placeholder: String( + localized: "todo_editor_description_optional", + bundle: PresentationResources.bundle + ) + ) + }, + sizeThatFits: { UIKitTextEditor.fittingSize(proposal: $0, textEditor: $1) } + ) + // SwiftUI 포커싱 시스템에 등록하기 위해 사용 + .focused($field, equals: .content) + } } else { if store.content.isEmpty { previewPlaceholder @@ -481,6 +470,12 @@ private struct ContentView: View { .contentShape(.rect) } + private var markdownHint: some View { + Text(String(localized: "todo_editor_markdown_hint", bundle: PresentationResources.bundle)) + .font(.adaptive(.caption)) + .foregroundStyle(Color.secondaryLabel) + } + private var previewPlaceholder: some View { VStack(spacing: 8) { Text(String(localized: "todo_editor_markdown_preview_title", bundle: PresentationResources.bundle))