Scroller extension incompatible with dark themes

Open
#1,097 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
42/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, r
Domain
documentation

Research direction

Review the documentation for DT::datatable(), especially the scroller extension, Bootstrap styling, and DTOutput() usage. Confirm how scroller's unloaded-region background interacts with dark themes, then document the incompatibility and any supported workaround; no specific documentation file or test is named in the issue.

Written by the indexing model from the issue text.

Description

ordinarily the table is transparent and can work with themes, provided style = 'bootstrap' is included in DT::datatable(). Per this topic at datatables the scroller extension itself sets a white background due to scroller using a diagonal striped background to show unloaded regions while the user scrolls.

Since this is upstream in DT itself I think all that should be done here is update the documentation to note the incompatibility.

It's also possible to override some of the CSS that the scroller extension adds using the below snippet just above DTOutput(), but I don't know what other issues this will cause:

          tags$style(HTML('div.dts div.dataTables_scrollBody table {background-color:transparent}')),
          tags$style(HTML('div.DTS tbody tr {background-color:transparent}')),
Dominant language
JavaScript
Stars
621
Forks
177
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rstudio/DT

All issues in rstudio/DT

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.