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

Add sidebar tabs to switch between doc and block settings. #1833

Merged
merged 7 commits into from
Jul 11, 2017

Conversation

mtias
Copy link
Member

@mtias mtias commented Jul 10, 2017

image

This simplifies the way the two sidebar mode are accessed. There are two layers now, selecting a mode, and selecting a block. This allows to have blocks selected while changing post settings, and avoids the switch of context whenever a block is selected with the sidebar open. This also means there's now a state in which "block" mode is selected, but no individual block is selected.

I'm showing a "No block selected" message, but we could get a bit more creative, maybe even showing the contents of the inserter. cc @jasmussen @melchoyce .

image

It also look like we should create a reusable component called "Tabs" to reuse in the inserter and here, and provide good accessibility out of the box. cc @youknowriad .

Closes #1730.

@mtias mtias added General Interface Parts of the UI which don't fall neatly under other labels. [Feature] Document Settings Document settings experience [Status] In Progress Tracking issues with work in progress labels Jul 10, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 17.796% when pulling 83512b8 on add/sidebar-mode-tabs into 4e0ea5c on master.

@@ -0,0 +1,54 @@
/**
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be panel-tabs instead.

@jasmussen
Copy link
Contributor

Thanks for working on this. Designwise, I think it's good. I know @folletto had some concerns about not auto-switching to the block context, which I understand, but on the other hand I can't help but feel like this can work really well too, especially with the "No block selected" message. I also think this would be the time to try it. So 👍 👍

@mtias
Copy link
Member Author

mtias commented Jul 10, 2017

@jasmussen just to be clear, there's no auto-switch to block inspector mode unless you click on the block's cog icon.

@mtias
Copy link
Member Author

mtias commented Jul 10, 2017

Tweaked design slightly:

image

const SidebarHeader = ( { panel, onSetPanel, toggleSidebar } ) => {
return (
<div className="components-panel__header editor-sidebar__panel-tabs">
<h2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: these should be buttons even if we don't turn them into Tabs.

@mtias mtias removed the [Status] In Progress Tracking issues with work in progress label Jul 11, 2017
@mtias mtias merged commit 671d58c into master Jul 11, 2017
@mtias mtias deleted the add/sidebar-mode-tabs branch July 11, 2017 12:22

const SidebarHeader = ( { panel, onSetPanel, toggleSidebar } ) => {
return (
<div className="components-panel__header editor-sidebar__panel-tabs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A component shouldn't be "stealing" another component's styles (.components-panel__header). This is prone to unexpected breakage.

Tug pushed a commit that referenced this pull request Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Document Settings Document settings experience General Interface Parts of the UI which don't fall neatly under other labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants