Skip to content

bug(export): search-clear and legend-toggle reset community-hidden nodes #285

@egouilliard-leyton

Description

@egouilliard-leyton

Context

Discovered during implementation of #270 (community filter sidebar).

Description

In graph.html, three independent visibility controls conflict:

  1. Search — hiding non-matching nodes on input, showing all on clear
  2. Legend toggle — hiding nodes by label
  3. Community toggle — hiding nodes by community membership

Each control sets hidden: true/false on nodes independently. When the user:

  • Unchecks a community (hides its nodes), then
  • Types and clears a search query

…the search-clear handler (nodes.update({id: n.id, hidden: false})) un-hides the community-hidden nodes. Same issue exists between legend toggle and search (pre-existing before #270), but the community sidebar makes it more visible.

Suggested approach

Track a hiddenReasons set per node (e.g. {search, legend:Class, community:eg1}). A node is hidden iff the set is non-empty. Each control adds/removes its own reason. This avoids the current overwrite pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions