Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: SidebarProvider sliding effect with nested Button on mobile #6159

Open
2 tasks done
jmaldon1 opened this issue Dec 22, 2024 · 0 comments
Open
2 tasks done

[bug]: SidebarProvider sliding effect with nested Button on mobile #6159

jmaldon1 opened this issue Dec 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jmaldon1
Copy link

jmaldon1 commented Dec 22, 2024

Describe the bug

I get a wierd visual sliding effect when I set size="icon" on a nested component within a SidebarProvider. but I only see this behavior on a mobile screen. I am on next JS if that matters.

The video below shows the issue with the size="icon" prop enabled, then I comment it out and refresh the page to show it stops the issue:

Recording.2024-12-22.170346.mp4

The Component:

    <div className={`flex flex-row ${props.className}`}>
      <MonacoEditorBase
        code={code}
        updateCode={updateCode}
        diagnosticsInfo={diagnosticsInfo}
        className="h-full"
        {...props}
      />
      <Button
        variant="outline"
        size="icon"
        className="flex w-8 h-full"
        onClick={resetCode}
      >
        <RotateCcw size={18} />
      </Button>
    </div>

Affected component/components

SidebarProvider, Button

How to reproduce

  1. Open the mobile view on chrome
  2. Leaving the size="icon" prop, I will see the sliding and refresh
  3. Commenting out the size prop or changing it to another value besides icon will stop the issue.

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Next JS, Chrome

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@jmaldon1 jmaldon1 added the bug Something isn't working label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant