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

Improve Gate Filter / Fix Issue #1111 #1259

Merged
merged 4 commits into from
Mar 18, 2024

Conversation

dfsmania
Copy link
Collaborator

@dfsmania dfsmania commented Mar 14, 2024

Question Answer
Issue or Enhancement Issue
License MIT

What's in this PR?

Improve the Gate filter to also restrict submenu items were all its children are also restricted.

Fix #1111

Checklist

  • I tested these changes.
  • I have linked the related issues.

The Gate filter now restrict submenu items with all restircted children
@dfsmania dfsmania marked this pull request as draft March 14, 2024 22:04
@dfsmania
Copy link
Collaborator Author

Caution

Review this logic, will this also work for nested submenu items?

@dfsmania
Copy link
Collaborator Author

Added test to check the logic on nested submenus. The logic actually work because deeper submenues are filtered/transformed first.

@dfsmania
Copy link
Collaborator Author

@ruanpepe After inspecting the logic for menu creation, I decided to move the logic to filter an empty submenu to an upper level section, it's cleaner now and less tricky than adding it on the Gate Filter.

I have created tests to cover the cases, but it would help more if you can test these changes in your environment too, it's just a minor change on the MenuItemHelper class.

Regards!

@dfsmania dfsmania marked this pull request as ready for review March 16, 2024 20:15
@resslinger resslinger merged commit 4c031a6 into jeroennoten:master Mar 18, 2024
26 checks passed
@dfsmania dfsmania deleted the fix_issue_1111 branch March 18, 2024 14:44
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.

[FEATURE] show / hide header menu automatically based on it's submenu
2 participants