diff --git a/Sources/SpeziValidation/Views/ValidationResultsView.swift b/Sources/SpeziValidation/Views/ValidationResultsView.swift index 1702121..a1f48d0 100644 --- a/Sources/SpeziValidation/Views/ValidationResultsView.swift +++ b/Sources/SpeziValidation/Views/ValidationResultsView.swift @@ -8,7 +8,9 @@ import SwiftUI -/// A view that displays the results of a ``ValidationEngine`` (see ``FailedValidationResult``). +/// A view that displays the results of a ``ValidationEngine``. +/// +/// For more information on the content this view displays, refer to ``FailedValidationResult``. public struct ValidationResultsView: View { private let results: [FailedValidationResult] diff --git a/Sources/SpeziViews/ViewModifier/ViewState/OperationState.swift b/Sources/SpeziViews/Model/OperationState.swift similarity index 90% rename from Sources/SpeziViews/ViewModifier/ViewState/OperationState.swift rename to Sources/SpeziViews/Model/OperationState.swift index 910588e..e813f8e 100644 --- a/Sources/SpeziViews/ViewModifier/ViewState/OperationState.swift +++ b/Sources/SpeziViews/Model/OperationState.swift @@ -7,8 +7,9 @@ // -/// The ``OperationState`` protocol provides a broad meta model for the current state of a specific action or task conducted within the Spezi ecosystem. -/// An ``OperationState`` is based upon a state of a typical finite automata which has a well-defined start and end state, such as an error state or a result state. +/// Provides a meta model for the current state of a specific action or task conducted within the Spezi ecosystem. +/// +/// An `OperationState` is based upon a state of a typical finite automata which has a well-defined start and end state, such as an error state or a result state. /// /// An example conformance to the ``OperationState`` protocol is showcased in the code snippet below which presents the state of a download task. /// diff --git a/Sources/SpeziViews/Model/ViewState.swift b/Sources/SpeziViews/Model/ViewState.swift index 5c93648..a2fb196 100644 --- a/Sources/SpeziViews/Model/ViewState.swift +++ b/Sources/SpeziViews/Model/ViewState.swift @@ -9,7 +9,7 @@ import Foundation -/// The ``ViewState`` allows SwiftUI views to keep track of their state and possible communicate it to outside views, e.g., using `Binding`s. +/// Allows SwiftUI views to keep track of their state and communicate to outside views. public enum ViewState { /// The view is idle and displaying content. case idle diff --git a/Sources/SpeziViews/ViewModifier/ViewState/ViewStateMapper.swift b/Sources/SpeziViews/ViewModifier/ViewState/ViewStateMapper.swift index 63ce689..fb2fb31 100644 --- a/Sources/SpeziViews/ViewModifier/ViewState/ViewStateMapper.swift +++ b/Sources/SpeziViews/ViewModifier/ViewState/ViewStateMapper.swift @@ -31,6 +31,7 @@ private struct ViewStateMapper: ViewModifier { extension View { /// Continuously maps a state conforming to the ``OperationState`` protocol to a separately stored ``ViewState``. + /// /// Used to propagate the ``ViewState`` representation of the ``OperationState`` (so ``OperationState/representation``) to a ``ViewState`` that lives within a SwiftUI `View`. /// /// ### Usage diff --git a/Sources/SpeziViews/Views/HorizontalGeometryReader.swift b/Sources/SpeziViews/Views/HorizontalGeometryReader.swift index c89cac5..71148e0 100644 --- a/Sources/SpeziViews/Views/HorizontalGeometryReader.swift +++ b/Sources/SpeziViews/Views/HorizontalGeometryReader.swift @@ -9,7 +9,7 @@ import SwiftUI -/// The ``WidthPreferenceKey`` enables outer views to get access to the current width calculated by the ``HorizontalGeometryReader`` +/// Enables outer views to get access to the current width calculated by the ``HorizontalGeometryReader`` /// using the SwiftUI preference mechanisms. public struct WidthPreferenceKey: PreferenceKey, Equatable { public static var defaultValue: CGFloat = 0 @@ -19,7 +19,9 @@ public struct WidthPreferenceKey: PreferenceKey, Equatable { } -/// An ``HorizontalGeometryReader`` enables a closure parameter-based and preference-based mechanism to read out the width of a specific view. +/// Read the width of a view. +/// +/// An `HorizontalGeometryReader` enables a closure parameter-based and preference-based mechanism to read out the width of a specific view. /// Refer to ``WidthPreferenceKey`` for using the SwiftUI preference mechanism-based system or the ``HorizontalGeometryReader/init(content:)`` initializer /// for the closure-based approach. public struct HorizontalGeometryReader: View {