Skip to content

Added unbound DisclosureGroup constructors and fixed animated updates - #507

Open
fhasse95 wants to merge 1 commit into
skiptools:mainfrom
fhasse95:DisclosureGroup-Bugfixes
Open

Added unbound DisclosureGroup constructors and fixed animated updates#507
fhasse95 wants to merge 1 commit into
skiptools:mainfrom
fhasse95:DisclosureGroup-Bugfixes

Conversation

@fhasse95

@fhasse95 fhasse95 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for using DisclosureGroup without an external isExpanded binding. When no binding is provided, DisclosureGroup now manages its expansion state internally, similar to other controls like Picker.

Example:

DisclosureGroup("Title") {
    Text("Content")
}

It also fixes DisclosureGroup animations when used inside Form and List. As part of this, List now uses stable row and section keys for animated updates, fixing the visual artifacts that could appear when rows were inserted or removed. This improves not only expanding and collapsing DisclosureGroups, but also animated List updates in general, for example when rows are inserted or removed during an animated state change.

The behavior after the bugfix can be verified in the FormPlayground of the Skip Showcase app:

Before:
Before

The DisclosureGroup animation was not fully consistent and could jump during expansion or collapse, which caused visual artifacts in the following list rows.

After:
After

After this fix, the animation is consistent: list rows are inserted correctly, the trailing disclosure indicator rotates as expected, and following rows move without visual artifacts.

Related PR:


Thank you for contributing to the Skip project! Please review the contribution guide at https://skip.dev/docs/contributing/ for advice and guidance on making high-quality PRs.

Use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable)
  • OPTIONAL: I have added an example of any UI changes to the Showcase sample app

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

The initial implementation was generated with assistance from Codex. The resulting code was manually reviewed, refined where necessary, and validated using my own app on iOS, iPadOS, macOS (Catalyst), and Android to ensure correctness and consistent cross-platform behavior.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant