-
-
Notifications
You must be signed in to change notification settings - Fork 753
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 a sidebar toggle into the toolbar and close button into sidebar #3912
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for volto ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
ae09c8a
to
02be811
Compare
02be811
to
8a0d34f
Compare
3 failed tests on run #7235 ↗︎Details:
|
Test | Artifacts | |
---|---|---|
Blocks Tests > Add image block |
Screenshots
Video
|
core/blocks/blocks-image.js • 1 failed test • Core Blocks 16.x
Test | Artifacts | |
---|---|---|
Blocks Tests > Add image block |
Screenshots
Video
|
minimal/blocks-image.js • 1 failed test • Project Generator
Test | Artifacts | |
---|---|---|
Blocks Tests > Add image block |
Screenshots
Video
|
Review all test suite changes for PR #3912 ↗︎
@tiberiuichim I'm running into Pluggable problems again. I need the plug dependency so that the component is correctly re-rendered when the sidebar is opened/ closed, but it seems that this causes the pluggable to re-order the plugs and so the button gets moved to above the undo/ redo. Is it possible to force the Plug to be in a certain position, or is this entirely up to the Pluggable? |
@JeffersonBledsoe you can pass an order to the Plug |
✅ Deploy Preview for plone-components canceled.
|
5db6d0a
to
bf2b582
Compare
# Conflicts: # packages/volto/src/actions/index.js # packages/volto/src/components/manage/Add/Add.jsx # packages/volto/src/components/manage/Form/Form.jsx # packages/volto/src/components/manage/Form/SidebarToggleButton.jsx # src/actions/sidebar/sidebar.js # src/components/manage/Sidebar/Sidebar.jsx # src/reducers/sidebar/sidebar.js
I think the only difference to the quanta design is in quanta this how you open the page settings only since the blocks vs page tabs are gone. |
I think I was wrong before when I said the toolbar settings icon should open the page settings only. The quanta design is a bit hard to work out the intention. Throughout the design in figma the toolbar settings is highlighted when the block settings or the page settings is open. So I think @albertcasado did mean for it relate to the sidebar in general rather than the page settings only. I really like the design with no tabs. It's cleaner and more mobile friendly saving space. But with no tabs, what action shows the page settings when a block settings are shown? The ways I can think of that are consistent with the figma design are
but how these all work in with ARIA I'm not sure. EDIT: I think this design for the block/page settings resolves things nicely - collective/volto-hydra#152. the toolbar settings button is a simple toggle for displaying the sidebar and there is an obvious way to get to the page settings even if a block is selected and without the tabs or layout. But the settings button would work the same keeping the tabs and layout so they can be treated seperate. |
CC @Wagner3UB I know you're working on some sidebar stuff so just thought you might want to take a look over this incase it changes your work |
@JeffersonBledsoe I have some personal opinions about this new behavior:
It will be something similar to this: ![]() |
@Wagner3UB Agreed on both points! I think there is some differing opinion on these still though across the community. As this is behind a feature flag to start with, what do you think about having configuration options for both of the points you raised? E.g: config.experimental.sidebarButton = {
position: 'toolbar' // Could also be 'floating'
defaultOpenState: 'open' // Could also be 'closed' |
I think open by default and having some new floating settings button can be added later if people really find they need it. I personally don't think it's going to be a problem in practice to have a button that looks like a settings button result in opening the settings even if where it opens is further away. It's still obvious. and it's way more obvious than whats there now. |
This PR now MOSTLY is feature-flag only. It does refactor the sidebar to be controlled by a reducer now rather than it controlling itself, however this should make it easier to control other ways in the future should we need it (e.g. open/ close via the keyboard) I've introduced the following feature flags:
The sidebarCloseButton flag has been introduced so integrators can experiment with improving the mobile experience without introducing the open/ close toggle button as it was discussed at the Salamina sprint that the close button could be a useful feature on it's own. |
This PR adds a settings icon into the toolbar to open and close the sidebar, and a 'Close' icon in the sidebar to make it clear that it can be hidden and how. The current handle at the edge of the settings draw isn't particularly clear and gets missed or be difficult to press by some users, particularly on mobile where screens are smaller and may have curved glass preventing clicks. This change is very similar to the Quanta design.
Todo:
Closes #3910