Enhance/UI ux better error feedback when editing bookmarks in settings - #4687
Open
alihrhera wants to merge 2 commits into
Conversation
- Introduce `BookmarkPrefsViewModel` to manage bookmark data and validation logic separately from the UI. - Implement `WarnableTextInputValidator` in the bookmark creation and edit dialogs for real-time input feedback. - Consolidate bookmark creation and editing UI logic into a single `showBookmarkDialog` method. - Add `BookmarkData` data class and `BookmarkField` enum for cleaner data handling. - Move business rules for bookmark validity (name presence, path accessibility, and uniqueness) into the ViewModel.
…rmatting - Apply consistent Kotlin formatting and trailing commas across `BookmarksPrefsFragment`, `BookmarkPrefsViewModel`, and `BookmarkData`. - Improve code readability by cleaning up indentation and line breaks in `MaterialDialog` builders and validation logic. - Standardize spacing and bracing in conditional expressions and property declarations.
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.
Description
Refactor bookmark preference management and improve input validation
BookmarkPrefsViewModelto manage bookmark data and validation logic separately from the UI.WarnableTextInputValidatorin the bookmark creation and edit dialogs for real-time input feedback.showBookmarkDialogmethod.BookmarkDatadata class andBookmarkFieldenum for cleaner data handling.Issue tracker
Fixes #4682
Manual tests
Done
Device: Poco x60 pro
OS: 16
Build tasks success
Successfully running following tasks on local:
./gradlew assembledebug./gradlew spotlessCheck