Skip to content

fix: replace expand/collapse all with a single toggle in folder view - #1805

Open
vesnadean wants to merge 1 commit into
mainfrom
fix/expand-collapse-buttons
Open

fix: replace expand/collapse all with a single toggle in folder view#1805
vesnadean wants to merge 1 commit into
mainfrom
fix/expand-collapse-buttons

Conversation

@vesnadean

Copy link
Copy Markdown
Contributor

Problem

In the check list folder view, Expand all and Collapse all were separate buttons. That took extra space and did not match how Grafana Alerting handles the same action on Notification policies, where a single control toggles between the two states.

Solution

Folder view now uses one secondary button that switches between Expand all and Collapse all based on whether every folder is already expanded. The button label, icon, and aria-label update together so the control stays clear and accessible, aligned with the Alerting notification policies pattern.

Test plan

  • Open Synthetic Monitoring → Checks and switch to folder view
  • Confirm a single Expand all / Collapse all button appears next to the Folders heading
  • With folders collapsed (or partially collapsed), click Expand all and verify all folders open
  • With all folders expanded, confirm the button shows Collapse all and collapses every folder
  • Confirm individual folder expand/collapse still works independently

Made with Cursor

Match Alerting notification policies: one button flips between expand-all
and collapse-all based on whether all folders are open.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vesnadean
vesnadean requested a review from a team as a code owner August 11, 2026 17:25
@vesnadean
vesnadean requested review from VikaCep and g3john August 11, 2026 17:25
@github-actions github-actions Bot added the fix A fix applied to the application. label Aug 11, 2026
@github-actions

Copy link
Copy Markdown

Script size changes

Name +/- Main This PR Outcome
[702.js] = 6,717.24 kB 6,717.24 kB
[87.js] = 3,636.46 kB 3,636.19 kB
[469.js] = 506.85 kB 506.85 kB
[datasource/module.js] = 119.68 kB 119.68 kB
[9.js] = 99.10 kB 99.10 kB
[692.js] = 67.57 kB 67.57 kB
[398.js] = 48.61 kB 48.61 kB
[module.js] = 35.04 kB 35.04 kB
[294.js] = 22.06 kB 22.06 kB
[466.js] = 5.15 kB 5.15 kB
[131.js] = 5.00 kB 5.00 kB
[845.js] = 3.25 kB 3.25 kB
[295.js] = 2.79 kB 2.79 kB

Totals

Name +/- Main This PR Outcome
[Scripts] = 11,268.79 kB 11,268.53 kB
[Non-script Assets] = 1,469.61 kB 1,469.61 kB
[All] = 12,738.40 kB 12,738.13 kB

Generated by 🚫 dangerJS against bfdaf6c

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bfdaf6c. Configure here.

} else {
setCollapsedFolders(new Set());
}
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toggle misses stale collapsed UIDs

Low Severity

allExpanded uses collapsedFolders.size === 0 instead of checking every current folder in allUids. External or orphaned folders can leave the tree when filters or checks change while their UIDs stay in collapsedFolders, so the toggle can show Expand all and hide Collapse all even when every visible folder is already open. The removed allCollapsed check used allUids.every(...), which avoided this.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bfdaf6c. Configure here.

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

Labels

fix A fix applied to the application.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant