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

Initial text overlap on blocks #92

Open
DenisaCG opened this issue Aug 20, 2024 · 1 comment · May be fixed by #104
Open

Initial text overlap on blocks #92

DenisaCG opened this issue Aug 20, 2024 · 1 comment · May be fixed by #104
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@DenisaCG
Copy link
Member

When first launching the extension, the blocks present in the workspace and the blocks inside the toolbox appear distorted, as the text is overlapped on them.

Workspace and toolbar with overlapped text

Once you go through the toolbox categories the blocks contained inside appear normal. It seems that once the user opens a category in which the blocks are fitting inside the original toolbox flyout space (such as the Variables category), the blocks stop having overlapping text and get formatted properly in all other categories as well.

The problem seems to be with the toolbox flyout space which doesn't seem to resize accordingly to what the blocks need, or it might just be coming from how the blocks are rendered originally, as the blocks situated in the workspace when the file is first opened, appear with overlapped text and cannot seem to be fixed.

@DenisaCG DenisaCG added bug Something isn't working good first issue Good for newcomers labels Aug 20, 2024
@Phoenix616
Copy link

I tried to look into this a bit but I'm unsure if this is even something that can be fixed in the extension but in the Blockly library itself. (Or maybe some form of refresh function needs to be called? But I don't really have experience in Blockly itself to know if there even is such a thing... :S)

ykazakov added a commit to ykazakov/jupyterlab-blockly that referenced this issue Oct 24, 2024
The var() function can be used in css styles, but not in css shorthand properties which are used to calculate the sizes of blocks in blockly. Notice that all blockly examples set style values to fixed values. A solution is to retrieve the values of css variables when setting the theme to the workspace.

Since changes in jupyterlab settings, e.g., selecting a different theme, may result in changes of css styles, the blockly theme needs to be re-applied after each such change.
@ykazakov ykazakov linked a pull request Oct 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants