Open dakahn opened 4 years ago
Refs https://drafts.csswg.org/css-overflow-3/#propdef--webkit-line-clamp (Though IE11 doesn't support it)
I doubt that scrolling within a cell is a suitable solution for long cell content in many use cases, because
@aagonzales Tagging you in here to maybe discuss our thinking behind the scrolling spec
Its not scrolling within a cell, the whole row/table will horizontally scroll. Like what Lightening is doing in these examples (look at Base). The table rows retain their original row height and horizontally scrolls the whole table.
https://www.lightningdesignsystem.com/components/data-tables/
If content is excessively long then it shouldn't be displayed in a data table row cell. Those types of content should utilize the expandable table row to show long content. If long data strings are being put into data table cells then that is a matter of poor design decisions.
@aagonzales I generally agree with your point, but it only seems to address "curated" tables - i.e. tables in which the column structure is known at ui design time.
In our case (IBM Cloud SQL Query) we are previewing arbitrary tabular (e.g. csv) data that we retrieve from Cloud Object Storage. Columns could contain various (previously unknown) types of data (that we all convert to string) at unknown size.
A user would first like to see a suitable "overview" of the tabular data, where long cell data would be truncated. Then he may want to "drill" into the data of one column or cell to see all (or at least more) of that data. Varying the column width would be one option to show more of a column's content (I am looking at https://github.com/carbon-design-system/carbon/issues/4751 for that purpose), tooltips with the option of a "copy to clipboard" would be our preferred option to show the content of one cell.
Here is how our ui along with a data table looks today (it uses the ap-components table, which we want to replace by a sticky header DataTable
- you can see that columns are resizable and broad tables are horizontally scrollable):
We want the default to be the horizontal scroll and then I think we can allow alternate ways to truncate data. This issue is to change the default.
Agreed - but then we need another issue to deal with arbitrary content (aka alternate ways to truncate data). Shall we re-open https://github.com/carbon-design-system/carbon/issues/5048?
I've reopened the issue referenced as an open proposal for an alternative text truncation patteer @gmoehler
Asking for text wrap setting. We need a conversation around text wrap settings. @vsnichols Check to see how it relates to horizontal scrolling. This needs more design exploration.
ref #5048
Our current implementation of Datatable doesn't follow the design specifications when handling very long header or cell text.
- header text should wrap to two lines and then begin to scroll - table body cell text should scroll, but not wrap
Instead it does this: