[GH-ISSUE #68] [Feature]: Expand / Collapse tree in Inventory - Save last view #82

Closed
opened 2026-03-07 19:27:23 +03:00 by kerem · 3 comments
Owner

Originally created by @nothing-fr on GitHub (Mar 3, 2026).
Original GitHub issue: https://github.com/adminsyspro/proxcenter-ui/issues/68

Feature Description

  • Is it possible to add buttons to expand or collapse the entire tree at once in the Inventory view?

Also, the view is not saved from one session to the next. Is it possible to keep the last selected view ?

Problem / Use Case

  • It is not very practical to have to expand or collapse the shaft every time.
  • The selected “view” is not retained from one session to the next.

Proposed Solution

  • Add button to expand / collapse the full tree or partially by host ?
  • Keep the last view used in localstorage / preferences

Alternatives Considered

No response

Category

UI / UX

How important is this feature to you?

Nice to have

Additional Context

Just for QoL

Contribution

  • I would be willing to help implement this feature
Originally created by @nothing-fr on GitHub (Mar 3, 2026). Original GitHub issue: https://github.com/adminsyspro/proxcenter-ui/issues/68 ### Feature Description - Is it possible to add buttons to expand or collapse the entire tree at once in the Inventory view? Also, the view is not saved from one session to the next. Is it possible to keep the last selected view ? ### Problem / Use Case - It is not very practical to have to expand or collapse the shaft every time. - The selected “view” is not retained from one session to the next. ### Proposed Solution - Add button to expand / collapse the full tree or partially by host ? - Keep the last view used in localstorage / preferences ### Alternatives Considered _No response_ ### Category UI / UX ### How important is this feature to you? Nice to have ### Additional Context Just for QoL ### Contribution - [ ] I would be willing to help implement this feature
kerem 2026-03-07 19:27:23 +03:00
Author
Owner

@adminsyspro commented on GitHub (Mar 4, 2026):

Implémenté dans a474bb8 :

  • Boutons Expand All / Collapse All dans le toolbar de l'inventaire (visibles en mode arbre + modes groupés hosts/pools/tags)
  • État d'expansion contrôlé : l'arbre passe en mode fully controlled (expandedItems + onExpandedItemsChange)
  • Persistance localStorage : le mode de vue (inventoryViewMode), les items dépliés (inventoryExpandedItems) et les sections repliées (inventoryCollapsedSections) sont sauvegardés et restaurés entre les sessions
  • Hydratation SSR-safe avec pattern isHydrated pour éviter les mismatches
  • Recherche : l'auto-expand continue de fonctionner normalement quand une recherche est active
  • Traductions ajoutées en EN et FR (inventory.expandAll / inventory.collapseAll)
<!-- gh-comment-id:3995731727 --> @adminsyspro commented on GitHub (Mar 4, 2026): Implémenté dans a474bb8 : - **Boutons Expand All / Collapse All** dans le toolbar de l'inventaire (visibles en mode arbre + modes groupés hosts/pools/tags) - **État d'expansion contrôlé** : l'arbre passe en mode fully controlled (`expandedItems` + `onExpandedItemsChange`) - **Persistance localStorage** : le mode de vue (`inventoryViewMode`), les items dépliés (`inventoryExpandedItems`) et les sections repliées (`inventoryCollapsedSections`) sont sauvegardés et restaurés entre les sessions - **Hydratation SSR-safe** avec pattern `isHydrated` pour éviter les mismatches - **Recherche** : l'auto-expand continue de fonctionner normalement quand une recherche est active - **Traductions** ajoutées en EN et FR (`inventory.expandAll` / `inventory.collapseAll`)
Author
Owner

@adminsyspro commented on GitHub (Mar 4, 2026):

Implemented in a474bb8:

  • Expand All / Collapse All buttons in the inventory toolbar (visible in tree mode + grouped modes hosts/pools/tags)
  • Controlled expansion state: the tree now uses fully controlled expandedItems + onExpandedItemsChange
  • localStorage persistence: view mode (inventoryViewMode), expanded items (inventoryExpandedItems) and collapsed sections (inventoryCollapsedSections) are saved and restored across sessions
  • SSR-safe hydration using the isHydrated pattern to avoid mismatches
  • Search: auto-expand still works normally when a search is active
  • Translations added in EN and FR (inventory.expandAll / inventory.collapseAll)
<!-- gh-comment-id:3995734497 --> @adminsyspro commented on GitHub (Mar 4, 2026): Implemented in a474bb8: - **Expand All / Collapse All buttons** in the inventory toolbar (visible in tree mode + grouped modes hosts/pools/tags) - **Controlled expansion state**: the tree now uses fully controlled `expandedItems` + `onExpandedItemsChange` - **localStorage persistence**: view mode (`inventoryViewMode`), expanded items (`inventoryExpandedItems`) and collapsed sections (`inventoryCollapsedSections`) are saved and restored across sessions - **SSR-safe hydration** using the `isHydrated` pattern to avoid mismatches - **Search**: auto-expand still works normally when a search is active - **Translations** added in EN and FR (`inventory.expandAll` / `inventory.collapseAll`)
Author
Owner

@nothing-fr commented on GitHub (Mar 4, 2026):

Everything seems to be working fine, thank you for your consideration and responsiveness ;)

<!-- gh-comment-id:3996594514 --> @nothing-fr commented on GitHub (Mar 4, 2026): Everything seems to be working fine, thank you for your consideration and responsiveness ;)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxcenter-ui#82
No description provided.