Skip to content

add SensoryFeedback API documents#53

Merged
EngOmarElsayed merged 2 commits intoAvdLee:mainfrom
zunda-pixel:add-sensoryFeedback-api-documents
Apr 1, 2026
Merged

add SensoryFeedback API documents#53
EngOmarElsayed merged 2 commits intoAvdLee:mainfrom
zunda-pixel:add-sensoryFeedback-api-documents

Conversation

@zunda-pixel
Copy link
Copy Markdown
Contributor

@zunda-pixel zunda-pixel commented Mar 31, 2026

Add SensoryFeedback API documents.

issue: #52

**Prefer `sensoryFeedback(_:trigger:)` and related overloads instead of `UIImpactFeedbackGenerator`, `UISelectionFeedbackGenerator`, and `UINotificationFeedbackGenerator` in SwiftUI views.**

Attach haptics declaratively to the view that owns the state change, rather than imperatively firing UIKit generators inside button actions.

@zunda-pixel zunda-pixel changed the title add feedback generator API documents add SensoryFeedback API documents Mar 31, 2026
- [ ] `ForEach` uses stable identity (never `.indices` for dynamic content)
- [ ] Constant number of views per `ForEach` element
- [ ] `.animation(_:value:)` always includes the `value` parameter
- [ ] SwiftUI haptics use `sensoryFeedback()` instead of UIKit feedback generators
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

there is no need for adding this in the skill file

Copy link
Copy Markdown
Contributor Author

@zunda-pixel zunda-pixel Apr 1, 2026

Choose a reason for hiding this comment

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


- Consult `references/latest-apis.md` at the start of every task to avoid deprecated APIs
- Prefer native SwiftUI APIs over UIKit/AppKit bridging unless bridging is necessary
- Prefer `sensoryFeedback()` over UIKit feedback generators when working in SwiftUI views
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nor this because the ai has this already
- Consult references/latest-apis.md at the start of every task to avoid deprecated APIs to it will always see the feedback modifier

Copy link
Copy Markdown
Contributor Author

@zunda-pixel zunda-pixel Apr 1, 2026

Choose a reason for hiding this comment

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

Updated operating rules and best practices for SwiftUI development.
@EngOmarElsayed EngOmarElsayed merged commit 604a95a into AvdLee:main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants