feat: Added an Autohide hidden categories feature on App Restart#1647
feat: Added an Autohide hidden categories feature on App Restart#1647KenzKD wants to merge 5 commits into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideImplements an auto-hide behavior for the "Show hidden categories" display option on app startup, controlled by a new advanced-setting toggle stored in UI preferences, and wires it into app initialization and localization strings. Sequence diagram for autohide hidden categories on app startupsequenceDiagram
participant App
participant UiPreferences
participant LibraryPreferences
App->>UiPreferences: autoHideHiddenCategories()
UiPreferences-->>App: PreferenceBoolean
App->>UiPreferences: autoHideHiddenCategories().get()
UiPreferences-->>App: Boolean
alt [autoHideHiddenCategories is true]
App->>LibraryPreferences: showHiddenCategories()
LibraryPreferences-->>App: PreferenceBoolean
App->>LibraryPreferences: showHiddenCategories().set(false)
end
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
App.kt, consider simplifying the boolean check and matching existing style, e.g.if (uiPreferences.autoHideHiddenCategories().get()) { ... }with the opening brace on the same line as theif. - The logic that mutates
libraryPreferences.showHiddenCategories()on every app startup might be better colocated closer to the library/display feature itself rather than inApp, to keep application bootstrapping free of feature-specific side effects.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `App.kt`, consider simplifying the boolean check and matching existing style, e.g. `if (uiPreferences.autoHideHiddenCategories().get()) { ... }` with the opening brace on the same line as the `if`.
- The logic that mutates `libraryPreferences.showHiddenCategories()` on every app startup might be better colocated closer to the library/display feature itself rather than in `App`, to keep application bootstrapping free of feature-specific side effects.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new user experience enhancement that automatically resets the 'Show hidden categories' display option to its hidden state when the application restarts. This provides a cleaner default library view for users who prefer not to see hidden categories by default. A corresponding preference has been added to the advanced settings, giving users full control to disable this automatic behavior if they wish. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Hidden views now fade, On restart, fresh and clean, Settings hold the key. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new feature to automatically hide hidden categories upon app startup. Changes include adding a new preference to UiPreferences, a corresponding switch in the Advanced settings screen, and the logic implementation within the App class. The review feedback focuses on improving code consistency and adherence to style standards, specifically by removing redundant boolean comparisons, adopting Egyptian brace styling, adding trailing commas, and correcting string resource casing and escaping.
Close #597
Auto hides the "Show hidden categories" from the "Display" options on app restart.
I have also added a toggle in the advanced setting panel under the Library section to disable this feature in case someone does not want it.
Add a 👍 reaction to pull requests you find important.
Summary by Sourcery
Add a configurable option to automatically hide hidden categories on app startup.
New Features:
Enhancements: