Skip to content

Conversation

@schivmeister
Copy link
Contributor

@schivmeister schivmeister commented Nov 7, 2025

Wide tables did not trigger a horizontal scrollbar either on the page or the table, therefore cutting off the table. Add some JavaScript and CSS tricks suggested by CursorAI, namely with scrollX and accompanying CSS to allow the scrollbar on the DataTable, plus a post-init function to update the table columns after any screen resize. Also, add/restore full HTML report print functionality (uncertain if this ever worked).

Wide tables did not trigger a horizontal scrollbar either on the page or
the table, therefore cutting off the table. Add some JavaScript and CSS
tricks suggested by CursorAI, namely with `scrollX` and accompanying CSS
to allow the scrollbar on the DataTable.
@schivmeister schivmeister self-assigned this Nov 7, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 65 to 67
table.display {
width: 100% !important;
min-width: 100%;

Choose a reason for hiding this comment

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

P1 Badge Allow DataTables to set its own table width

The added CSS sets table.display { width: 100% !important; }, which overrides the inline width that DataTables applies when scrollX: true. With the fixed width in place, the table can never grow beyond its container, so no horizontal scrollbar appears and wide tables remain truncated. Dropping the !important or the fixed width lets DataTables expand the table and enables the scroll behaviour.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed along with updating the table for screen resizes

schivmeister added a commit to meaningfy-ws/rdf-differ-ws that referenced this pull request Nov 7, 2025
Wide tables did not trigger a horizontal scrollbar either on the page or
the table, therefore cutting off the table. Add some JavaScript and CSS
tricks suggested by CursorAI, namely with `scrollX` and accompanying CSS
to allow the scrollbar on the DataTable.

Application of meaningfy-ws/diff-query-generator#33.

Fixes gh-130, DIF1-27
@schivmeister schivmeister changed the title fix: enable table horizontal scrolling when wide Enable table horizontal scrolling when wide Nov 7, 2025
schivmeister added a commit to meaningfy-ws/rdf-differ-ws that referenced this pull request Nov 11, 2025
Wide tables did not trigger a horizontal scrollbar either on the page or
the table, therefore cutting off the table. Add some JavaScript and CSS
tricks suggested by CursorAI, namely with `scrollX` and accompanying CSS
to allow the scrollbar on the DataTable.

Application of meaningfy-ws/diff-query-generator#33.

Fixes gh-130, DIF1-27
schivmeister added a commit to meaningfy-ws/rdf-differ-ws that referenced this pull request Nov 11, 2025
Wide tables did not trigger a horizontal scrollbar either on the page or
the table, therefore cutting off the table. Add some JavaScript and CSS
tricks suggested by CursorAI, namely with `scrollX` and accompanying CSS
to allow the scrollbar on the DataTable.

Application of meaningfy-ws/diff-query-generator#33.

Fixes gh-130, DIF1-27
schivmeister added a commit to meaningfy-ws/rdf-differ-ws that referenced this pull request Nov 11, 2025
Wide tables did not trigger a horizontal scrollbar either on the page or
the table, therefore cutting off the table. Add some JavaScript and CSS
tricks suggested by CursorAI, namely with `scrollX` and accompanying CSS
to allow the scrollbar on the DataTable.

Application of meaningfy-ws/diff-query-generator#33.

Fixes gh-130, DIF1-27
- remove forced table width so scrollX can size columns
- allow overflow-x only on screen and expand tables for print
- adjust columns on window resize to keep headers aligned
schivmeister added a commit to meaningfy-ws/rdf-differ-ws that referenced this pull request Nov 11, 2025
Wide tables did not trigger a horizontal scrollbar either on the page or
the table, therefore cutting off the table. Add some JavaScript and CSS
tricks suggested by CursorAI, namely with scrollX and accompanying CSS
to allow the scrollbar on the DataTable, plus a post-init function to
update the table columns after any screen resize.

Application of meaningfy-ws/diff-query-generator#33.

Fixes gh-130, DIF1-27
The JS script of the HTML report layout initialized all tables with the
same DataTables instance. This means:

It treated all `<table class="display">` elements as one combined table.
Some tables have 3 columns, others have 7 or more columns, and some have
empty cells. DataTables tries to apply sorting logic (aDataSort) across
mismatched column structures, leading to the following error in the
browser console:

```
jquery.dataTables.min.js:83  Uncaught TypeError: Cannot read properties of undefined (reading 'aDataSort')
```

Replace the single initialization with per-table initialization using
dynamic column mapping, and update other functions accordingly. Remove
also unnecessary and redundant function wrapping from the only two
functions for `#toc` and `#printButton`.

WARNING: This print functionality automatically expands all pages of
tables in the HTML view before the print view, so you will have to
refresh the page if you desire the paging reactivated.
@schivmeister schivmeister changed the title Enable table horizontal scrolling when wide Enable table horizontal scrolling when wide, full page print Nov 11, 2025
@schivmeister schivmeister changed the title Enable table horizontal scrolling when wide, full page print Enable table horizontal scrolling when wide + full page print Nov 11, 2025
schivmeister added a commit to meaningfy-ws/rdf-differ-ws that referenced this pull request Nov 11, 2025
Wide tables did not trigger a horizontal scrollbar either on the page or
the table, therefore cutting off the table. Add some JavaScript and CSS
tricks suggested by CursorAI, namely with scrollX and accompanying CSS
to allow the scrollbar on the DataTable, plus a post-init function to
update the table columns after any screen resize. Also, add/restore full
HTML report print functionality (unsure if this ever worked).

Application of meaningfy-ws/diff-query-generator#33.

Fixes gh-130, DIF1-27

fix
Copy link
Contributor

@costezki costezki left a comment

Choose a reason for hiding this comment

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

looks good

@schivmeister schivmeister merged commit b6d8ed0 into main Nov 12, 2025
2 checks passed
@schivmeister schivmeister deleted the feature/DIF1-27_wide-tables branch November 12, 2025 09:24
schivmeister added a commit to meaningfy-ws/rdf-differ-ws that referenced this pull request Nov 12, 2025
Wide tables did not trigger a horizontal scrollbar either on the page or
the table, therefore cutting off the table. Add some JavaScript and CSS
tricks suggested by CursorAI, namely with scrollX and accompanying CSS
to allow the scrollbar on the DataTable, plus a post-init function to
update the table columns after any screen resize. Also, add/restore full
HTML report print functionality (unsure if this ever worked).

Application of meaningfy-ws/diff-query-generator#33.

Fixes gh-130, DIF1-27

fix
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.

3 participants