Skip to content

Commit d8ba461

Browse files
authored
refactor: promote BrowserPanelView computed vars to standalone subviews (#68)
Nuclear-review finding WP6 (lowest severity): BrowserPanelView was a single ~1900-line View struct decomposed only via private computed vars, making it hard to scan and hard for the type checker to isolate errors. Promotes the 4 largest cohesive computed-var groups into standalone private struct View types in the same file, taking explicit `let`/`@Binding` params instead of implicitly reading the parent's state: - BrowserNavigationButtonsView (back/forward/reload/stop + download indicator) - 1 param (panel) - BrowserProfileMenuView (profile toolbar button + popover) - 6 params - BrowserThemeModeMenuView (theme toolbar button + popover) - 4 params - BrowserImportHintContentView (blank-tab card/inline-strip overlays + toolbar-chip popover, which all share the same hint body) - 4 params Body content moved verbatim; behavior, timing, and state ownership are unchanged. Groups that would need more than ~8 parameters to extract cleanly (omnibarField, webView, and the top-level addressBar composition) were left in place per the conservative scope of this pass. BrowserPanelView's own body shrinks from ~1913 to ~1604 lines.
1 parent 01cc844 commit d8ba461

1 file changed

Lines changed: 446 additions & 368 deletions

File tree

0 commit comments

Comments
 (0)