Skip to content

Conversation

rtripault
Copy link
Contributor

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)

@smg6511
Copy link
Collaborator

smg6511 commented May 24, 2025

Hey @rtripault - First, good catch! You were definitely on the right track. As I was reviewing your PR, I found a couple issues but couldn't make my suggestions directly on your PR since they were out of the selectable range; so I went ahead and posted an alternate PR (#16748).

@matdave matdave added the type-frontend Issues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript. label Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-frontend Issues related to UI/UX issues, mostly about styles and frontend implementations on JavaScript.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants