Skip to content

Add folder customization page for per-account folder management#855

Merged
bkaankose merged 1 commit into
mainfrom
claude/folder-ordering-ui-uknGY
Apr 16, 2026
Merged

Add folder customization page for per-account folder management#855
bkaankose merged 1 commit into
mainfrom
claude/folder-ordering-ui-uknGY

Conversation

@bkaankose

Copy link
Copy Markdown
Owner

To address #853, this PR brings a new page where users are given more power to re-order their folder layout as they wanted. Default is always alphabetic with respecting the system folder/pinned order.

Summary

Adds a new Folder Customization page that allows users to reorder, pin/unpin, and hide folders on a per-account basis. This feature provides granular control over folder visibility and organization in the navigation menu.

Key Changes

  • New ViewModel: FolderCustomizationPageViewModel manages folder organization with three sections:

    • Pinned folders (sticky items)
    • Category folders (Gmail-specific virtual group)
    • More folders (remaining folders)
  • New UI Page: FolderCustomizationPage with drag-and-drop reordering support via ListView.CanReorderItems, expandable sections for each folder group, and toggle buttons for pin/hide actions

  • New Data Model: FolderCustomizationItemViewModel wraps MailItemFolder entities and exposes observable IsHidden property for UI binding

  • Database Schema: Added Order column to MailItemFolder table to persist user-defined folder ordering (0 = no custom order)

  • Service Layer Enhancements (IFolderService):

    • ChangeFolderHiddenStatusAsync() - Toggle folder visibility
    • UpdateFolderOrdersAsync() - Persist custom folder ordering
    • ResetFolderCustomizationAsync() - Restore default layout and visibility
  • Folder Sorting Logic: Implemented ApplyFolderSort() method that orders folders by:

    1. Custom order (user-customized entries first)
    2. Alphabetic folder name (culture-aware)
    3. SpecialFolderType (canonical tiebreak)
  • Navigation Integration:

    • Added FolderCustomizationPage to WinoPage enum
    • Added entry point in AccountDetailsPage with "Customize folder list" settings card
    • Registered view model and page in dependency injection
  • Localization: Added 17 new translation keys for UI strings (title, descriptions, section headers, button tooltips, reset confirmation)

Notable Implementation Details

  • Gmail accounts show a special "Categories" section for category-type folders (Promotions, Social, Updates, Forums, Personal) that cannot be individually pinned
  • Folder customization is persisted per account and survives sync operations
  • Reset functionality restores system folder stickiness and clears all custom ordering/hiding
  • Drag-drop reordering automatically triggers PersistLayoutAsync() to save changes
  • Existing folder customization is preserved during account sync (Order and IsHidden columns are retained)

https://claude.ai/code/session_01B1uTYYpQkWu137bqZo521n

Introduce a dedicated settings page that lets users reorder, hide,
and pin/unpin folders per account. Folders are organized into Pinned,
Categories (Gmail only), and More sections with drag-to-reorder via
ListView. New Order column on MailItemFolder persists the custom
layout; the default sort falls back to alphabetic when no custom
order is set. A reset action wipes all customization in a single
transaction and restores system-folder stickiness.
@bkaankose
bkaankose merged commit 98eed39 into main Apr 16, 2026
1 of 5 checks passed
@bkaankose
bkaankose deleted the claude/folder-ordering-ui-uknGY branch April 16, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants