Skip to content

enhancement(cases):Add "Show All Descendants" View for Repository Folders#176

Merged
therealbrad merged 2 commits intomainfrom
enhancement/show-all-descendants
Apr 2, 2026
Merged

enhancement(cases):Add "Show All Descendants" View for Repository Folders#176
therealbrad merged 2 commits intomainfrom
enhancement/show-all-descendants

Conversation

@therealbrad
Copy link
Copy Markdown
Contributor

Description

Adds a "Show all descendants" toggle to the test case repository folder view. When a folder is selected and the toggle is enabled, the test case list displays cases from the selected folder and all nested subfolders in a single, unified list. Each case row shows a folder badge indicating which subfolder it belongs to, with a tooltip displaying the full folder path.

Key implementation details:

  • Toggle UI: An outline toggle button with a FolderDown icon, placed on the breadcrumb row (right-justified). Uses bg-primary/text-primary-foreground styling when active.
  • Descendant computation: BFS traversal of the already-in-memory folder hierarchy to collect all descendant folder IDs — no additional API calls needed.
  • Query modification: Changes the where clause from { folderId: { equals: id } } to { folderId: { in: [...descendantIds] } } when the toggle is active.
  • Folder path display: Builds a Map<folderId, path> from the folder hierarchy for tooltip display (e.g., "Parent › Child › Grandchild").
  • All existing sorting, filtering, search, pagination, and bulk actions work on the aggregated list.

Related Issue

Closes #167

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement

How Has This Been Tested?

Describe the tests you ran to verify your changes:

  • Unit tests
  • Integration tests
  • E2E tests
  • Manual testing

Test Configuration:

  • OS: macOS
  • Browser (if applicable): Chrome
  • Node version: 22.x

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • I have signed the CLA

Additional Notes

  • The toggle state is held in React state — it persists while the user stays on the page but resets on navigation. This could be enhanced with URL parameter or user preference persistence in a follow-up.
  • No schema or API changes were needed. The feature leverages the existing folder hierarchy data already loaded by the TreeView component.
  • The folder path tooltip in the NameCell previously relied on a disabled useFindManyRepositoryFolders query. This PR provides paths via a folderPathMap computed from the parent's folder hierarchy, avoiding any additional queries.

…ring

- Introduced new props to the Cases component for managing descendant folder IDs and a toggle for showing all descendants.
- Updated filtering logic to include cases from descendant folders when the toggle is active.
- Enhanced folder path mapping to display full paths for cases in descendant mode.
- Added localization support for the "show descendants" feature in English, Spanish, and French.
…ase view

- Added a toggle to the test case list for displaying cases from selected folders and their nested subfolders.
- Updated the UI to show a folder badge and tooltip for cases from descendant folders.
- Enhanced unit and end-to-end tests to verify the functionality of the new toggle and its impact on case visibility.
@therealbrad therealbrad merged commit 06af599 into main Apr 2, 2026
5 checks passed
@therealbrad therealbrad deleted the enhancement/show-all-descendants branch April 2, 2026 12:53
@therealbrad
Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 0.20.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

1 participant