onPointerClose and onClickClose are necessary to prevent Cancel Item Button tooltip from flashing onClick
tooltip comes back onModalClose because when modal closes, focus goes back to the modal trigger which is the ListItemButton, re-triggering the tooltip (I removed it, but if it looks better without it then we should keep it)
Other Notes
I think for refactoring in general we should try to compartmentalize large component files, like this PR does, (create more component files with less lines) for cleaner code quality, because components should not be 100s of lines long. Perhaps we can talk about this in meeting.
Overview
Details
onPointerClose
andonClickClose
are necessary to prevent Cancel Item Button tooltip from flashingonClick
onModalClose
because when modal closes, focus goes back to the modal trigger which is theListItemButton
, re-triggering the tooltip (I removed it, but if it looks better without it then we should keep it)Other Notes
I think for refactoring in general we should try to compartmentalize large component files, like this PR does, (create more component files with less lines) for cleaner code quality, because components should not be 100s of lines long. Perhaps we can talk about this in meeting.