Skip to content

Drawer Issues #189

@MarcSkovMadsen

Description

@MarcSkovMadsen

After merging main into #143 handling merge conflicts by using only incoming Drawer jsx and .py code I see

Drawer takes of space when hidden

Image

The problem is the Drawer el element takes up width and height.

I had solved that by adding below to Drawer .py class

    def __init__(self, *objects, **params):
        # If the width or height is > 0 it will take up that space when not open
        params.update(width=0, height=0, sizing_mode="fixed",)
        super().__init__(*objects, **params)

sx and view issues

Reviewing the .jsx file I also notice

  • The sx parameter is not handled on the .jsx side
  • the view is unused.

Image

Missing Padding

Finally I had added padding: 5x by default to the Drawer because otherwise its objects will stretch almost to the side which gives a very "cramped look" (shown below) compared to existing Panel sidebars.

Image

I fixed that by adding

sx={{"& .MuiPaper-root": {padding: "5px"}, ...sx}}

align parameter on child objects not working

In #143 I can't get the objects to align center horizontally inside the Drawer unless I put them in a Column inside the Drawer.

variant is documented twice

Image

No Close Button

The drawer in the reference example https://demos.creative-tim.com/material-dashboard/pages/dashboard has a close Button.

Image

You can add one manually and hook it up. But I think its a very common use case to want to add a close button because its not obvious to all users that they can just click outside the Drawer to close it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions