Skip to content

Commit

Permalink
Improve documentation conciseness (#26)
Browse files Browse the repository at this point in the history
# Minor documentation improvements

## ♻️ Current situation & Problem
This PR revises the summary header for some of the types to deliver a
more precise documentation catalog.


## ⚙️ Release Notes 
* Improved documentation conciseness 


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
Supereg authored Jan 9, 2024
1 parent dccc827 commit 0137e69
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Sources/SpeziValidation/Views/ValidationResultsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/SpeziViews/Model/ViewState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ private struct ViewStateMapper<T: OperationState>: 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
Expand Down
6 changes: 4 additions & 2 deletions Sources/SpeziViews/Views/HorizontalGeometryReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<Content: View>: View {
Expand Down

0 comments on commit 0137e69

Please sign in to comment.