Fix top level group expanding when searching
What does this MR do and why?
Related to #558510 (closed)
There is a bug on Your work -> Groups where if you search for a top level group that has children you have to click the expand button twice. This is because if you search for a subgroup we want the tree to be expanded by default. This same logic is applied when searching for a top level group so when you go to click the expand button it tries to actually close and then a second click is required. This MR adjust the logic to fix this bug.
Screenshots or screen recordings
| Before | After |
|---|---|
| Screen_Recording_2025-08-05_at_2.26.46_PM | Screen_Recording_2025-08-05_at_2.16.52_PM |
How to set up and validate locally
- Create a top level group
- Create a subgroup in that top level group
- Go to Your work -> Groups
- Search for just the top level group (make sure subgroup doesn't have any of the same terms)
- Click the expand button
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Peter Hegman