refactor : Settings Navigation to Use Metadata-Driven Row Definitions#288
Open
jonahmichael wants to merge 3 commits into
Open
refactor : Settings Navigation to Use Metadata-Driven Row Definitions#288jonahmichael wants to merge 3 commits into
jonahmichael wants to merge 3 commits into
Conversation
- Move SettingsRow and SettingsToggleRow to dedicated SettingsRows.kt component - Update SettingsScreen to use extracted components - Fix imports to use theme and skin packages instead of settings package
Owner
|
Good idea, but not ready to merge yet. The concept is useful: moving TV Settings navigation away from hardcoded row numbers should make future settings changes safer. But this PR currently does not merge into latest main. I tested a clean merge and there is a real conflict in: app/src/main/kotlin/com/arflix/tv/ui/screens/settings/SettingsScreen.kt Main has changed the Settings rows again, and this PR edits the same navigation/action block, so it needs a rebase onto latest main and manual conflict resolution. After rebasing, please retest every TV Settings section with D-pad/Enter:
Because if one row id/order is wrong, pressing Enter can trigger the wrong setting. So: good refactor, but please rebase and verify the row/action mapping before merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the TV Settings navigation logic by replacing hardcoded row indices with centralized metadata-driven row definitions.
Changes Made
SettingsSectionMetadata.ktto define settings rows using symbolic metadata.SettingsScreen.kt.Motivation
Previously, the Settings screen relied on fixed numeric row indices. This made the implementation fragile when rows were reordered or new rows were inserted.
By introducing metadata-driven row definitions:
Testing
Tested the following:
Files Changed
SettingsScreen.ktSettingsSectionMetadata.kt✓ Branch created
✓ Code builds successfully
✓ Manual testing completed
✓ Files reviewed
✓ Changes committed
✓ Branch pushed
✓ PR created
✓ PR description added
✓ Write-up prepared
✓ Submission link copied