Open swissspidy opened 5 years ago
I was able to reproduce it. It's a bug and it needs to be fixed.
I've also experienced an issue where block toolbar icons move after transforming the content. It might be related? Here's a comment about that. A screencast of it is below.
Related discussion on WordPress Slack (link requires registration):
It might regress after #15541.
In some initial testing, the issue can be reproduced as of 7320d0d, the commit immediately preceding (before) c38327d (#15541), which signals to me that this may not be a regression after all.
c38327df97fc250d9af5d340f2f68a5db7c76eaf was committed 6 days after I created this issue, so yeah that is unrelated 🙂
I've not been able to reproduce different behavior in GB 9.0, the custom control is available as soon as block is inserted. @swissspidy Any thing I'm missing? Can you still reproduce it?
@obenland The problem I was describing is not that the control is not available, but that the order of the controls is different.
is there any update to this issue?
Still able to reproduce this in Gutenberg 10.5.4
Found this issue ticket still open in August 2021 after searching for "how to control order of the InspectorControls". Difficult to find any documentation on this topic, I did find some example in a resolved issue but it was involving a HOC (Higher Order Component) usage that differs from the standard usage. In my own experience when I use the "supports" options which create controls in the the inspector by default such as "Colors" and "Typography" then any
I've seen some suggestion that ordering could be controlled by when the block is registered, but I doubt that because default controls are part of the process of building the block?
I'm not able to reproduce the issue using the instructions in the description of the issue. It is possible that it's due to the redesign of the inspector (tabs) or that the issue is actually solved. Any testers to confirm here?
I can still reproduce the issue. Using the code example from the handbook and an Image block.
https://github.com/WordPress/gutenberg/assets/240569/e5f61ca5-0861-4dab-8715-c07245d140cf
Describe the bug
The order of panels within
InspectorControls
is non-deterministic and changes depending on whether you are editing an existing block or a freshly inserted one.To reproduce Steps to reproduce the behavior:
Expected behavior The order should always be the same so that it can be deterministic.
Otherwise this not only confuses users, it also makes it harder to target individual controls via CSS to hide them (because there is still no API for that)
Screenshots
Freshly inserted block:
After selecting the block again:
Desktop (please complete the following information): Chrome 74 on macOS Mojave
Additional context
Gutenberg 5.7 RC 1