Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7982

Sidebar: Refactor filtering & expanding logic

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • Developer Tools
    • 2
    • Not Needed

      • the reducer would recognize 3 states of expanded
        • explicitly collapsed
        • explicitly expanded
        • default
      • the derived expanded would complete the defaults based on:
        • filtered children (when the filter is active)
        • the type - connection or database (when the filter is not active)
      • when the filter is activated, we reset the explicit states to defaults (while preserving a snapshot of the "before" state
      • when the filter is deactivated, we merge the "before" with the new explicit states

      Example:

      https://codesandbox.io/p/sandbox/snowy-water-2zc6ch?file=%2Fsrc%2FApp.jsx

            Assignee:
            Unassigned Unassigned
            Reporter:
            paula.stachova@mongodb.com Paula Stachova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: