Skip to content

SQL Lab container div not showing because height is 0px #32027

@jwoodb

Description

@jwoodb

Bug description

The bug is that I...

  1. Cloned the superset repo to my local machine
  2. Ran docker compose up --build
  3. Logged in and accessed the SQL Lab tab.
  4. The page was blank except for the query tabs (see screenshot)
Image

Expected behaviour: The full UI shows.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

Not applicable

Node version

18 or greater

Browser

Chrome

Additional context

No issues were logged in the superset_app docker container.

There were no errors in the JS console in the browser, only this:

Image

I took a look at the markup and I could see it was all there, but collapsed. It appears that this div was the culprit because it did not set a height:

<div data-test="SqlLabApp" class="App SqlLab css-6pihn3">

I add the height: 100vh to the SqlLabStyles CSS in the following file: superset-frontend/src/SqlLab/components/App/index.tsx

const SqlLabStyles = styled.div`
  ${({ theme }) => css`
    &.SqlLab {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      padding: 0 ${theme.gridUnit * 2}px;
      height: 100vh; // Add this new rule
     ...

And, the page displays as expected.

I have no idea why this wasn't working for me without me having to add this additional CSS rule.

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sqllab:designRelated to the SQL Lab UI/UX

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions