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

Rewrite DebugInfoActivity to M3 #744

Merged
merged 19 commits into from May 15, 2024
Merged

Conversation

sunkup
Copy link
Member

@sunkup sunkup commented Apr 23, 2024

Purpose

Rewriting the DebugInfoActivity from M2 to M3, refactoring for more clarity, stability and test-ability at the same time.

Short description

As requested, I have not yet moved debug info generation into a data layer class. I have however added comments about this in the kdoc. Note, that I, however, moved the IntentBuilder to the ViewModel too, which should probably go to another helper/convenience class, since it's seemingly used throughout the whole app.

Enhancement

  • Replaces M2 with M3 calls

Refactoring

  • Extracts composables from activity to their own file as a dedicated compose "screen"
  • Extracts view model from activity to its own file
  • Switches from LiveData to compose mutableState and flows
  • Introduces a private set (read-only) uiState in view model for the screen

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@sunkup sunkup linked an issue Apr 23, 2024 that may be closed by this pull request
3 tasks
@sunkup sunkup force-pushed the 742-rewrite-debuginfoactivity-to-m3 branch 2 times, most recently from 7f75943 to 577c8a3 Compare April 25, 2024 06:58
@sunkup sunkup changed the title Convert M2 calls to M3 Rewrite DebugInfoActivity to M3 Apr 25, 2024
@sunkup sunkup added enhancement New feature or request refactoring Internal improvement of existing functions labels Apr 25, 2024
@sunkup sunkup force-pushed the 742-rewrite-debuginfoactivity-to-m3 branch 2 times, most recently from abb15af to 543c740 Compare April 25, 2024 07:41
@sunkup sunkup requested a review from rfc2822 April 29, 2024 09:09
@sunkup sunkup marked this pull request as ready for review April 29, 2024 09:09
@rfc2822 rfc2822 force-pushed the main-ose branch 17 times, most recently from 47ef18b to 39f8f2e Compare May 2, 2024 12:03
@rfc2822 rfc2822 force-pushed the 742-rewrite-debuginfoactivity-to-m3 branch from 45adc4c to 9b5f565 Compare May 3, 2024 10:25
sunkup and others added 9 commits May 3, 2024 14:47
- create/handle Intent in Activity (may be replaced by NavGraph in future)
- Activity: pass unpacked initial data to Screen
- Screen: use hiltViewModel (adds hilt-navigation-compose dependency) to
  create model with initial data
- Screen: use Column instead of LazyColumn
@rfc2822 rfc2822 force-pushed the 742-rewrite-debuginfoactivity-to-m3 branch from 6863419 to 575ca0e Compare May 3, 2024 12:47
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

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

Have done a few minor changes, hope still everything works!

@rfc2822 rfc2822 merged commit 86252f9 into main-ose May 15, 2024
6 checks passed
@rfc2822 rfc2822 deleted the 742-rewrite-debuginfoactivity-to-m3 branch May 15, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Internal improvement of existing functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite DebugInfoActivity to M3
2 participants