A lot of modals have a helper function to open them, async function openXXXModal(). With the responsive, we can open modal in different ways, depending on wether we're on a large or a small display. Since those are functions, they cannot use the tools that we have to detect the display size because it's a composable, and we end up updating all those function to add a boolean.
Check if it would be possible to regroup all those function inside a composable. Since some functions are defined in megashark-lib, see if a composable can be extended. The final result should be something like
const modals = useModals();
await modals.openRenameWorkspaceModal(arg1, arg2);
All functions to open modals would be grouped inside one composable, and they would have automatic access to the display size.
A lot of modals have a helper function to open them,
async function openXXXModal(). With the responsive, we can open modal in different ways, depending on wether we're on a large or a small display. Since those are functions, they cannot use the tools that we have to detect the display size because it's a composable, and we end up updating all those function to add a boolean.Check if it would be possible to regroup all those function inside a composable. Since some functions are defined in megashark-lib, see if a composable can be extended. The final result should be something like
All functions to open modals would be grouped inside one composable, and they would have automatic access to the display size.