fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Details List: Inconsistently Handling Column Resize

Open dps88 opened this issue 5 years ago • 1 comments

Environment Information

  • Package version(s): "@fluentui/react": "^7.155.3"

Please provide a reproduction of the bug in a codepen:

https://codepen.io/duschroe/pen/poEawVV

Has this been discussed before?:

Roughly, Yes. #15971, #15786. I think those are missing some helpful information though.

Actual behavior:

When a details list has ConstrainMode.unconstrained and DetailsListLayoutMode.justified, the way columns that overflow are handled is a little inconsistent.

  • If no columns are provided, overflow columns drop off the table.

  • If columns are provided, overflow columns remain

    • Adding isCollapsible: true can be used to match the default columns
    • However, without isCollapsible, overflow columns cannot be resized once they are in overflow.
    • This isn't good for tables with many columns and/or multiline columns.
  • Only the first column is resizable if the combined column width is larger than the table viewport

Expected behavior:

Using fixed columns can be used for most cases where there are too many columns but doesn't work great for few columns or really large browser viewports. It creates wasted space
image

With ConstrainMode.unconstrained and DetailsListLayoutMode.justified, ideally a Details list should:

  • Do it's best to scale the columns appropriately if columns fit in viewport

  • If they don't fit, use minWidth and observe user resizing for all columns. Even if the column is in overflow.

    • The DetailsList was working roughly like that when we started using FluentUI (roughly 7.110) and is the case if you change the version in the codepen I provided.
  • Maintain the resized column width across all columns

    • Earlier versions reset overflow columns to minWidth if they are not the column being currently adjusted

Priorities and help requested:

Are you willing to submit a PR to fix? No

Requested priority: Normal

Products/sites affected: (if applicable)

dps88 avatar Jan 01 '21 00:01 dps88

Thanks for the detailed repro info, and sorry for the delayed response. I think this is a duplicate of #15971 (slightly different scenario but very likely the same root cause), so I'm going to close this one and continue the discussion there.

ecraig12345 avatar Jan 26 '21 03:01 ecraig12345