-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Order of InspectorControls panels is non-deterministic #15641
Comments
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. |
c38327d 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. |
@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 added by my edit() function will be after the defaults. I don't see any way to reverse that order, I'd hoped there was a "position" attribute on the that would somehow reorder. 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. ScreencastCleanShot.2023-06-01.at.15.53.12.mp4 |
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
The text was updated successfully, but these errors were encountered: