Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested change to the collapsing of tables in CP #2731

Closed
lukeyouell opened this issue Apr 12, 2018 · 6 comments
Closed

Suggested change to the collapsing of tables in CP #2731

lukeyouell opened this issue Apr 12, 2018 · 6 comments
Labels
enhancement improvements to existing features ux 😄 features related to user experience

Comments

@lukeyouell
Copy link

Description

I use the Magnet app on my iMac and usually work with my screen split in two, one half being taken up by Atom and the other by my browser which has recently started causing tables in the CP to collapse.

At the moment I believe the CP breakpoint is set to 1300px, whereas half of an iMac's screen size is 1280px which can be quite frustrating at times. Are there any reasons against dropping this breakpoint below 1280px?

Additional info

  • Craft version: 3.0.2
@janhenckens
Copy link
Contributor

I use a similar setup (high resolution Dell monitor instead of an iMac) and notice this too. Not a big deal but bit of on inconvenience none the less.

@lukeyouell
Copy link
Author

I've been made aware that tables collapse into blocks depending on the size of the content rather than CSS breakpoints, I've changed the issue title to reflect this.

Collapsing tables to blocks on desktop doesn't really feel like it works too well, personally I'd prefer to scroll horizontally than see a complete switch from tables to blocks.

@lukeyouell lukeyouell changed the title Suggested decrease to CP CSS breakpoint Suggested change to the collapsing of tables in CP Apr 12, 2018
@carlcs
Copy link
Contributor

carlcs commented Apr 12, 2018

Yeah horizontal scrolling or something like http://filamentgroup.github.io/tablesaw/demo/swipe.html

@brandonkelly
Copy link
Member

Collapsible tables will collapse once there is not enough horizontal room to display the table without it bleeding out of its container element. So depends on the content of the table and the number of columns; not a CSS rule. I’ll leave this open though, as there’s probably better options, like that TableSaw lib @carlcs linked.

@stevehurst
Copy link

stevehurst commented Mar 1, 2019

I've added a JS injection to our control panel to completely disable collapsing tables.

function removeCollapsed() {
    $('table.collapsed').removeClass('collapsed');
}

$(window).resize(function(){
    removeCollapsed();
});

$(document).ready(function() {
    removeCollapsed();
});

I'm concerned that this conflicts with the built-in window resize function, but it works to disable it.

We had half of our Entry and Asset tables collapsing due to long column content and fields displayed, and the result was heavily unusable.

brandonkelly added a commit that referenced this issue Nov 17, 2019
@brandonkelly brandonkelly added enhancement improvements to existing features ux 😄 features related to user experience and removed authoring ✍️ features related to author experience labels Nov 17, 2019
@brandonkelly brandonkelly added this to the 3.4 milestone Nov 17, 2019
@brandonkelly
Copy link
Member

As of Craft 3.4, all built-in Control Panel tables will scroll horizontally rather than collapsing.

Plugin devs: To switch a collapsible table to a scrollable one, remove its collapsible class and wrap it in a div with a scrolltable class:

<!-- old -->
<table class="data fullwidth collapsible">
    ...
</table>

<!-- new -->
<dvi class="scrolltable">
    <table class="data fullwidth">
        ...
    </table>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to existing features ux 😄 features related to user experience
Projects
None yet
Development

No branches or pull requests

5 participants