Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sub-menu(s) to CellMenu & ContextMenu plugins #1141

Merged
merged 11 commits into from
Oct 22, 2023

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Oct 19, 2023

  • add sub-menus to all extensions (CellMenu and ContextMenu)
  • currently only works by click event on sub-menus, the mouseover will be implemented in a future PR

TODOS

  • add full unit test coverage
  • add sub-menus to Cell Menu plugin (Example 7)
    • add Cypress E2E tests
  • add sub-menus to Context Menu plugin (Example 4)
    • add Cypress E2E tests
  • add slick-submenu class when it's a sub-menu
  • add sub-menu level number for optional custom styling
    • i.e. Grouping does it in 2 ways: 1-add slick-group-level-2 & 2-add level="2" attribute
  • verify that sub-menu(s) is always at an expected position, it seems incorrect for some sub-menus
  • add subMenuTitle & subMenuTitleCssClass to optionally add sub-menu title & custom styling
    • must also support translations and add extra subMenuTitleKey and also test with titleKey
  • opening a sub-menu then open a sub-menu from another tree doesn't close previous sub-menu that becomes orphan

image
image

- add sub-menus to all extensions (CellMenu, ContextMenu, GridMenu, HeaderMenu)
- currently only works by `click` event on sub-menus, I tried to implement it with `mouseover`/`mouseout` but it's a lot more complex (we need to know if we are mousing over the correct sub-menu or over something else and this and that... wow just too much work)... so `click` should be enough for now, even though it's slightly less user friendly
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #1141 (7586673) into master (1ddee71) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            master     #1141    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          245       245            
  Lines        16886     16997   +111     
  Branches      6062      6113    +51     
==========================================
+ Hits         16886     16997   +111     
Files Coverage Δ
packages/common/src/extensions/extensionUtility.ts 100.00% <100.00%> (ø)
packages/common/src/extensions/menuBaseClass.ts 100.00% <100.00%> (ø)
...ges/common/src/extensions/menuFromCellBaseClass.ts 100.00% <100.00%> (ø)
packages/common/src/extensions/slickCellMenu.ts 100.00% <100.00%> (ø)
packages/common/src/extensions/slickContextMenu.ts 100.00% <100.00%> (ø)
packages/common/src/extensions/slickGridMenu.ts 100.00% <100.00%> (ø)
...ckages/common/src/extensions/slickHeaderButtons.ts 100.00% <100.00%> (ø)
packages/common/src/extensions/slickHeaderMenu.ts 100.00% <100.00%> (ø)

- use Example 4 for Context Menu w/sub-menus & tests
- use Example 6 for Cell Menu w/sub-menus & tests
@ghiscoding ghiscoding changed the title WIP - feat: add sub-menu(s) to all Menu extensions WIP - feat: add sub-menu(s) to CellMenu & ContextMenu extensions Oct 21, 2023
@ghiscoding ghiscoding changed the title WIP - feat: add sub-menu(s) to CellMenu & ContextMenu extensions feat: add sub-menu(s) to CellMenu & ContextMenu extensions Oct 21, 2023
@ghiscoding ghiscoding changed the title feat: add sub-menu(s) to CellMenu & ContextMenu extensions feat: add sub-menu(s) to CellMenu & ContextMenu plugins Oct 22, 2023
@ghiscoding ghiscoding merged commit bd18af1 into master Oct 22, 2023
5 checks passed
@ghiscoding ghiscoding deleted the feat/context-sub-menus branch October 22, 2023 02:27
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.

1 participant