The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
617 Ready
473 Need Help
🏆 Leaderboard
Stable v1.0.0

Collapsible Toggle for Magento 2

xguenel/module-collapsible-toggle

Adds configurable keyboard shortcuts to expand or collapse all collapsible panels on a Magento admin page, improving productivity on system configuration screens.

381
Downloads
Below average
0
GitHub Stars
6mo ago
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
2 warnings
L5 PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.0 on Magento 2.4.9
Jun 2, 2026

Share This Module's Status

Collapsible Toggle for Magento 2 Magento compatibility status badge

README

Loaded from GitHub

Xguenel_CollapsibleToggle

Magento 2 module that allows you to expand/collapse all collapsible elements in the Magento back-office using keyboard shortcuts.

Description

This module adds convenient keyboard shortcuts to improve Magento administrator productivity. It allows you to quickly open or close all collapsible panels on an admin page, particularly useful on system configuration pages.

Features

  • Expand All Elements: Opens all collapsible panels on the current page
  • Collapse All Elements: Closes all collapsible panels on the current page
  • macOS Compatibility: Automatically uses the Command key (⌘) on macOS instead of Ctrl
  • Configurable Shortcuts: Shortcut keys can be customized from the administration
  • Enable/Disable: The module can be enabled or disabled from the configuration

Supported Elements

The module handles several types of Magento collapsible elements:

  • Configuration sections (.section-config)
  • Collapsible panels ([data-role="collapsible"])
  • Admin collapsible blocks (.admin__collapsible-block-wrapper)
  • Fieldset wrappers (.fieldset-wrapper)

Requirements

  • Magento 2.4.x
  • PHP 8.1 or higher

Installation

Manual Installation

  1. Create the module directory:

    mkdir -p app/code/Xguenel/CollapsibleToggle
    
  2. Copy the module files to this directory

  3. Enable the module:

    bin/magento module:enable Xguenel_CollapsibleToggle
    
  4. Update the database and recompile:

    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento cache:flush
    

Configuration

Access the module configuration via:

Stores > Configuration > Xguenel Extensions > Collapsible Toggle

Available Options

Option Description Default Value
Enable Module Enables or disables the module Yes
Expand All Key Key to expand all elements (with Ctrl/Cmd + Shift) A

Usage

Default Keyboard Shortcuts

Action Windows/Linux macOS
Expand or Collapse all elements Ctrl + Shift + A ⌘ + Shift + A

How to Use

  1. Log in to the Magento back-office
  2. Navigate to a page containing collapsible elements (e.g., System > Configuration)
  3. Use the keyboard shortcuts to expand/collapse all elements

Module Structure

Xguenel/CollapsibleToggle/
├── Block/
│   └── Adminhtml/
│       └── CollapsibleToggle.php             # Block to retrieve configuration
├── etc/
│   ├── acl.xml                               # ACL permissions definition
│   ├── adminhtml/
│   │   └── system.xml                        # Admin system configuration
│   ├── config.xml                            # Default configuration values
│   └── module.xml                            # Module declaration
├── view/
│   └── adminhtml/
│       ├── layout/
│       │   ├── adminhtml_dashboard_index.xml # Dashboard layout
│       │   ├── catalog_product_index.xml     # Product index layout
│       │   ├── default.xml                   # Default layout
│       │   └── sales_order_index.xml         # Order index layout
│       └── templates/
│           └── collapsible-toggle.phtml      # Template with JavaScript
├── composer.json                             # Composer dependencies
├── LICENSE                                   # License file
├── registration.php                          # Module registration
├── README.md                                 # This file (English)
└── README_FR.md                              # French documentation

ACL Permissions

The module defines an ACL permission for configuration access:

  • Xguenel_CollapsibleToggle::config - Access to module configuration

Browser Compatibility

The module is compatible with all modern browsers supporting:

  • ES5 JavaScript
  • jQuery (included in Magento)
  • The KeyboardEvent API
  • The User-Agent Client Hints API (with fallback to navigator.userAgent for older browsers)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Xguenel

© 2025 Xguenel. All rights reserved.

Support

For any questions or issues, please create an issue in the project repository.

Changelog

Version 1.0.0

  • Initial release
  • Keyboard shortcuts to expand/collapse collapsible elements
  • macOS support with Command key
  • Customizable key configuration
  • Module enable/disable option

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.