Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Conversation

aocenas
Copy link
Member

@aocenas aocenas commented Sep 14, 2022

Fixes: #186

For some reason some combination of monaco and CSS made it grow-only.

Peek.2022-09-14.17-46.mp4

Honestly the fix here is weird and I am not really sure why it helped.

// Not exactly sure but without this the editor doe not shrink after resizing (so you can make it bigger but not
// smaller). At the same time this does not actually make the editor 100px because it has flex 1 so I assume
// this should sort of act as a flex-basis (but flex-basis does not work for this). So yeah CSS magic.
width: 100px;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabor I really tried to just copy all the Prometheus code here but that still did not help. I tried this by accident and it works. So just FYI no idea why.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, that's strange.. so if you use the prometheus-code then it does not work, but if you add this it works.. sorry, no idea... maybe the prometheus-datasource has some parent-component-css that does this? i'm just glad it was somehow made work :)

Copy link
Collaborator

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyriltovena cyriltovena merged commit ce9d517 into main Sep 15, 2022
@cyriltovena cyriltovena deleted the aocenas/datasource/allow-editor-shrink branch September 15, 2022 11:01
simonswine pushed a commit to simonswine/pyroscope that referenced this pull request Jun 30, 2023
…/allow-editor-shrink

Datasource: Allow editor to shrink
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zooming in breaks the view
4 participants