outl1ne / nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag & drop.
MIT License
284 stars 120 forks source link

Scrolling sideways on resource index broken since nova 4.17.0 #158

Closed ramonfeleus closed 1 year ago

ramonfeleus commented 1 year ago

Description:

Open a Nova Resource index page on a smaller screen where all columns do not fit horizontally in the viewport(e.g. smartphone, tablet, small desktop). Attempt to scroll sideways to view the other columns and action buttons. Scrolling sideways won't work. This happened after we've upgraded a an older site's nova version to the latest 4.20.2 version. After downgrading nova to specific versions I found that it has been an issue since nova 4.17.0. It seems the precedence of css classes on the list is the problem:

Scherm­afbeelding 2023-01-13 om 15 51 18

The o1-overflow-hidden class sets an overflow: hidden, disallowing all scrolling on the overview. While o1-overflow-x-auto should enable scrolling on the horizontal x-axis by setting overflow-x: auto. But the o1-overflow-hidden overrides o1-overflow-x-auto. In the screenshot you will see that o1-overflow-hidden appears twice in the css inheritance in the inspector, indicating it might be in the css twice.

When I set composer to nova 4.16.1 it works. This has different html classes which make sure the scrolling on the x-axis is enabled again after setting overflow: hidden on the overview.

Scherm­afbeelding 2023-01-13 om 15 52 35

The MenuBuilder.vue along with entry.css and entry.js from the nova-menu-builder are the only files within my project which actually have the o1-overflow-hidden class. So I'm guessing the menu builder is interfering with other resource index pages.

Detailed steps to reproduce the issue:

KasparRosin commented 1 year ago

@ramonfeleus Hey, thanks for the report. I transfered the issue to nova-sortable, since I assume this package causes it.

Could you confirm, that you also have nova-sortable installed?

ramonfeleus commented 1 year ago

@ramonfeleus Hey, thanks for the report. I transfered the issue to nova-sortable, since I assume this package causes it.

Could you confirm, that you also have nova-sortable installed?

Thanks. Yes, that's also in the stack, nova-translatable as well from Outl1ne.

KasparRosin commented 1 year ago

Published version 3.4.2 that addresses this issue. Thanks for the report!