Skip to content

Fix Graphviz and Mermaid button positioning in Compilation Settings#280

Merged
schuyler merged 1 commit intomainfrom
claude/resolve-issue-277-e8C42
Jan 16, 2026
Merged

Fix Graphviz and Mermaid button positioning in Compilation Settings#280
schuyler merged 1 commit intomainfrom
claude/resolve-issue-277-e8C42

Conversation

@schuyler
Copy link
Copy Markdown
Owner

Summary

  • Fixed Graphviz and Mermaid checkbox buttons in the Compilation Settings (HTML Preferences) window to properly reflow when the window is resized
  • Removed fixedFrame="YES" from both buttons which was locking them to fixed positions
  • Added proper auto-layout constraints to position buttons relative to "Show line numbers" checkbox

Related Issue

Related to #277

Manual Testing Plan

Setup Steps

  1. Build the MacDown project in Xcode
  2. Launch the built MacDown application
  3. Open MacDown → Preferences (or MacDown → Settings depending on macOS version)
  4. Navigate to the Markdown tab
  5. Click the Compilation Settings button to open the HTML Preferences window

Test Scenarios

1. Normal State Verification

  • Verify the "Show line numbers" checkbox is visible
  • Verify the Graphviz checkbox appears immediately to the right of "Show line numbers" (with ~8pt spacing)
  • Verify the Mermaid checkbox appears immediately to the right of Graphviz (with ~8pt spacing)
  • Verify all three buttons are vertically centered on the same line

2. Window Resize Behavior

  • Resize the Compilation Settings window to smaller widths
  • Verify the buttons maintain their relative positions and spacing
  • Verify the buttons reflow smoothly without jumping or snapping
  • Resize the window to larger widths
  • Verify the buttons expand/shift appropriately with the window

3. Button Functionality

  • Click each checkbox - verify it toggles and the layout remains correct
  • Verify the buttons respond to enabled/disabled binding (disabled when "Syntax highlighted code block" is unchecked)

Edge Cases

  • Minimum Window Size - Verify buttons remain visible and properly positioned
  • Maximum Window Size - Verify buttons don't have excessive gaps
  • Dynamic Enable/Disable - Uncheck "Syntax highlighted code block"; verify all three buttons become disabled and layout doesn't break

Review Notes

  • Groucho (Architecture): Identified root cause as fixedFrame attribute and recommended constraint-based positioning
  • Chico (Code Review): Approved - no critical issues, constraints are complete and follow macOS/Cocoa conventions
  • Harpo (Documentation): No documentation updates needed
  • Zeppo (Testing): Provided manual testing plan above

Remove fixedFrame="YES" from Graphviz and Mermaid checkbox buttons and
add proper auto-layout constraints so they reflow correctly when the
Compilation Settings window is resized.

Changes:
- Remove fixedFrame attribute from both buttons
- Add centerY constraints for vertical alignment with "Show line numbers"
- Add leading constraints to position buttons in sequence
- Remove trailing constraint that stretched "Show line numbers" row

Related to #277
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 16, 2026

Code Coverage Report

Current Coverage: 52.72%

Coverage Details (Summary)
Name                                                                                                                                   Coverage            
-------------------------------------------------------------------------------------------------------------------------------------- ------------------- 
MASPreferences.bundle                                                                                                                  0.00% (0/0)         
MacDown 3000.app                                                                                                                       59.00% (7628/12928) 
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Preferences/MPHtmlPreferencesViewController.m                              0.00% (0/87)        
        MPPrismDefaultThemeName                                                                                                        0.00% (0/2)         
        -[MPHtmlPreferencesViewController viewIdentifier]                                                                              0.00% (0/3)         
        -[MPHtmlPreferencesViewController toolbarItemImage]                                                                            0.00% (0/3)         
        -[MPHtmlPreferencesViewController toolbarItemLabel]                                                                            0.00% (0/2)         
        -[MPHtmlPreferencesViewController viewWillAppear]                                                                              0.00% (0/4)         
        -[MPHtmlPreferencesViewController changeStylesheet:]                                                                           0.00% (0/7)         
        -[MPHtmlPreferencesViewController changeHighlightingTheme:]                                                                    0.00% (0/7)         
        -[MPHtmlPreferencesViewController invokeStylesheetFunction:]                                                                   0.00% (0/23)        
        -[MPHtmlPreferencesViewController loadStylesheets]                                                                             0.00% (0/13)        
        -[MPHtmlPreferencesViewController loadHighlightingThemes]                                                                      0.00% (0/23)        
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Document/MPDocument.m                                                      57.41% (1031/1796)  
        MPEditorPreferenceKeyWithValueKey                                                                                              85.71% (6/7)        
        MPEditorKeysToObserve                                                                                                          100.00% (15/15)     
        __MPEditorKeysToObserve_block_invoke                                                                                           100.00% (10/10)     
        MPEditorPreferencesToObserve                                                                                                   100.00% (13/13)     
        __MPEditorPreferencesToObserve_block_invoke                                                                                    100.00% (8/8)       
        MPRectStringForAutosaveName                                                                                                    100.00% (6/6)       
        MPAreNilableStringsEqual                                                                                                       100.00% (3/3)       
        MPGetWebViewBackgroundColor                                                                                                    0.00% (0/9)         
        -[NSURL(Convert) absoluteBaseURLString]                                                                                        0.00% (0/6)         
        -[WebView(Shortcut) enclosingScrollView]                                                                                       100.00% (3/3)       
        -[MPPreferences(Hoedown) extensionFlags]                                                                                       75.00% (21/28)      
        -[MPPreferences(Hoedown) rendererFlags]                                                                                        75.00% (9/12)       
        MPGetPreviewLoadingCompletionHandler                                                                                           100.00% (26/26)     
        __MPGetPreviewLoadingCompletionHandler_block_invoke                                                                            100.00% (23/23)     
        -[MPDocument preferences]                                                                                                      100.00% (3/3)       
        -[MPDocument markdown]                                                                                                         100.00% (3/3)       
        -[MPDocument setMarkdown:]                                                                                                     100.00% (3/3)       
        -[MPDocument html]                                                                                                             0.00% (0/3)         
        -[MPDocument toolbarVisible]                                                                                                   0.00% (0/3)         
        -[MPDocument previewVisible]                                                                                                   100.00% (3/3)       
        -[MPDocument editorVisible]                                                                                                    100.00% (3/3)       
        -[MPDocument needsHtml]                                                                                                        80.00% (4/5)        
        -[MPDocument setTotalWords:]                                                                                                   0.00% (0/7)         
        -[MPDocument setTotalCharacters:]                                                                                              0.00% (0/7)         
        -[MPDocument setTotalCharactersNoSpaces:]                                                                                      0.00% (0/8)         
        -[MPDocument setAutosaveName:]                                                                                                 100.00% (4/4)       
        -[MPDocument init]                                                                                                             90.00% (9/10)       
        -[MPDocument windowNibName]                                                                                                    100.00% (3/3)       
        -[MPDocument windowControllerDidLoadNib:]                                                                                      100.00% (88/88)     
        __41-[MPDocument windowControllerDidLoadNib:]_block_invoke                                                                     100.00% (4/4)       
        -[MPDocument reloadFromLoadedString]                                                                                           100.00% (8/8)       
        -[MPDocument close]                                                                                                            0.00% (0/20)        
        +[MPDocument autosavesInPlace]                                                                                                 100.00% (2/2)       
        +[MPDocument writableTypes]                                                                                                    100.00% (3/3)       

... (2465 more lines truncated)

📊 **Full coverage report available in workflow artifacts**

@schuyler schuyler merged commit 2596df8 into main Jan 16, 2026
9 checks passed
schuyler pushed a commit that referenced this pull request Jan 24, 2026
Comprehensive testing plan covering all changes since v3000.0.3:
- Smart quote substitution fix (#289)
- Editor jumping when typing at end of long documents (#288)
- New document window positioning (#286)
- Graphviz/Mermaid button positioning in Compilation Settings (#280)
- Adjacent shortcut-style links rendering (#275)

Includes regression testing checklist for core functionality.
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