Skip to content

Standardize how modals are opened #10224

@Max-7

Description

@Max-7

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ClientArea: Parsec desktop applicationenhancementImprove functionality, potentially changing behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions