ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Buttons not responsive in AG Grid

Open GCHQ-Developer-847 opened this issue 1 year ago • 0 comments

Summary of the bug

When buttons are used in an AG Grid and the column width is made smaller than that of the buttons, they just get cropped and do not resize.

🪜 How to reproduce

  1. Create an AG Grid. (There should be a story added once #2130 is complete which you can use.)
  2. Add some buttons into one of the columns.
  3. Make the column width smaller than the width of the buttons (drag the column divider in the UI).
  4. See that the buttons don't resize at all and are just cropped.

📸 Screenshots or code

https://github.com/user-attachments/assets/a16095db-7b4c-455b-8642-5a5af2022952

🧐 Expected behaviour

The buttons should resize to match the size of the column. Considering what has been implemented as part of #2130, it would probably be best for the label to be truncated with an ellipsis (but only when in an AG Grid, e.g. using the new isElInAGGrid helper function).

📝 Acceptance Criteria

Given that I am using an AG Grid and add buttons to the columns When I resize those columns to have a smaller width than the buttons Then the buttons resize to match the width And the text should be truncated with an ellipsis.

Additional info

This is probably blocked by #2130, as the behaviour should probably match and the changes for the ticket need to be reviewed by the team and checked that this is the behaviour we want.

GCHQ-Developer-847 avatar Jul 30 '24 14:07 GCHQ-Developer-847