Skip to content

Fix: Display Issue of Child Menu Items#1069

Merged
abdullai-t merged 2 commits intomainfrom
fix-live-child-menu
Jun 24, 2024
Merged

Fix: Display Issue of Child Menu Items#1069
abdullai-t merged 2 commits intomainfrom
fix-live-child-menu

Conversation

@abdullai-t
Copy link
Copy Markdown
Contributor

@abdullai-t abdullai-t commented Jun 24, 2024

Summary / Highlights

This Pull Request addresses a specific issue where child menu items were being displayed even when their parent menu item was disabled. The changes introduced in this PR ensure that child menu items adhere to the visibility status of their parent menu item. After merging this PR, child menu items will only be displayed if their parent menu item is enabled, enhancing the consistency and usability of our navigation menus.

Details (Give details about what this PR accomplishes, include any screenshots etc)

Testing Steps (Provide details on how your changes can be tested)

Requirements (place an x in each [ ])

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've tested my changes manually.
  • I've added unit tests to my PR.
Transparency (Project board)
  • I've given my PR a meaningful title.
  • I linked this PR to the relevant issue.
  • I moved the linked issue from the "Sprint backlog" to "In progress" when I started this.
  • I moved the linked issue to "QA Verification" now that it is ready to merge.

Enhanced portal navigation menus by introducing the `is_published` field. This will allow for better management of display settings.
refactor: Skip children if parent menu is disabled

The code in `api_utils.py` has been refactored to improve readability and efficiency. Unpublished items are now directly skipped during iteration, which simplifies the logic and can potentially reduce unnecessary processing of children.
@abdullai-t abdullai-t changed the title fix: hide sub-menu items if parent menu is disabled Fix: hide sub-menu items if parent menu is disabled Jun 24, 2024
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 54.00%. Comparing base (7da8ce8) to head (7b8803e).

Files Patch % Lines
src/api/utils/api_utils.py 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1069      +/-   ##
==========================================
- Coverage   54.01%   54.00%   -0.01%     
==========================================
  Files         430      430              
  Lines       32034    32036       +2     
==========================================
- Hits        17302    17300       -2     
- Misses      14732    14736       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abdullai-t abdullai-t changed the title Fix: hide sub-menu items if parent menu is disabled Fix for Display Issue of Child Menu Items Jun 24, 2024
@abdullai-t abdullai-t linked an issue Jun 24, 2024 that may be closed by this pull request
2 tasks
@abdullai-t abdullai-t changed the title Fix for Display Issue of Child Menu Items Fix: Display Issue of Child Menu Items Jun 24, 2024
@abdullai-t abdullai-t merged commit 8169eac into main Jun 24, 2024
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.

BUG: Customizing navigation menu - Disable children when parent is disabled

3 participants