Skip to content

feat: Add status bar display options (original/shortened/hidden)#41

Open
Remilia-Kirisame wants to merge 1 commit intojglev:mainfrom
Remilia-Kirisame:feat/status-bar-display-options
Open

feat: Add status bar display options (original/shortened/hidden)#41
Remilia-Kirisame wants to merge 1 commit intojglev:mainfrom
Remilia-Kirisame:feat/status-bar-display-options

Conversation

@Remilia-Kirisame
Copy link
Copy Markdown

What this PR does

Adds a "Status bar display" dropdown setting with three modes:

  • OriginalPaste Mode: Markdown (default, preserves current behaviour)
  • ShortenedPM: MD (compact labels via a StatusBarLabel mapping)
  • Hidden — hides the status bar item entirely

Related to #40
status-bar-diplay-hidden
status-bar-diplay-original
status-bar-diplay-shortened

Changes

  • Added StatusBarLabel lookup object (after Mode enum) for shortened display names
  • Added updateStatusBar() helper to centralise status bar text + visibility logic
  • Added statusBarDisplay to DEFAULT_SETTINGS (string: "original" | "shortened" | "hidden")
  • Replaced the 3 individual setText calls with updateStatusBar() calls
  • Added "Status bar display" dropdown in the Settings tab

How to test

  1. yarn && yarn build
  2. Copy main.js to .obsidian/plugins/obsidian-paste-to-current-indentation/
  3. Reload Obsidian
  4. Open Settings → Paste Mode
  5. Change "Status bar display" between Original / Shortened / Hidden
  6. Verify the status bar updates immediately for each option
  7. Switch paste modes and verify the status bar reflects the correct mode
    in each display style

Tests I have done

  • Test above
  • Switch paste modes — the status bar updated correctly in each display style
  • Click the status bar — the mode selector popup works
  • Restart Obsidian — the setting persists
  • Tested basic paste functionality (paste text in a few modes to confirm nothing is broken)

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