Skip to content

Conversation

@HichemTab-tech
Copy link
Owner

Changes

Transformed the simple checkbox behavior into a more flexible context menu system:

Before:

  • Single checkbox that selected both folder and all its children

After:
Added context menu with granular control options:

  • Check All (folder + all children)
  • Uncheck All (folder + all children)
  • Check Folder Only (without affecting children)
  • Check Without Children (folder only)
  • Check Children in Current Level Only (immediate children)

Purpose

Provides users with fine-grained control over folder and child item selection, replacing the previous all-or-nothing checkbox behavior with more flexible options.

Impact

  • Users can now selectively choose what to include/exclude
  • More precise control over folder hierarchy selection
  • Better handling of complex selection scenarios
  • Enhanced user control through context menu options

Type of Change

  • New feature (non-breaking change enhancing existing functionality)

Enhanced tree-view UI with a context menu providing advanced operations for managing node states, tailored selections, and expanded/collapsed views.

- Introduced a context menu with options: check/uncheck all children, check specific levels (folders/files), and toggle expansion.
- Added `applyTransformation` and `applyNodeTransformation` for node-level and subtree manipulations.
- Implemented "Expand All" and "Collapse All" actions for global tree control.
- Updated README with new features and usage instructions.
- Incremented version to 1.1.0 in metadata.
Updated the CI workflow to ensure release jobs only trigger for stable releases by filtering out prereleases and branches with '-beta', '-alpha', '-rc', or '-preview' suffixes.

- Added a condition to the CI workflow to skip prereleases and specific branch patterns.
- Ensures only stable releases trigger the release workflow for better deployment control.
@HichemTab-tech HichemTab-tech self-assigned this May 3, 2025
@HichemTab-tech HichemTab-tech added the enhancement New feature or request label May 3, 2025
Replaced complex conditional checks with a single "released" event type. This simplifies the workflow and improves maintainability by removing redundant logic for pre-release and branch naming conventions.
Previously, the CI workflow did not run on pull requests to the master branch.
This change ensures it triggers on such pull requests for better coverage.

- Added `pull_request` trigger to `.github/workflows/ci.yml` for `master` branch.
Added comprehensive unit tests for various tree context menu operations, including checking/unchecking nodes and selective operations at different levels.

- Imported relevant functions from `tree-utils` for testing.
- Defined sample tree structure for consistent test setup.
- Implemented the following test cases:
  - `checkAllChildren`: Verify all nodes are marked as checked.
  - `checkAllFolders`: Verify only folder nodes are checked.
  - `uncheckAllChildren`: Verify all nodes are marked as unchecked.
  - `checkWithoutChildren`: Test node is checked without affecting its children.
  - `checkOnlyFoldersAtLevel`: Test only folder nodes at a specific level are checked.
  - `checkOnlyFilesAtLevel`: Test only file nodes at a specific level are checked.
  - `checkAllChildrenAtLevel`: Verify all nodes at a specific level are checked.
@HichemTab-tech HichemTab-tech merged commit 5b6aff8 into master May 3, 2025
4 checks passed
@HichemTab-tech HichemTab-tech deleted the add-more-control-over-selection branch May 3, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants