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

Introduction of stable Compose UI State and some simple animations in Debug Panel #1575

Merged

Conversation

jsoberg
Copy link
Contributor

@jsoberg jsoberg commented Feb 8, 2025

Hey all!

This PR introduces stable UI state in the debug panel, as well as some simple animations.

Using the debug panel screen as a starting point, this PR adds the conversion of the database model (MeshLog in this instance) to an explicitly stable UI state. There are more details on why this is important here, but a stable UI state allows Compose to better control recompositions/etc, and remove a direct dependency of the UI to the database.

Additionally, this introduces some simple animations to the debug panel (animated scroll/placement). The difference is subtle and doesn't come through well in video, so running on device will be a better comparison - however, here are recordings for posterity:

Before After
MESH_BEFORE.mp4
MESH_AFTER.mp4

I'll open a discussion topic about introducing this further in the project - this is just an example. Thanks!

…priate mapping logic for converting database model -> UI state into the view model. Introduce animations to new log placement and automated scroll.
@CLAassistant
Copy link

CLAassistant commented Feb 8, 2025

CLA assistant check
All committers have signed the CLA.

@jsoberg
Copy link
Contributor Author

jsoberg commented Feb 8, 2025

Added a discussion topic about this here

@rcarteraz rcarteraz requested a review from andrekir February 11, 2025 15:07
Copy link
Contributor

@jamesarich jamesarich left a comment

Choose a reason for hiding this comment

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

I like where this is headed. We'll have to tackle this in quite a few places, I think. There are some UI models already defined that could benefit from immutability / more stable compose state.

@jamesarich jamesarich merged commit 3748960 into meshtastic:master Feb 16, 2025
5 checks 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.

3 participants