Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce VisibilityState Interface and Composable Utilities for Visibility Management #1

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

teogor
Copy link
Owner

@teogor teogor commented Sep 2, 2024

Summary

This pull request adds a VisibilityState interface and a set of associated Composable utilities to manage and control visibility state within Jetpack Compose applications. These utilities provide a structured way to manage visibility using a VisibilityState interface, along with several functions to remember and configure visibility state in a Composable context.

Key Additions

  • VisibilityState Interface: Defines the contract for managing visibility state, including methods to show, hide, toggle, and check if an entity is currently visible.
  • VisibilityStateImpl: A private implementation of VisibilityState that provides default behavior for visibility management.
  • rememberVisibilityState Functions: Multiple overloads of rememberVisibilityState allow for remembering visibility state with or without a factory, enabling flexible instantiation and state retention across recompositions.
  • withConfiguration Extension Function: Provides a way to configure a VisibilityState within a Composable function, applying configuration blocks with support for re-composition.

@teogor teogor added the @feature New feature or request label Sep 2, 2024
@teogor teogor added this to the 1.0.0-alpha02 milestone Sep 2, 2024
@teogor teogor self-assigned this Sep 2, 2024
@teogor teogor merged commit 1516564 into main Sep 2, 2024
4 checks passed
@zeobot zeobot bot deleted the feature/visibility-state-composable branch September 2, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@feature New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

1 participant