Skip to content

Add Optional Sidebar Labels with Dynamic Width ControlFeature/setting to show hide left column labels - #1403

Open
Ostrock wants to merge 3 commits into
olivierkes:developfrom
Ostrock:feature/setting-to-show-hide-left-column-labels
Open

Add Optional Sidebar Labels with Dynamic Width ControlFeature/setting to show hide left column labels#1403
Ostrock wants to merge 3 commits into
olivierkes:developfrom
Ostrock:feature/setting-to-show-hide-left-column-labels

Conversation

@Ostrock

@Ostrock Ostrock commented Jan 2, 2026

Copy link
Copy Markdown

Summary

This PR adds a user setting to toggle the visibility of text labels in the left navigation sidebar, with the sidebar width automatically adjusting between icon-only (48px) and icon-with-labels (120px) modes.

Changes

Core Feature

  • New Setting: Added show_sidebar_labels setting (default: False)
    • Sidebar labels are hidden by default for a cleaner, more compact interface
    • Users can enable labels via Settings → General → Show sidebar labels

UI Improvements

  • Dynamic Width Control:

    • Icon-only mode: 48px (exact icon size, no wasted space)
    • Labels shown mode: 120px (accommodates text)
    • Dock widget (dckNavigation) automatically follows sidebar width
  • Spacing Optimization:

    • Zero spacing between items to eliminate visual gaps
    • Precise item size hints (48x48 for icons only, 120x64 with labels)

Modified Files

Testing

  • manuskript/tests/test_sidebar_labels.py: Comprehensive test suite (15 tests)
    • Settings persistence and loading (6 tests)
    • UI component integration (3 tests)
    • Dynamic width behavior and dock synchronization (6 tests)
    • All tests passing ✅

Technical Details

Width Synchronization:
The implementation ensures both lstTabs (sidebar list) and dckNavigation (dock widget) maintain synchronized min/max widths, preventing layout inconsistencies.

Backward Compatibility:
The setting defaults to False (labels hidden) for new users, while existing users will have labels shown until they change the setting. The change is fully backward compatible with existing project files.

User Benefits

  • Cleaner Interface: Icon-only mode provides a more spacious writing environment
  • Customizable: Users can enable labels if they prefer descriptive text
  • Smooth Transitions: Instant visual feedback when toggling the setting
  • Space Efficient: No wasted whitespace in icon-only mode

Screenshots

Before (64px, with gaps):

  • Wider sidebar with visible text

After (48px icon-only / 120px with labels):

  • Compact icon mode or full label mode based on user preference

Related Issues: N/A
Breaking Changes: None
Migration Required: No

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.

1 participant