You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "jwoodb (via GitHub)" <gi...@apache.org> on 2025/01/29 14:45:51 UTC

[I] SQL Lab container div not showing because height is 0px [superset]

jwoodb opened a new issue, #32027:
URL: https://github.com/apache/superset/issues/32027

   ### 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)
   
   <img width="1728" alt="Image" src="https://github.com/user-attachments/assets/20269713-5242-48c2-8466-6365a352ee09" />
   
   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: 
   
   <img width="584" alt="Image" src="https://github.com/user-attachments/assets/b2aff4bc-2dfb-4f62-bb4b-1476f7864cc0" />
   
   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`
   
   ```typescript
   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
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [x] 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] SQL Lab container div not showing because height is 0px [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #32027: SQL Lab container div not showing because height is 0px
URL: https://github.com/apache/superset/issues/32027


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] SQL Lab container div not showing because height is 0px [superset]

Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on issue #32027:
URL: https://github.com/apache/superset/issues/32027#issuecomment-2623223554

   I'm currently at commit 732de4ac7fae88e29b7f123b6cbb2d7cd411b0e4 and the SQL Lab page shows properly to me. Can you  pull the latest `master` and retry?
   
   <img width="1509" alt="Image" src="https://github.com/user-attachments/assets/89353906-06ae-4342-bc71-6f3c1687e303" />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] SQL Lab container div not showing because height is 0px [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32027:
URL: https://github.com/apache/superset/issues/32027#issuecomment-2640870726

   There was a layout glitch that was fixed on `master` so I'll call this closed/resolved. If you pull the latest master code and still experience this, let us know and we'll reopen it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] SQL Lab container div not showing because height is 0px [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #32027:
URL: https://github.com/apache/superset/issues/32027#issuecomment-2621861374

   <!-- Greeting -->
   Hey @jwoodb! 👋 I'm here to help you with any bugs, questions, or contributions you have for Apache Superset. Let's work together to resolve this issue!
   
   <!-- Answer -->
   The issue you're experiencing with the `SqlLabApp` component having a height of 0px might be related to the dynamic height adjustment logic in the component. The `SqlLabApp` component uses JavaScript logic to dynamically adjust its height based on the window size and user interactions. This is done using the `useEffect` hook, which recalculates the height on window resize events <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx)</sup>.
   
   If this logic isn't functioning as expected, it could result in the component not displaying correctly. Adding `height: 100vh` to the CSS is a workaround that forces the component to occupy the full viewport height, which is why it resolves the issue for you.
   
   To further investigate, you might want to check if the JavaScript logic responsible for setting the height is being executed correctly. Ensure that there are no errors or issues with the event listeners or the functions that calculate and set the height. Additionally, verify that all dependencies and configurations are correctly set up, as they might affect the execution of this logic.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/3df08b90-05fb-42e0-9342-d7bc9f4d6218?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/3df08b90-05fb-42e0-9342-d7bc9f4d6218?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/3df08b90-05fb-42e0-9342-d7bc9f4d6218?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/3df08b90-05fb-42e0-9342-d7bc9f4d6218?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3df08b90-05fb-42e0-9342-d7bc9f4d6218?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/3df08b90-05fb-42e0-9342-d7bc9f4d6218?feedback_type=other)</sup>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org