revolution icon indicating copy to clipboard operation
revolution copied to clipboard

Moved logic to add/remove collapsed (left bar) css class in appropriate event handlers

Open rtripault opened this issue 5 months ago • 1 comments

What does it do?

Moved the logic to add/remove the collapsed CSS class on the "trigger" to collapse/expand the manager left bar (trees)

Why is it needed?

The logic was initially set in a "click" handler, making it only happening when clicking on the trigger (arrow). However, ExtJS code (Ext.getCmp('modx-layout').toggleLeftbar(), Ext.getCmp('modx-layout').hideLeftbar(), Ext.getCmp('modx-layout').showLeftbar()) could also be executed to perform the same action without "clicking" on the trigger, resulting in visual contraction like having the tree collapsed, but the trigger offering to collapsed it anyway.

How to test

Once the manager is loaded, in the browser console, execute Ext.getCmp('modx-layout').toggleLeftbar()

Without this patch, the "trigger" arrow should not change direction. With this patch applied, it should reflect the tree state (collapsed or expanded)

rtripault avatar May 06 '25 15:05 rtripault