Skip to content

Commit

Permalink
Add missing docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmorgan committed Jun 17, 2024
1 parent c37e883 commit cf140c8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package com.joinforage.forage.android.core.ui.element.state

// TODO: docstrings
/**
* An interface that represents the `EditText` state of the [ForageElement][com.joinforage.forage.android.core.ui.ForageElement]
* as the customer interacts with it.
* @property isFocused Whether the Element is in focus.
* @property isBlurred Whether the Element is blurred.
*/
interface EditTextState : ElementState {
val isFocused: Boolean
val isBlurred: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ package com.joinforage.forage.android.core.ui.element.state

import com.joinforage.forage.android.core.ui.element.ElementValidationError

// TODO: docstrings
/**
* An interface that represents the state of the [ForageElement][com.joinforage.forage.android.core.ui.ForageElement]
* as the customer interacts with it.
* @property isEmpty Whether the input value of the Element is empty.
* @property isValid Whether the input text fails any validation checks, with the exception of the
* target length constraint.
* @property isComplete Whether the text field of the Element is ready to submit. This is `true`
* when all input value validation constraints are satisfied.
* @property validationError An [ElementValidationError], if `isValid` is `false`.
* @see [EditTextState]
*/
interface ElementState {
val isEmpty: Boolean
val isValid: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import com.joinforage.forage.android.core.ui.element.ElementValidationError
import com.joinforage.forage.android.core.ui.element.state.EditTextState
import com.joinforage.forage.android.core.ui.element.state.FocusState

// TODO: docstrings
/**
* An interface that represents the state of a
* [ForagePINEditText][com.joinforage.forage.android.core.ui.ForagePINEditText] Element.
* @see [EditTextState][com.joinforage.forage.android.core.ui.element.state.EditTextState]
*/
interface PinEditTextState : EditTextState {
companion object {
internal fun from(focusState: FocusState, inputState: PinInputState) = object :
Expand Down

0 comments on commit cf140c8

Please sign in to comment.