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

Added column re-ordering #13613

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Added column re-ordering #13613

merged 1 commit into from
Sep 18, 2023

Conversation

snipe
Copy link
Owner

@snipe snipe commented Sep 15, 2023

This is an experimental branch that adds the long-requested column re-ordering functionality. I've tried this before with mixed results, but I think BS tables and some of the extensions associated may have improved over time.

Shorter tables:

Screen.Recording.2023-09-15.at.10.02.37.PM.mov

Longer tables with sticky header:

Screen.Recording.2023-09-15.at.10.04.46.PM.mov

I have noticed a few times where the wrong values are displaying when a column is moved, as if it remembers the value of the column but only moves the header. It's hard to reproduce though. :-/ (This is similar to what I ran into the last time I tried this. It's fixable by moving the column again, but it might be too annoying to users to keep this feature.)

It's also a little annoying that when you click on the column header to re-order it, it also re-sorts it, but I'm not sure if there's a way around this.

If you're wondering why we're not using the node modules, it's because the drag table and re-sort libraries haven't had a release haven't been updated in npm in quite some time (they have tagged releases), and the highest I can get from npm is 2.0.12, while the latest is 2.0.15. :(

@what-the-diff
Copy link

what-the-diff bot commented Sep 15, 2023

PR Summary

  • Enhancements in CSS Files
    The css file (public/css/dist/all.css) has been updated, including the addition of dragtable styles and a refresh in skin styles. The same dragtable styles are introduced in public/css/dist/bootstrap-table.css.

  • Update in mix-manifest.json
    The versions for all.css and bootstrap-table.css have been changed to reflect their latest revisions.

  • New dragtable.css File
    A new css file - resources/assets/css/dragtable.css is introduced with this PR.

  • Changes in bootstrap-table.blade.php
    The file - resources/views/partials/bootstrap-table.blade.php sees a JavaScript code update boosting the functionality of the bootstrap table. A new option is also added to allow rearrangement of columns.

  • Updates in webpack.mix.js File
    Both the list of CSS and JavaScript files in webpack.mix.js get new additions: dragtable.css for CSS, and dragtable.js along with bootstrap-table-reorder-columns.js for JavaScript. These updates aim to augment the user interface.

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The quirks you mentioned are valid but I hope the ability to arrange columns overcomes them. (I wasn't able to trigger the wrong values being displayed after re-ordering)

It's also a little annoying that when you click on the column header to re-order it, it also re-sorts it, but I'm not sure if there's a way around this.

This didn't seem to happen for me in Brave FWIW. I'm using an Apple Trackpad that doesn't require actually clicking to drag though so maybe that was the key?

@snipe
Copy link
Owner Author

snipe commented Sep 18, 2023

This didn't seem to happen for me in Brave FWIW. I'm using an Apple Trackpad that doesn't require actually clicking to drag though so maybe that was the key?

Huh. I'm using my trackpad on my MacBook Pro. I tested on Safari and Firefox (and I think Chrome).

@snipe
Copy link
Owner Author

snipe commented Sep 18, 2023

As I mentioned on the dev call today, I might feel better making this something the user can turn off, just in case it's frustrating to them. That might come later though, depending on user feedback.

@marcusmoore
Copy link
Collaborator

Huh. I'm using my trackpad on my MacBook Pro. I tested on Safari and Firefox (and I think Chrome).

Hm...I'm using an Apple Magic Trackpad but that shouldn't make a difference...

CleanShot.2023-09-18.at.12.55.11.mp4

I might feel better making this something the user can turn off, just in case it's frustrating to them

I think that's a pretty good idea...

@snipe snipe merged commit 68fa6d5 into develop Sep 18, 2023
@snipe snipe deleted the features/reorder_columns branch January 17, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants