From 1bd49d9dd11846fe527ab76256d618ccc0aca280 Mon Sep 17 00:00:00 2001 From: Fernando Fernandes Date: Thu, 15 Oct 2026 13:04:57 +0200 Subject: [PATCH] Guide size-based ScrollView bounce behavior --- .agents/skills/agent-guidelines-audit/SKILL.md | 1 + CHANGELOG.md | 7 +++++++ Guidelines/Swift/SwiftUI.md | 7 +++++++ README.md | 4 ++-- VERSION | 2 +- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.agents/skills/agent-guidelines-audit/SKILL.md b/.agents/skills/agent-guidelines-audit/SKILL.md index 78be404..05bf9c6 100644 --- a/.agents/skills/agent-guidelines-audit/SKILL.md +++ b/.agents/skills/agent-guidelines-audit/SKILL.md @@ -28,6 +28,7 @@ Review the actual change rather than only checking whether files exist: - For Redux applications, trace actions, state, reducers, middleware, services, tools, presentation models, views, and side-effect results through the complete data flow. Confirm each Redux component folder contains only that component type. - Check that framework objects, persistence, logging, and asynchronous work remain in their allowed boundaries. - Check SwiftUI composition, narrow inputs, local versus durable state, localization, accessibility, and safe deterministic previews where applicable. +- For each new or changed SwiftUI `ScrollView`, apply the shared [scrolling guidance](../../../Guidelines/Swift/SwiftUI.md#scrolling): verify `.scrollBounceBehavior(.basedOnSize)` covers its scrolling axes on supported deployment targets, including scroll views in modal sheets. Check the modifier's environment scope around nested scrollables and require a documented interaction reason for a different bounce behavior. - Perform the mandatory [native-component and presentation decision check](#audit-native-components-and-presentation) for changed SwiftUI controls and presentation behavior. - Check tests for the required framework, mirrored paths, shared tags, Given/When/Then structure, deterministic seams, and coverage of changed behavior and failure paths. - Trace every new or changed stateful, asynchronous, fallible, or lifecycle-oriented behavior and verify that its owning artifact emits privacy-safe AppLogger events for the meaningful success, failure, cancellation, recovery, and state-transition outcomes needed to diagnose it. Dependency declaration and target linkage alone do not establish logging coverage. Accept silence for pure values or utilities only when there is no meaningful event boundary and the implementation handoff records that deliberate decision. diff --git a/CHANGELOG.md b/CHANGELOG.md index 56acdb9..b116dde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project are documented in this file. +## [0.0.38] - 2026-10-15 + +### Added + +- Made size-based scroll bounce the SwiftUI `ScrollView` default on supported deployment targets, with axis and environment-scope guidance for nested scrolling and modal sheets. +- Added a completion-audit check for new or changed `ScrollView` bounce behavior and documented exceptions. + ## [0.0.37] - 2026-10-14 ### Added diff --git a/Guidelines/Swift/SwiftUI.md b/Guidelines/Swift/SwiftUI.md index ff8651d..450c112 100644 --- a/Guidelines/Swift/SwiftUI.md +++ b/Guidelines/Swift/SwiftUI.md @@ -43,6 +43,13 @@ With SDKs where `@State` is a macro, do not give a state property a declaration - Avoid unstable environment defaults and freshly created closures that invalidate large subtrees. - Do not hide unstable values behind fake `Equatable` implementations. +## Scrolling + +- Apply `.scrollBounceBehavior(.basedOnSize)` to new or changed `ScrollView` instances on supported deployment targets, especially inside modally presented sheets. Content that fits should stay still; content that exceeds the viewport can still scroll and bounce. +- Match the modifier's `axes` to the scroll view. The default affects only the vertical axis, so specify `.horizontal` for horizontal scrolling and both axes when needed. +- Keep the modifier on the intended scroll view or its narrowest suitable container. The setting propagates through the environment to descendant scrollable views, so check nested scrolling before applying it to a broader hierarchy. +- Preserve a different bounce behavior only when the supported interaction requires it, and record that reason in consumer guidance. Check Apple API availability for the consumer's deployment targets before applying the modifier. + ## Modern APIs and scope - Do not introduce APIs that current Xcode documentation identifies as deprecated or soft-deprecated. diff --git a/README.md b/README.md index 02b631e..85b73db 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ From the consumer repository root, install a tagged release: git subtree add \ --prefix=AgentGuidelines \ https://github.com/thatfactory/agent-guidelines.git \ - 0.0.37 \ + 0.0.38 \ --squash ``` @@ -147,7 +147,7 @@ Review the target release's changelog, then pull it deliberately: git subtree pull \ --prefix=AgentGuidelines \ https://github.com/thatfactory/agent-guidelines.git \ - 0.0.37 \ + 0.0.38 \ --squash ``` diff --git a/VERSION b/VERSION index 1435d6c..e4a35e8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.37 +0.0.38