Skip to content

[WC-3564]: fix v2 tree node expand icon/spinner bugs - #2425

Open
yordan-st wants to merge 5 commits into
mainfrom
fix/WC-3564_tree-node-stuck-spinner-microflow
Open

yordan-st wants to merge 5 commits into
mainfrom
fix/WC-3564_tree-node-stuck-spinner-microflow

Conversation

@yordan-st

Copy link
Copy Markdown
Contributor

Pull request type

Bug fix (non-breaking change which fixes an issue)


Description

Tree Node v2 stored an expand-icon "loading" state per node and resolved it via a broken heuristic (a node's id reappearing in some later datasource delivery), which a microflow datasource breaks in two ways: a permanently stuck loading spinner when "Start expanded" is Yes, and an unrelated node silently and permanently losing its expand icon when a sibling is expanded (WC-3564). The spinner is now a pure render-time decision driven by the datasource's own status, never stored per node.

Manual verification of that fix surfaced two further pre-existing bugs in the same "preload one level ahead" mechanism, fixed in the same PR since they were found and understood during the same pass: a node's first expand didn't preload its own children's children (needed a collapse+re-expand to reveal a deeper tier), and the automatic root-expansion path for "Start expanded" = Yes only went one level deep instead of cascading to the tree's real depth (every level defaults to expanded in that mode, not just roots).

What should be covered while testing?

  • Tree Node v2, microflow datasource, "Start expanded" = Yes → tree renders fully expanded immediately, all the way to the data's real depth, no stuck spinner
  • Tree Node v2, "Start expanded" = No, expand a node, then expand an unrelated sibling → first node's expand icon stays intact, still clickable, reveals its own children correctly
  • Expand a node once → its children's own expand icons are correct immediately (no collapse+re-expand needed to reveal a deeper tier)
  • With "Start expanded" = Yes, deeper tiers (3rd, 4th, ...) appear automatically on load, not requiring a manual collapse/re-expand anywhere
  • DevTools console — no errors during any of the above
  • v1 widget (no parentAssociation configured) — spot-check unaffected, this change only touches v2 code paths

No XML changes; this is a bug fix restoring intended behavior, not a new feature — no docs PR needed. Changelog entries already added under [Unreleased].

Ticket: WC-3564

@yordan-st
yordan-st marked this pull request as ready for review September 15, 2026 14:46
@yordan-st
yordan-st requested a review from a team as a code owner September 15, 2026 14:46
@yordan-st
yordan-st force-pushed the fix/WC-3564_tree-node-stuck-spinner-microflow branch from 1ab005e to 44f3740 Compare September 15, 2026 14:54
@github-actions

This comment has been minimized.

@gjulivan
gjulivan force-pushed the fix/WC-3564_tree-node-stuck-spinner-microflow branch from a267756 to 8b1c93c Compare September 17, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants