bigomics / omicsplayground

Visual self-service analytics platform for big omics data.
http://www.bigomics.ch
Other
118 stars 35 forks source link

shorten long table entries #328

Open ivokwee opened 1 year ago

ivokwee commented 1 year ago

Problem: In many table we have long descriptions that force the table to be very wide or overflow.

possbile solution: In some table we have truncated the descriptions, a better solution is to use a JS snippet like in Pathway analysis > wikipathways > Enrichment table. It inserts this JS (found somewhere...)

          columnDefs = list(list(
            targets = 1, ## with no rownames column 1 is column 2
            render = DT::JS(
              "function(data, type, row, meta) {",
              "return type === 'display' && data.length > 50 ?",
              "'<span title=\"' + data + '\">' + data.substr(0, 50) + '...</span>' : data;",
              "}")
          ))

The other points is that many long geneset names are often having lots of underscores instead of spaces preventing the cell to wrap to newline. Perhaps substituting the underscore in the table may also be good idea if wrap newline is permitted. The dataset loading table have this.

ncullen93 commented 1 year ago

Marking as uncloseable because there is no way to know when we have solved this problem in "many tables" with long descriptions. I recommend either closing the issue or adding info about specific tables which have this issue along with a way to reproduce the issue. Otherwise, this issue will just stay open forever.

ivokwee commented 1 year ago

This is an issue and should not be closed until solved. If the description is not precise enough to be closable, and you don't feel like solving this bug yourself, you should at least help to make the description better, go through all tables that need it and report the list here for the one that want to tackle this issue.