Skip to content

Enhance/UI ux better error feedback when editing bookmarks in settings - #4687

Open
alihrhera wants to merge 2 commits into
TeamAmaze:release/4.0from
alihrhera:enhance/ui-ux-better-error-feedback-when-editing-bookmarks-in-settings
Open

Enhance/UI ux better error feedback when editing bookmarks in settings#4687
alihrhera wants to merge 2 commits into
TeamAmaze:release/4.0from
alihrhera:enhance/ui-ux-better-error-feedback-when-editing-bookmarks-in-settings

Conversation

@alihrhera

Copy link
Copy Markdown

Description

Refactor bookmark preference management and improve input validation

  • 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.

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

- 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.
@VishnuSanal VishnuSanal added the PR-Awaiting-Initial-Review this PR is awaiting for an initial review label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Awaiting-Initial-Review this PR is awaiting for an initial review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better error feedback when editing bookmarks in settings

2 participants