skiptools / skiptools/skip-ui

Animations won't animate in a lazy container

Open
#219 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug compose
Dominant language
Swift
Stars
330
Forks
76
Avg merge
3h 6m
Merged PRs (30d)
1

Description

https://github.com/skiptools/skipapp-showcase/blob/1a788a2f1e3cf727ba07ac6050eb1611ed7ad633/Sources/Showcase/TransitionPlayground.swift#L48-L59

Text("HStack.animation")
Spacer()
HStack {
    ForEach(0..<count, id: \.self) { i in
        Color.red
            .frame(width: 20, height: 20)
            .id(i + 1)
    }
}
.frame(width: 100, height: 100)
.background(.gray)
.animation(.default, value: count)

Change this HStack into a LazyHStack. Launch the app and click on the grey box or the withAnimation button

Actual: The red dots appear/disappear instantly without animation.

Expected: Changing the HStack into a LazyHStack should have no effect on the animation, or, if it does, there should be an error message somewhere (in the logs, at the very least).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Sources/Showcase/TransitionPlayground.swift at lines 48-59, change the HStack to LazyHStack, launch the app, and reproduce the issue by clicking the grey box or the withAnimation button. Done means the red dots animate when count changes, or a clear error appears in the logs explaining the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.