Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
483 changes: 0 additions & 483 deletions CLAUDE.md

This file was deleted.

31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A WordPress block plugin that adds Priority+ pattern functionality to core WordPress navigation block. It automatically moves navigation items that don't fit into a responsive "More" dropdown menu as the viewport narrows.

<img src="assets/informational.png" alt="About the priority+ navigation" style="width: 100%; height: auto;">
<img src="assets/informational.png" alt="A graphical representation of a navigation before and after enabling the priority plus navigation functionality" style="width: 100%; height: auto;">

## What is Priority+?

Expand Down Expand Up @@ -94,6 +94,11 @@ The plugin automatically detects and respects settings from the Core Navigation

- **Open submenus on click** - When enabled in Core Navigation, submenus in the "More" dropdown become clickable accordions. When disabled, the link remains functional with a separate arrow button to toggle the submenu.

- **Overlay Menu** - Controls when the responsive overlay/hamburger menu appears:
- **Never**: No overlay menu (Priority+ works at all screen sizes)
- **Mobile**: Overlay menu appears at mobile breakpoints (Priority+ works on desktop, disables when hamburger menu activates)
- **Always**: Always shows overlay menu (Priority+ is automatically disabled and the "Always" option is visually disabled in the editor)

### Block Supports

The block supports all standard WordPress block features:
Expand Down Expand Up @@ -205,14 +210,36 @@ priority-nav/
- **Width caching**: Minimizes layout recalculations
- **Debounced recalculation**: Prevents excessive computation

## Overlay Menu Compatibility

Priority+ Navigation intelligently works with WordPress core navigation overlay menu settings:

### How It Works

- **Never**: Priority+ is always active, providing responsive navigation through the "More" dropdown
- **Mobile**: Priority+ works on desktop viewports and automatically disables when the hamburger menu becomes active
- **Always**: Priority+ is completely disabled (not compatible), and the "Always" option appears greyed out and crossed out in the editor

### Technical Details

The plugin detects when WordPress's overlay/hamburger menu is active by checking for the `is-menu-open` class on the responsive container. When this class is present, Priority+ temporarily disables itself to avoid conflicts with the native hamburger menu.

## Known Limitations

- When using multiple Priority+ Navigation blocks on the same page with "Open submenus on click" enabled, ensure each block has unique navigation content to avoid potential ID conflicts
- The plugin automatically disables on mobile/hamburger mode - this is intentional to work seamlessly with WordPress responsive navigation
- Priority+ Navigation is not compatible with the "Always" overlay menu setting - it will automatically prevent usage and switch to "Mobile" mode
- Legacy wrapper blocks (from previous plugin versions) are no longer insertable in the editor, but will continue to function on the frontend for backward compatibility

## Changelog

### 0.3.0 - Overlay Menu Compatibility
- Added intelligent overlay menu detection and compatibility
- Priority+ now properly disables when hamburger menu is active (overlayMenu: 'mobile')
- "Always" overlay option is automatically prevented and visually disabled in editor
- Improved hamburger mode detection using `is-menu-open` class
- Added overlay menu data attribute for frontend detection
- Enhanced documentation with overlay menu compatibility details

### 0.2.0 - Variation-Only Approach
- Refactored to use block variation instead of wrapper block
- Namespaced variation name (`lumen-priority-nav`) for better compatibility
Expand Down
Binary file modified assets/informational.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions build/priority-editor-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/priority-editor.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => 'fa3aaf3a5d627561994a');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives'), 'version' => 'c5037544c0114052e43e');
1 change: 1 addition & 0 deletions build/priority-editor.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/priority-editor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/priority-plus-nav.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '2f4c69d163ee8a1c85ce');
<?php return array('dependencies' => array(), 'version' => '634f912ce7165c63d028');
Loading