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

Inspector: Don't show if a block has no advanced properties #1100

Closed
ellatrix opened this issue Jun 10, 2017 · 11 comments
Closed

Inspector: Don't show if a block has no advanced properties #1100

ellatrix opened this issue Jun 10, 2017 · 11 comments
Assignees

Comments

@ellatrix
Copy link
Member

ellatrix commented Jun 10, 2017

Since 5ffdd66:

screenshot 2017-06-10 12 02 10

cc @youknowriad

@ellatrix ellatrix added the [Type] Bug An existing feature does not function as intended label Jun 10, 2017
@ellatrix ellatrix changed the title Block inspector broken since 5ffdd66206d032b3d08f7ac708c19a97babf5532 Block inspector broken Jun 10, 2017
@youknowriad
Copy link
Contributor

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)

@ellatrix
Copy link
Member Author

Oh, sorry then! It just looked broken. :)

@ellatrix ellatrix changed the title Block inspector broken Block inspector looks broken without content Jun 10, 2017
@ellatrix ellatrix added Design and removed [Type] Bug An existing feature does not function as intended labels Jun 10, 2017
@litka
Copy link

litka commented Jun 13, 2017

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.

@jasmussen
Copy link
Contributor

Let's see if we can address this by simply not showing the inspector if a block doesn't have any advanced controls.

@jasmussen jasmussen changed the title Block inspector looks broken without content Inspector: Don't show if a block has no advanced properties Jun 19, 2017
@aduth aduth assigned aduth and unassigned aduth Jun 19, 2017
@aduth aduth self-assigned this Jun 21, 2017
@GaryJones
Copy link
Member

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?

screenshot 2017-06-22 08 02 08

@jasmussen
Copy link
Contributor

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.

@GaryJones
Copy link
Member

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?

@jasmussen
Copy link
Contributor

Perhaps I didn't fully understand the initial message:

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).

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.

@GaryJones
Copy link
Member

GaryJones commented Jun 22, 2017

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.

@jasmussen
Copy link
Contributor

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.

@jasmussen
Copy link
Contributor

Closing this as resolved by recent changes to the inspector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants