Skip to content

[#246] TodoEditorView에서 content가 선택 사항임에도 공란이면 추가, 수정이 안되는 이슈를 해결한다#257

Merged
opficdev merged 1 commit intodevelopfrom
fix/#246-TodoEditorView
Mar 11, 2026
Merged

[#246] TodoEditorView에서 content가 선택 사항임에도 공란이면 추가, 수정이 안되는 이슈를 해결한다#257
opficdev merged 1 commit intodevelopfrom
fix/#246-TodoEditorView

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev self-assigned this Mar 11, 2026
@opficdev opficdev merged commit 63210c1 into develop Mar 11, 2026
2 checks passed
@opficdev opficdev deleted the fix/#246-TodoEditorView branch March 11, 2026 11:01
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 TodoEditorView에서 할 일의 content 필드가 비어있을 때 저장 또는 업데이트가 불가능했던 버그를 해결합니다. content 필드는 원래 선택 사항으로 의도되었으나, 유효성 검사 로직 때문에 빈 content를 허용하지 않았습니다. 이번 변경으로 TodoEditorViewModel의 유효성 검사 로직이 수정되어, 할 일 저장 시 title 필드만 비어있지 않으면 유효한 것으로 간주되어 content 필드의 선택적 특성이 올바르게 반영됩니다.

Highlights

  • TodoEditorViewModel 유효성 검사 로직 수정: TodoEditorView에서 content 필드가 선택 사항임에도 불구하고, 해당 필드가 비어있을 경우 할 일 추가 및 수정이 불가능했던 문제를 해결하기 위해 isValidToSave 계산 속성에서 content 필드의 공백 여부 검사를 제거했습니다.
Changelog
  • DevLog/Presentation/ViewModel/TodoEditorViewModel.swift
    • isValidToSave 계산 속성에서 content 필드의 공백 여부 검사를 제거했습니다.
Activity
  • 이슈 #246을 해결했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 TodoEditorView에서 content가 선택 사항임에도 불구하고 비어 있을 경우 항목을 저장할 수 없었던 문제를 해결합니다. isValidToSave 연산 프로퍼티에서 content에 대한 유효성 검사를 제거하여, 이제 제목만 있으면 저장이 가능하도록 수정되었습니다. 변경 사항은 올바르며 의도한 대로 문제를 해결합니다. 코드의 가독성과 재사용성을 높이기 위한 제안을 리뷰 댓글로 남겼습니다.

var isValidToSave: Bool {
!title.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty &&
!content.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
!title.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

현재 로직은 문제 없이 동작하지만, 공백을 제외한 문자열이 비어있는지 확인하는 로직은 다른 곳에서도 사용될 가능성이 높습니다. 코드의 가독성을 높이고 재사용성을 확보하기 위해 String에 대한 확장을 추가하는 것을 고려해보시는 건 어떨까요?

예를 들어, 다음과 같은 isBlank 프로퍼티를 추가할 수 있습니다.

extension String {
    var isBlank: Bool {
        self.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
    }
}

이 확장을 사용하면 isValidToSave를 아래와 같이 더 명확하고 간결하게 표현할 수 있습니다.

var isValidToSave: Bool {
    !title.isBlank
}

이러한 유틸리티 성격의 확장은 별도 파일로 관리하여 프로젝트 전반에서 활용하는 것이 좋습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TodoEditorView에서 content가 선택 사항임에도 공란이면 추가, 수정이 안되는 이슈를 해결한다

1 participant