usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
25.05k stars 1.14k forks source link

GraphQL query area height does not resize since v1.20.x #2605

Closed simeon-walker closed 1 month ago

simeon-walker commented 1 month ago

I have checked the following:

Describe the bug

The query pane of a GraphQL request now has a fixed height, 14 lines in my case. It does not resize to fit the window height.

I have tried the latest flatpak and appimage. Reverting to v1.19 does not have the issue.

.bru file to reproduce the bug

A new collection with an empty GraphQL request can show the bug.

Screenshots/Live demo link

image

remino commented 1 month ago

Getting the same problem. Looks like someone already made a fix for this way back but it never got merged: https://github.com/usebruno/bruno/pull/912

simeon-walker commented 1 month ago

Getting the same problem. Looks like someone already made a fix for this way back but it never got merged: #912

I see this issue too but I don't think it's the same thing, would be nice if it were merged though.

kimnilsson commented 1 month ago

Bug is still there in 1.22.0. Downgrading to 1.19.0 as a workaround works.

kimnilsson commented 1 month ago

This issue was introduced in this commit. CSS isn't really my cup of tea so I'm not sure how to fix it.

kimnilsson commented 1 month ago

Adding the following style attributes to div.CodeMirror seems to solve it (for me at least):

@@ -4,6 +4,8 @@ const StyledWrapper = styled.div`
   div.CodeMirror {
     background: ${(props) => props.theme.codemirror.bg};
     border: solid 1px ${(props) => props.theme.codemirror.border};
+    min-height: 0px;
+    flex: 1 1 0;
   }

However I don't really understand the changes so wont make a PR - but perhaps someone else actually does :)

helloanoop commented 1 month ago

Thanks for sharing the flex: 1 1 0 approach @kimnilsson !

This now has been fixed in the PR #2758 This will be released in v1.24.0 which will be released tomorrow.