Closed alpaslan-exe closed 5 months ago
More specific repro steps:
Hi @maribethb , can I work on this issue?
I think this is WAI. The toolbox defines the edge of the workspace, so we expect things to shift to accommodate it. If we change this it changes the definitions of our absolute top/left, which will probably have downstream impacts to people with custom metrics managers.
Re-marking as triage.
I think we're going to call this working as intended.
If we changed the behavior, it would be to find out the width of the largest category name (even if it is currently collapsed) and always make the toolbox wide enough to accommodate it. We wouldn't change how the workspace metrics are defined in relation to the toolbox. But it's not clear always having the toolbox wider would actually be a better default state of things. If someone wants that in their application they can implement a custom toolbox.
I think it's quite reductive to say that this is working as intended when there's a clear bug in the end product. I understand that resources may be prioritized to something more critical but this is definitely not working as intended. I think others who observe the UI bug would agree with me.
Hello, I think there was a bit of a communication issue here! I agree that the behavior does look buggy, but there's not really a good solution to the problem from a UX / backwards-compatibility perspective :/
(This is a bit of a simplification but please 🐻 with me)
We use the toolbox to define lots of things about the metrics of a workspace. For example, if you have a single block in your workspace, you can't scroll it behind the toolbox:
Screen recording 2024-06-03 9.04.55 AM.webm
This is defined by a metrics manager, which it is possible for folks to override. Because of that, making it so that the toolbox /doesn't/ define the edge of the workspace (because expanding it doesn't move the edge of the workspace) would have a lot of downstream impacts.
That being said, it may actually be possible for you to do what you want with a custom metrics manager!
Or instead of defining a custom metrics manager, if your toolbox definition is static, you can just make the width of your toolbox as wide as it will ever need to be for the widest collapsible category, instead of just as wide as it needs to be for the currently open categories. If the width of the toolbox doesn't change then the left edge of the workspace wouldn't change either.
Both of those solutions are possible for an application owner to develop if they want them. And both of them would not be a desirable default state for Blockly to ship with. So that's why we're calling it working as intended from core's perspective - if you don't want it to work this way in your own application then we already provide the APIs needed to customize this.
Check for duplicates
Description
the selection menu to the left where blocks are chosen from is not uniform in its function. When clicking certain categories of blocks, the current blocks in editor shift slightly, whilst, with bigger tabs, the category opened will simply overlay over the current blocks chosen. There are two solutions that I can see to this problem: either make all menus overlay the code without a shift or simply make all menus regardless of size shift the blocks further to the right. This was observed in an implementation of Blocky and was reported as a bug in Blocky by the developer. Please see https://github.com/google/coding-with-chrome/issues/295.
Reproduction steps
Stack trace
No response
Screenshots
No response
Browsers
Chrome desktop