From 2b7e4abbc4851effb3f4d934bb1e2cd33bdb5b9e Mon Sep 17 00:00:00 2001 From: opficdev Date: Thu, 12 Mar 2026 11:53:02 +0900 Subject: [PATCH 1/2] =?UTF-8?q?ui:=20=ED=85=8D=EC=8A=A4=ED=8A=B8=ED=95=84?= =?UTF-8?q?=EB=93=9C=20=ED=8F=B0=ED=8A=B8=20=EB=B0=8F=20=EB=AC=B8=EA=B5=AC?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DevLog/Resource/Localizable.xcstrings | 4 ++-- DevLog/UI/Home/TodoEditorView.swift | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/DevLog/Resource/Localizable.xcstrings b/DevLog/Resource/Localizable.xcstrings index 9d149632..2525003c 100644 --- a/DevLog/Resource/Localizable.xcstrings +++ b/DevLog/Resource/Localizable.xcstrings @@ -324,7 +324,7 @@ "생성일" : { }, - "설명(선택 사항)" : { + "설명(선택)" : { }, "설정" : { @@ -400,7 +400,7 @@ } } }, - "제목" : { + "제목(필수)" : { }, "주간 추세" : { diff --git a/DevLog/UI/Home/TodoEditorView.swift b/DevLog/UI/Home/TodoEditorView.swift index 2efc62ae..3b0b5144 100644 --- a/DevLog/UI/Home/TodoEditorView.swift +++ b/DevLog/UI/Home/TodoEditorView.swift @@ -63,9 +63,10 @@ struct TodoEditorView: View { get: { viewModel.state.title }, set: { viewModel.send(.setTitle($0)) } ), - prompt: Text("제목").foregroundColor(Color.gray) + prompt: Text("제목(필수)").foregroundColor(Color.gray) ) - .frame(height: 22) + .font(.title2) + .frame(height: 30) .focused($field, equals: .title) .padding(.horizontal) } @@ -109,9 +110,10 @@ struct TodoEditorView: View { get: { viewModel.state.content }, set: { viewModel.send(.setContent($0)) } ), - prompt: Text("설명(선택 사항)").font(.callout), + prompt: Text("설명(선택)").foregroundColor(Color.gray), axis: .vertical ) + .font(.callout) .focused($field, equals: .description) } else { Markdown(viewModel.state.content) From 0953a2b9ef215df7f30b9a610daf950d10ce1035 Mon Sep 17 00:00:00 2001 From: opficdev Date: Thu, 12 Mar 2026 12:08:59 +0900 Subject: [PATCH 2/2] =?UTF-8?q?ui:=20TodoEditorView=EA=B0=80=20=EB=A7=88?= =?UTF-8?q?=ED=81=AC=EB=8B=A4=EC=9A=B4=EC=9D=84=20=EC=A7=80=EC=9B=90?= =?UTF-8?q?=ED=95=A8=EC=9D=84=20=EC=82=AC=EC=9A=A9=EC=9E=90=EA=B0=80=20?= =?UTF-8?q?=EC=95=8C=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DevLog/Resource/Localizable.xcstrings | 9 +++++ DevLog/UI/Home/TodoEditorView.swift | 55 +++++++++++++++++++-------- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/DevLog/Resource/Localizable.xcstrings b/DevLog/Resource/Localizable.xcstrings index 2525003c..fa7c5b2e 100644 --- a/DevLog/Resource/Localizable.xcstrings +++ b/DevLog/Resource/Localizable.xcstrings @@ -32,6 +32,12 @@ } } } + }, + "Markdown 미리보기" : { + + }, + "Markdown 지원 · 예: # 제목, - 목록, **굵게**" : { + }, "night_sky" : { "extractionState" : "manual", @@ -453,6 +459,9 @@ }, "편집" : { + }, + "편집 탭에서 Markdown으로 작성하면 여기에서 서식이 적용되어 보여요." : { + }, "푸시 알람 활성화" : { diff --git a/DevLog/UI/Home/TodoEditorView.swift b/DevLog/UI/Home/TodoEditorView.swift index 3b0b5144..2c8b0334 100644 --- a/DevLog/UI/Home/TodoEditorView.swift +++ b/DevLog/UI/Home/TodoEditorView.swift @@ -63,7 +63,7 @@ struct TodoEditorView: View { get: { viewModel.state.title }, set: { viewModel.send(.setTitle($0)) } ), - prompt: Text("제목(필수)").foregroundColor(Color.gray) + prompt: Text("제목(필수)").foregroundColor(Color.secondary), ) .font(.title2) .frame(height: 30) @@ -97,33 +97,58 @@ struct TodoEditorView: View { } } .padding(.vertical, 10) - .background(Color(UIColor.systemBackground)) + .background(Color(.systemBackground)) } } private var tabView: some View { Group { if viewModel.state.tabViewTag == .editor { - TextField( - "", - text: Binding( - get: { viewModel.state.content }, - set: { viewModel.send(.setContent($0)) } - ), - prompt: Text("설명(선택)").foregroundColor(Color.gray), - axis: .vertical - ) - .font(.callout) - .focused($field, equals: .description) + VStack(alignment: .leading, spacing: 8) { + markdownHint + TextField( + "", + text: Binding( + get: { viewModel.state.content }, + set: { viewModel.send(.setContent($0)) } + ), + prompt: Text("설명(선택)").foregroundColor(Color.secondary), + axis: .vertical + ) + .font(.callout) + .focused($field, equals: .description) + } } else { - Markdown(viewModel.state.content) - .markdownTheme(.basic) + if viewModel.state.content.isEmpty { + previewPlaceholder + } else { + Markdown(viewModel.state.content) + .markdownTheme(.basic) + } } } .padding(.horizontal) .padding(.top, 10) } + private var markdownHint: some View { + Text("Markdown 지원 · 예: # 제목, - 목록, **굵게**") + .font(.caption) + .foregroundStyle(.secondary) + } + + private var previewPlaceholder: some View { + VStack(alignment: .leading, spacing: 6) { + Text("Markdown 미리보기") + .font(.subheadline.weight(.semibold)) + Text("편집 탭에서 Markdown으로 작성하면 여기에서 서식이 적용되어 보여요.") + .font(.footnote) + .foregroundStyle(.secondary) + } + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.vertical, 8) + } + private var accessoryBar: some View { HStack { Button {