SuiteCRM
SuiteCRM copied to clipboard
Smaller screens automatically collapse non-subpanel panels
Issue
Suite will auto collapse Subpanels on screens below "Large"(less than 1130 pixels). This code also collapses regular panels on the detail view. This seems to be an unintended side effect.
Large screen:
Small screen(requires a reload):
Expected Behavior
Subpanels should be collapsed but panels with information on them from the current record should remain expanded if that is the default state.
Actual Behavior
Subpanels and regular panels start collapsed on screens smaller than 1130 px.
Possible Fix
Check for the substring "subpanel" on the element id when deciding if the panel should be collapsed.
Steps to Reproduce
- Open a Case record in detail view on a large screen greater than 1130 pixels, the "Case Updates" should be expanded.
- Resize the window so that it is less than 1130px width
- Reload the page
- The "Case Updates" panel will start collapsed
Context
Using SuiteCRM on mobile can hide important panels.
Your Environment
- SuiteCRM Version used: 7.12.6
- Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox 102.0
- Environment name and version (e.g. MySQL, PHP 7): PHP 7.4
- Operating System and version (e.g Ubuntu 16.04): Ubuntu 20.04.4 LTS
I'm not so sure this is unintended, I think it is a way of not forcing people to scroll so much on a small screen. For example, Wikipedia does the same, collapses content on mobile.
That said, maybe it doesn't have to be this way and your way is better. At least it would be nice to make it configurable system-wide, or remember what the user did last time, to avoid forcing people to keep expanding every time.
I'm not so sure this is unintended, I think it is a way of not forcing people to scroll so much on a small screen. For example, Wikipedia does the same, collapses content on mobile.
That said, maybe it doesn't have to be this way and your way is better. At least it would be nice to make it configurable system-wide, or remember what the user did last time, to avoid forcing people to keep expanding every time.
Hi pgorod,
The reason I believe it to be unintended is that the regular panels are different from the subpanels. Where subpanels can be reordered on the detail view and their expanded state is remembered per User, regular panels can only be configured this way in the vardefs/studio.
There is an option to "lock subpanels" so that they can't be reordered and they don't collapse for mobile screens, which basically prevents the script for collapsing the panels from loading and therefore fixes the issue as well.
For these reasons I believe the original intent was to only target subpanels.
I agree that the better solution could be to have configurable options to handle the panels separately, but similar to the subpanels for mobile screens.