-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Inspector: Don't show if a block has no advanced properties #1100
Comments
This is not broken actually, this just means the text block didn't add any control to the inspector. I dropped the default attributes output we had. That said, we probably show something better for Blocks without any inspector control but I don't want to be impatient here because we may have some shared controls to all blocks in the future (maybe show the UID as readonly, or a wrapper className) |
Oh, sorry then! It just looked broken. :) |
On the topic of shared controls — a universal method to assign custom class names and an html ID to individual blocks would be very useful. |
Let's see if we can address this by simply not showing the inspector if a block doesn't have any advanced controls. |
The proposed fix in #1343 shows the post settings if there are no block properties - and that's different to what is being proposed here (to not show the inspector at all). With the inspector hidden completely, there would be a jarring as the content moves slightly to the right and then back again when the next block with properties shows up. With the post settings, the user is suddenly shown a whole load of stuff that is disconnected from the current block - a visual distraction at best, and confusion at worst (i.e. that's not what other blocks show). May I propose that we just be explicit and solve the immediate problem, instead of being fancy? i.e. tell the user that there simply isn't any advanced properties for a selected block? |
Great thoughts, @GaryJones. My feelings on this are that since there's already a PR in progress to fix this, we should let that trickle through and actually get a feel for how it works. If it still feels jarring, we can revisit this. |
Understood, though my suggestion is that it swaps one issue (a blank inspector) for another issue (an inspector full of settings unrelated to the current block). I've not looked at the code, but I would hope that providing a fallback message if the number of advanced properties is zero, would be relatively trivial? |
Perhaps I didn't fully understand the initial message:
To be clear, the inspector is a post settings overlay. It shows "above" the Post Settings when you click a block, to imply the hierarchy — when nothing is selected, the document is selected. When a block is selected, you've essentially drilled down one level. See also #1352. I understand how it could then be confusing to not show this inspector if a block doesn't have any advanced settings. I lean towards it being less jarring than showing an empty placeholder message though. An alternative that has been proposed, is to not have the inspector overlay the sidebar, but instead be a modal that you have to open on a per-block basis. I consider this a plan B as the inspector has the benefit of not covering any text content, allowing a real time preview of the changes you are applying. But it's an option. |
I'm an experienced developer, but I've got the benefit of having not looked at the implementation in the code, so I'm seeing this "just" as a user. I follow your explanation (thanks!) of the inspector modal sitting over the Post Settings, but that's not something a User is going to care about. The change between the two is instant (i.e. there's no slideLeft behaviour of the modal that shows it covering the Post Settings, and nor should there be), so as far as the User is concerned, this is a straight toggle between the two views of the panel. The fact that the block inspector panel doesn't show when the Post Settings button (next to Publish at the top) is turned off, implies to users that the panel is a single thing with different views, not a Post Settings Panel with properties inspector over the top. I think we're agreed that showing no panel on the right at all when there are no properties for a block, would be jarring, as different blocks are later selected will bring that panel back. FWIW, as a developer, I think the current implementation of the modal appearing over the inspector makes sense - my concern is here is simply the view that Users see when a block is selected has no properties i.e. the content of the panel on the right. As a developer, I could understand the logic of removing the modal and defaulting to showing the Post Settings for a Heading block, say, but as a User, showing an empty modal (with the short message) is far more logical, providing a more consistent experience. If a user wants to see the Post Settings, they wouldn't expect to find and click on a block type that has no properties - they'd click away from all blocks instead. |
I think based on discussion here it may be good to postpone merging any "fixes" to this. Matías also suggested in a private chat that we might be able to put items here that benefit all blocks, such as "move to bottom", things like that. |
Closing this as resolved by recent changes to the inspector. |
Since 5ffdd66:
cc @youknowriad
The text was updated successfully, but these errors were encountered: