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

Fix several issues with Datatables #3750

Merged
merged 10 commits into from
Dec 17, 2024
Merged

Conversation

chrisvanrun
Copy link
Contributor

This addresses several issues for the styling of Datatables

Closes #3745

Styling

The PR introduces a few custom CSS styles, overwriting some of the styles found in the bootstrap-4 extension of Datatables.

Leaderboard

The dom option is deprecated in Datatables. It had to be updated anyway to account for the new styling. This PR uses the new layout option in Datatables to set things up in a future-proof manner.

There are four states, as shown below.

Regular

image

Date & Additional Metrics

image

Date

image

Additional Metrics

image

Other

It also consolidates a few common settings in Datatables:

  • Adds a default via-html-element-class selectable "nonSortable" column, employing it in one additional location.
  • Sets the default paging size to 50 (most common).
  • Sets the default type to "string" of client-side datatables, which indicates: do not transform content when searching/ordering. Also prevents unexpected styles from being applied because of 'automagically' detected content types.

@chrisvanrun chrisvanrun linked an issue Dec 13, 2024 that may be closed by this pull request
@chrisvanrun chrisvanrun marked this pull request as ready for review December 13, 2024 11:26
@chrisvanrun
Copy link
Contributor Author

Kudos to James for having the hawkish eyesight to see the incongruent styling.

@chrisvanrun
Copy link
Contributor Author

Also added a small tooltip for orderable headers. For instance, today I learned you can sort by multiple columns by holding Shift:

image

@chrisvanrun chrisvanrun assigned jmsmkn and unassigned chrisvanrun Dec 17, 2024
@chrisvanrun chrisvanrun requested a review from jmsmkn December 17, 2024 13:25
@jmsmkn jmsmkn merged commit 1739b40 into main Dec 17, 2024
8 checks passed
@jmsmkn jmsmkn deleted the 3745-several-issues-with-tables-update branch December 17, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Several issues with tables update
2 participants