Skip to content

Widen HTML preferences pane to fit theme controls#467

Merged
schuyler merged 1 commit into
mainfrom
claude/sleepy-archimedes-mnew8d
Jun 22, 2026
Merged

Widen HTML preferences pane to fit theme controls#467
schuyler merged 1 commit into
mainfrom
claude/sleepy-archimedes-mnew8d

Conversation

@schuyler

Copy link
Copy Markdown
Owner

Summary

Widens the HTML preferences pane from 430pt to 482pt so the CSS theme popup and its Reveal/Reload controls stop clipping — most visible now that the bundled "GitHub Dark Default" theme (#465) ships a long name. The pane is fully constraint-driven and loadView pins each pane to its XIB design width, so widening the content view is what actually buys the theme controls room; the inner controls reflow automatically.

Adds testHtmlPaneIsWideEnoughForThemeControls to guard the design width against being narrowed back to the cramped value.

Credit / relationship to #419

This reproduces the HTML-pane fix from @yusufm's #419 on top of the recently-merged #461 ("Fix preference pane layout for localized text wrapping"). We merged #461 on top of #419, which created the conflict, so rather than ask the author to untangle our merge we've rebased the fix forward and credited him as co-author. Closes #419 in favor of this PR.

Two deliberate differences from #419:

Validation

  • New + existing locale/layout regression tests in MPPreferencesViewControllerResizabilityTests (testPanesHaveNoAmbiguousLayout, testContentIsSizedToFitItsContent, testCheckboxTitlesWrap) exercise the widened pane.
  • XIB validated as well-formed; reviewed for ambiguous layout.

Related to #419.

https://claude.ai/code/session_0193hY9AbWhec8BuUHCJvHgv


Generated by Claude Code

The HTML preferences pane was 430pt wide, which clipped the CSS theme
popup and its Reveal/Reload controls — most visible now that the bundled
"GitHub Dark Default" theme ships a long name. The pane is constraint-
driven and loadView pins each pane to its XIB design width, so widening
the content view to 482pt gives the theme controls room; the inner
controls reflow automatically.

Adds testHtmlPaneIsWideEnoughForThemeControls to guard the design width
against being narrowed back to the cramped value.

This reproduces the HTML-pane fix from yusufm's PR #419 on top of #461
(localized text wrapping), preserving #461's checkbox word-wrap. #419's
editor-pane rect nudges are omitted: they were design-time-only values,
inert under Auto Layout, and overlap #461's rework of that pane.

Related to #419.

Co-authored-by: yusufm <[email protected]>
Claude-Session: https://claude.ai/code/session_0193hY9AbWhec8BuUHCJvHgv
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Report

Current Coverage: 62.03%

Coverage Details (Summary)
Name                                                                                                                                   Coverage            
-------------------------------------------------------------------------------------------------------------------------------------- ------------------- 
MASPreferences.bundle                                                                                                                  0.00% (0/0)         
MacDown 3000.app                                                                                                                       63.50% (9151/14411) 
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Extension/NSColor+HTML.m                                                   94.05% (332/353)    
        +[NSColor(HTML) colorWithHexString:]                                                                                           94.12% (16/17)      
        +[NSColor(HTML) colorWithHTMLName:]                                                                                            89.13% (164/184)    
        __35+[NSColor(HTML) colorWithHTMLName:]_block_invoke                                                                           100.00% (152/152)   
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Document/MPAsset.m                                                         93.69% (104/111)    
        -[MPAsset typeName]                                                                                                            100.00% (3/3)       
        -[MPAsset defaultTypeName]                                                                                                     100.00% (3/3)       
        +[MPAsset assetWithURL:andType:]                                                                                               100.00% (3/3)       
        -[MPAsset initWithURL:andType:]                                                                                                87.50% (7/8)        
        -[MPAsset init]                                                                                                                100.00% (3/3)       
        -[MPAsset templateForOption:]                                                                                                  0.00% (0/6)         
        -[MPAsset htmlForOption:]                                                                                                      100.00% (28/28)     
        -[MPStyleSheet defaultTypeName]                                                                                                100.00% (3/3)       
        +[MPStyleSheet CSSWithURL:]                                                                                                    100.00% (3/3)       
        -[MPStyleSheet templateForOption:]                                                                                             100.00% (20/20)     
        -[MPScript defaultTypeName]                                                                                                    100.00% (3/3)       
        +[MPScript javaScriptWithURL:]                                                                                                 100.00% (3/3)       
        -[MPScript templateForOption:]                                                                                                 100.00% (20/20)     
        -[MPEmbeddedScript htmlForOption:]                                                                                             100.00% (5/5)       
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Utility/FileURLInlining.m                                                  26.60% (25/94)      
        +[FileURLInlining inlineFromIterable:]                                                                                         0.00% (0/11)        
        -[FileURLInlining initWithURL:]                                                                                                0.00% (0/6)         
        -[FileURLInlining init]                                                                                                        100.00% (3/3)       
        -[FileURLInlining inlineContent]                                                                                               0.00% (0/9)         
        -[FileURLInlining imageContent]                                                                                                0.00% (0/12)        
        +[FileURLInlining mimeTypeForFilePath:]                                                                                        100.00% (22/22)     
        -[FileURLInlining clippingContent]                                                                                             0.00% (0/4)         
        +[FileURLInlining isTextClippingAtPath:]                                                                                       0.00% (0/12)        
        +[FileURLInlining textContentFromClipping:]                                                                                    0.00% (0/15)        
    /Users/runner/work/macdown3000/macdown3000/Dependency/peg-markdown-highlight/HGMarkdownHighlightingStyle.m                         89.23% (58/65)      
        +[HGMarkdownHighlightingStyle colorFromARGBColor:]                                                                             100.00% (6/6)       
        -[HGMarkdownHighlightingStyle initWithType:attributesToAdd:toRemove:fontTraitsToAdd:]                                          88.89% (8/9)        
        -[HGMarkdownHighlightingStyle initWithStyleAttributes:baseFont:]                                                               88.00% (44/50)      
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Utility/MPResourceWatcherSet.m                                             93.62% (88/94)      
        -[MPResourceWatcherSet init]                                                                                                   100.00% (6/6)       
        -[MPResourceWatcherSet dealloc]                                                                                                0.00% (0/3)         
        -[MPResourceWatcherSet watchedPaths]                                                                                           100.00% (3/3)       
        -[MPResourceWatcherSet updateWatchedPaths:]                                                                                    100.00% (16/16)     
        -[MPResourceWatcherSet addWatcherForPath:]                                                                                     100.00% (32/32)     
        __42-[MPResourceWatcherSet addWatcherForPath:]_block_invoke                                                                    100.00% (6/6)       
        __42-[MPResourceWatcherSet addWatcherForPath:]_block_invoke.37                                                                 93.33% (14/15)      
        __42-[MPResourceWatcherSet addWatcherForPath:]_block_invoke_2                                                                  75.00% (6/8)        
        -[MPResourceWatcherSet stopAll]                                                                                                100.00% (5/5)       
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Extension/hoedown_html_patch.c                                             86.57% (116/134)    
        hoedown_patch_reset_checkbox_index                                                                                             100.00% (3/3)       
        hoedown_patch_get_checkbox_index                                                                                               0.00% (0/3)         

... (3320 more lines truncated)

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

Copy link
Copy Markdown
Owner Author

Thanks again, @yusufm — CI is fully green across macOS 14/15/15-intel/26, including the regression test guarding the pane width. Credit for the fix is yours; we just rebased it past the conflict we created with #461. Merging now. 🙏


Generated by Claude Code

@schuyler schuyler merged commit da11648 into main Jun 22, 2026
9 checks passed
@schuyler schuyler deleted the claude/sleepy-archimedes-mnew8d branch June 24, 2026 05:01
@schuyler schuyler added the rc-pending Included in a release candidate awaiting validation label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rc-pending Included in a release candidate awaiting validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants