feat(ui): add layout toggle button in Model Manager header#213
feat(ui): add layout toggle button in Model Manager header#213hayden-fr merged 1 commit intohayden-fr:mainfrom
Conversation
|
I merged #211 and now this merge seems to have conflicts, so resolve it. |
92b0bff to
c0d4a79
Compare
e2fd980 to
80312e4
Compare
|
I’m still pretty new to contributing on GitHub, so apologies if I made things messier along the way. Thanks for your patience while I cleaned this up. I squashed this branch onto upstream/main, so the PR is now a single clean commit that touches only the UI files. Changes included here: Layout toggle button in the Model Manager header (icon now correctly reflects the current layout). Hidden-files toggle (eye/eye-slash button with tooltip + immediate refresh). Small cleanups to tooltip text, refresh handling, and formatting. I noticed in the most recent upstream update the layout toggle icon logic was reversed (flat → folder-open). I left it as my original fix (flat → grid), since that matches the current layout more clearly for the user (grid icon when in flat view, folder icon when in folder view). All checks are now passing ✅. This should be clean and ready to merge. Thanks again for your patience! |
Adds a new header button inside the Model Manager dialog to quickly switch
between "flat" (card grid) and "folder explorer" layouts.
toggleLayoutfunction flips theconfig.flatflag, persists it toComfyUI settings (
ModelManager.UI.Flat), closes the current dialog, andreopens with the new layout.
pi pi-folder-open) in flat mode (suggests switch to folder view)pi pi-th-large) in folder mode (suggests switch to flat view)This lets users change layouts directly in the UI without digging into the
global ComfyUI settings menu.
Follow-up notes on small fixes
First icon fix: corrected the layout toggle icon so it reflected the current state (flat = grid, folder = folder-open).
Second icon fix: flipped the logic so the toggle now shows the next view you’ll switch to, not the current one (resolves the backwards icon issue).
Hidden-files toggle: added a header button to show/hide dot-prefixed files/folders, persisted via ModelManager.Scan.IncludeHiddenFiles.
These are small, cosmetic/UX corrections stacked on top of the main layout/hidden-files feature work.
Added a couple extra fix commits - apparently I shouldn’t be vibe-coding UI icons on too little sleep - even if I'm not the one doing the heavy lifting. Everything’s correct now.
Fix: Ensure proper model refresh after toggling hidden files setting
The previous implementation didn't properly refresh the model list after toggling the visibility of hidden files. This fix adds a call to refreshModelsAndConfig() after toggling the setting, ensuring that the UI updates immediately to reflect the new state.
The dialog is also closed and reopened to ensure the changes are applied dynamically, providing a seamless experience for the user.
This change addresses the issue where toggling the "Show Hidden Files" feature wouldn't immediately reflect in the model list until a full page refresh.
Ok, I think I'm done for the night.