Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ πŸ’„ add alert message when form need to be filled #365

Merged
merged 5 commits into from
Sep 23, 2024

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Sep 19, 2024

Original issue description
  • Recipe step making : show alert message when button clicked while form is not completed yet.

Screenshot_20240919_224006

closes #364

- show "Please fill the form" when the "MAKE RECIPE STEP" button is clicked while edittext is empty
Copy link

@ii2001 ii2001 left a comment

Choose a reason for hiding this comment

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

항상 수고 λ§ŽμœΌμ‹­λ‹ˆλ‹€!

λͺ‡κ°€μ§€ 의견 λ‚¨κ²ΌμŠ΅λ‹ˆλ‹€! λ‹΅λ³€ λΆ€νƒλ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€!

Copy link
Contributor

@kmkim2689 kmkim2689 left a comment

Choose a reason for hiding this comment

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

μ•…μ–΄ κ΅¬ν˜„ 고생 λ§ŽμœΌμ…¨μŠ΅λ‹ˆλ‹€!
개인적으둜 μ–΄μƒ‰ν•˜κ²Œ λŠκ»΄μ§€λŠ” 뢀뢄에 λŒ€ν•΄ μ½”λ©˜νŠΈλ₯Ό λ‚¨κ²¨λ“œλ ΈλŠ”λ° μ°Έκ³  λΆ€νƒλ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€.
κ°μ‚¬ν•©λ‹ˆλ‹€!

Comment on lines 182 to 187
@BindingAdapter("bind:content", "bind:visibleCondition")
fun setVisibility(
view: View,
content: String?,
visibleCondition: Boolean,
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

content와 visibleCondition 두 개λ₯Ό λ°›μ•„ λ‹€μ‹œ κ°€μ‹œμ„±μ„ νŒλ‹¨ν•˜λŠ” 바인딩 μ–΄λŒ‘ν„°μ˜ 둜직이 λ­”κ°€ λΆ€μžμ—°μŠ€λŸ¬μ›Œλ³΄μž…λ‹ˆλ‹€.
visibleConditionμ΄λΌλŠ” λ§€κ°œλ³€μˆ˜μ˜ 이름을 μ μ ˆν•œ λ„€μ΄λ°μœΌλ‘œ λ°”κΎΈκ±°λ‚˜, 바인딩 μ–΄λŒ‘ν„° ν•¨μˆ˜κ°€ κ°€μ‹œμ„±μ„ 슀슀둜 νŒλ‹¨ν•  수 μžˆλ„λ‘ ν•˜λ‚˜μ˜ λ§€κ°œλ³€μˆ˜λ§Œ λ°›μ•„μ˜€λŠ” 것이 더 μ’‹μ•„λ³΄μž…λ‹ˆλ‹€!

Copy link

@Hogu59 Hogu59 Sep 21, 2024

Choose a reason for hiding this comment

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

xmlμ—μ„œμ˜ 쑰건문이 쑰금 길어지긴 ν•˜κ² μ§€λ§Œ 기쑴의 bind:visibility ν•¨μˆ˜λ₯Ό ν™œμš©ν•΄μ„œ ν•΄κ²°ν•΄λ‘μ—ˆμŠ΅λ‹ˆλ‹€.

Comment on lines 197 to 203
fun setTimeVisibility(
view: View,
hour: String?,
minute: String?,
second: String?,
visibleCondition: Boolean,
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

μœ„μ™€ 같은 μ˜κ²¬μž…λ‹ˆλ‹€!!

Copy link

Choose a reason for hiding this comment

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

μœ„μ™€ 같이 λ°˜μ˜ν–ˆμŠ΅λ‹ˆλ‹€!

Comment on lines 52 to 54
private val _isButtonClicked: MutableLiveData<Boolean> = MutableLiveData(false)
val isButtonClicked: LiveData<Boolean>
get() = _isButtonClicked
Copy link
Contributor

Choose a reason for hiding this comment

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

이벀트인 만큼, ν•œ 번 μ†ŒλΉ„λ˜λ©΄ 라이브 데이터 λ‚΄λΆ€ 값을 더 이상 μ‚¬μš©ν•˜μ§€ λͺ»ν•˜λ„둝 μ‘°μΉ˜ν•˜λŠ” 것이 μ’‹μ•„λ³΄μž…λ‹ˆλ‹€!

Copy link

Choose a reason for hiding this comment

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

이벀트라면 visibilityλ₯Ό 지속가λŠ₯ν•˜κ²Œ ν•˜κΈ° μ–΄λ €μšΈκ²ƒ 같은데 ν˜Ήμ‹œ μ˜κ²¬μ„ 더 μžμ„Ένžˆ μ„€λͺ…ν•΄μ£Όμ‹€ 수 μžˆμ„κΉŒμš”?

Copy link
Contributor

Choose a reason for hiding this comment

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

ν•΄λ‹Ή νŒŒμΌμ„ λΉ„λ‘―ν•œ λͺ¨λ“  form κ΄€λ ¨ νŒŒμΌλ“€μ— λŒ€ν•œ μ˜κ²¬μž…λ‹ˆλ‹€!

개인적으둜 μƒκ°ν–ˆλ˜ λ°”λŠ” 기쑴의 item_form_~~ νŒŒμΌμ€ κ·ΈλŒ€λ‘œ 두고,
λ‹€μŒκ³Ό 같이 λ³„λ„μ˜ 파일둜 form에 λŒ€ν•œ μ•ˆλ‚΄λ₯Ό λ‘λŠ” λ ˆμ΄μ•„μ›ƒμ„ λ”°λ‘œ λ§Œλ“œλŠ” 것이 더 μ’‹λ‹€κ³  μƒκ°ν–ˆμŠ΅λ‹ˆλ‹€.

μ•„λž˜κ°€ κ·Έ μ˜ˆμ‹œκ°€ 될 수 μžˆκ² λ„€μš”!

// item_form_text_with_notification(?)
<layout>
    <data>
                <variable
                    name="content"
                    type="String" />
        
                <variable
                    name="visibleCondition"
                    type="Boolean" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout>
            <include layout="@layout/item_form_text" content="@{content}" />
            <!-- κ²½κ³  ν…μŠ€νŠΈλ·° -->
            <TextView visibility="@{쑰건}"/>
    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>

κ°€μž₯ 큰 μ΄μœ λŠ”, 양식에 μ œν•œμ„ 두지 μ•ŠλŠ” form이 μ–Έμ œλ“  μ‘΄μž¬ν•  수 μžˆλ‹€λŠ” κ°€λŠ₯성이 μžˆμ„ 것이라 μƒκ°ν•˜μ˜€κΈ° λ•Œλ¬Έμž…λ‹ˆλ‹€.

λ¬Όλ‘  visible condition에 false값을 λ³΄λ‚΄λŠ” 것이 방법이 λ˜κ² μ§€λ§Œ, κ°œμΈμ μœΌλ‘œλŠ” μ‚¬μš©ν•˜μ§€λ„ μ•Šμ„ 값을 λ³΄λ‚΄λŠ” 것을 μ„ ν˜Έν•˜μ§€λŠ” μ•Šμ•„μ„œμš”.

ν•΄λ‹Ή 사항은 μ‹œκ°„μ μΈ μ—¬μœ κ°€ λ˜μ‹ λ‹€λ©΄ 반영 λΆ€νƒλ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€!

Copy link

Choose a reason for hiding this comment

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

반영 μ™„λ£Œμž…λ‹ˆλ‹€!

Copy link
Contributor

@kmkim2689 kmkim2689 left a comment

Choose a reason for hiding this comment

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

μˆ˜κ³ ν•˜μ…¨μŠ΅λ‹ˆλ‹€!

@kmkim2689 kmkim2689 merged commit bd76bf7 into an/dev Sep 23, 2024
2 checks passed
@kmkim2689 kmkim2689 deleted the an/feat/364 branch September 23, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants