material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[Card] Fix `CardActions` spacing for different button components

Open Janpot opened this issue 3 years ago • 7 comments

Noticed that the spacing was off when different components are used for Card actions. See the spacing between second and third action here.

Also fixes https://github.com/mui/material-ui/issues/29819

Janpot avatar Mar 18 '22 16:03 Janpot

Netlify deploy preview

https://deploy-preview-31885--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad) Details of bundle changes

Generated by :no_entry_sign: dangerJS against ba2f49e750622c5037d3aa5cfe3952c55bec33ed

mui-bot avatar Mar 18 '22 16:03 mui-bot

Just noticed AccordionActions and DialogActions use a similar implementation for their spacing

Janpot avatar Mar 18 '22 17:03 Janpot

@siriwatknp Understood, I added this PR on the list of https://github.com/mui/material-ui/issues/30660

Janpot avatar Mar 23 '22 16:03 Janpot

We can merge this in v7.

siriwatknp avatar Mar 14 '24 08:03 siriwatknp

@siriwatknp I've merged master and replaced the tests with integration tests. The tests were testing implementation details and that's rather useless in this case (i.e. the computed styles don't necessarily guarantee the gap is correct visually, other properties may affect it).

Janpot avatar Mar 14 '24 10:03 Janpot

@siriwatknp I've merged master and replaced the tests with integration tests. The tests were testing implementation details and that's rather useless in this case (i.e. the computed styles don't necessarily guarantee the gap is correct visually, other properties may affect it).

I think it's fine to not have extra tests for this (the demos' visual regression should be enough). Feel free to remove them.

siriwatknp avatar Mar 15 '24 03:03 siriwatknp

Feel free to remove them.

It can't find any demo that covers this specific case. Perhaps it's best to keep them?

Janpot avatar Mar 15 '24 06:03 Janpot