HStack neighbors don't slide in properly when removing a view
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 330
- Forks
- 76
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 1
Description
Consider this repro branch of the Skip Lite Showcase https://github.com/dfabulich/skipapp-showcase/tree/removeable-animation-repro
https://github.com/dfabulich/skipapp-showcase/commit/3c12f1861931bc9a4643688742790467e22e0aea
HStack {
Text("Removable views")
Spacer()
HStack {
ForEach(removableViews, id: \.self) { i in
Color.red
.frame(width: 20, height: 20)
.id(i + 1)
.onTapGesture {
withAnimation {
removableViews.removeAll { $0 == i }
}
}
}
}
.frame(width: 100, height: 100)
.background(.gray)
}
Button("reset removeables") {
withAnimation {
removableViews = Array(0..<3)
}
}
Click on the middle red box on Android.
Expected: When I click on the red boxes on iOS, the neighbors slide around to their destination, e.g. when I click on the middle red box, the left and right boxes slide in.
Actual: When I click on the red boxes on Android, the box fades away, and then the neighbor boxes instantly teleport to their destination, without animating.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Skip Lite Showcase repro branch and commit, then run the HStack example on Android and compare it with iOS. Focus on the removal animation triggered by tapping the middle red box; done means the remaining neighbors slide to their new positions instead of teleporting after the box fades.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, swift
- Domain
- frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100