Skip to content

Fix: TreeView icon swap + prevent getChildren on collapse#1256

Open
radimvaculik wants to merge 1 commit intomasterfrom
fix/treeview-icon-toggle
Open

Fix: TreeView icon swap + prevent getChildren on collapse#1256
radimvaculik wants to merge 1 commit intomasterfrom
fix/treeview-icon-toggle

Conversation

@radimvaculik
Copy link
Member

@radimvaculik radimvaculik commented Feb 22, 2026

Summary

  • Replaces CSS transform: rotate with proper icon swapping (chevron-rightchevron-down)
  • Adds a spinner/loading icon while getChildren AJAX request is in flight
  • Prevents handleGetChildren from being called when closing the treeview (intercepts the interact event and cancels it)

Closes #578

Changes

  • datagrid_tree.latte: three icons in the chevron <a> (collapsed, expanded, loading), each with a data-tree-icon attribute
  • datagrid.css: CSS visibility rules driven by .is-loading / .is-expanded state classes; removed dead .toggle-rotate and transition: transform
  • treeView.ts: JS now only toggles state classes; no more icon prefix detection

Test plan

  • Click chevron on a row with children → spinner appears, then chevron-down when loaded
  • Click chevron again on an expanded row → collapses immediately, no network request made
  • Simulate AJAX error → spinner reverts to chevron-right

Screenshot

image

…ildren on collapse

- Add collapsed/expanded/loading icons to template, toggled via CSS state classes
- Prevent AJAX request when collapsing (intercept interact event)
- Show spinner icon while loading, chevron-down when expanded
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing spinner while toggle-tree

1 participant